Skip to content

Conversation

@kop
Copy link
Collaborator

@kop kop commented Apr 28, 2025

Cursor removed support for MCP Resources in version 0.46.9+, breaking compatibility with Firebolt’s MCP server which relied heavily on resource embedding.

To restore functionality, introduced the --disable-resources CLI flag that allows Docs and Connect tools to return plain text responses instead of embedded resources.

kop added 2 commits April 28, 2025 12:00
Cursor removed support for MCP Resources in version 0.46.9+, breaking compatibility with Firebolt’s MCP server which relied heavily on resource embedding.

To restore functionality, introduced the `--disable-resources` CLI flag that allows `Docs` and `Connect` tools to return plain text responses instead of embedded resources.
Replaced RWMutex with Mutex to streamline lock handling and simplify the synchronization logic in the connection pool implementation.

The change eliminates redundant lock/unlock calls, ensuring thread safety while reducing complexity.
@kop kop requested a review from Copilot April 28, 2025 09:07
@sonarqubecloud
Copy link

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for text-only content in MCP tools by introducing a new CLI flag that disables resource embedding.

  • Added a --disable-resources flag to allow Docs and Connect tools to return plain text responses.
  • Modified the NewDocs and NewConnect functions and associated tests to accommodate the new disableResources parameter.
  • Updated the connection pool to use a simpler locking strategy.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/tools/tools.go Added the textOrResourceContent helper function to switch between content types.
pkg/tools/docs.go Updated NewDocs and Handler to make use of disableResources for text content.
pkg/tools/docs_test.go Updated tests to instantiate Docs with the new disableResources flag and verify responses.
pkg/tools/connect.go Updated NewConnect and Handler to support the new disableResources parameter.
pkg/tools/connect_test.go Updated tests and added a new test to validate the behavior when disableResources is true.
pkg/clients/database/pool.go Changed RWMutex to Mutex and simplified locking in GetConnection.
cmd/firebolt-mcp-server/main.go Introduced the new --disable-resources CLI flag and passed its value to the tools.

@kop kop merged commit c509b6d into main Apr 28, 2025
6 checks passed
@kop kop deleted the FIR-45652_add_ability_to_disable_resources branch April 28, 2025 12:01
kop pushed a commit that referenced this pull request Apr 28, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.3.0](v0.2.1...v0.3.0)
(2025-04-28)


### Features

* add support for text-only content in MCP tools
([#20](#20))
([c509b6d](c509b6d))


### Dependencies

* **gomod:** bump the go-deps group with 2 updates
([#18](#18))
([175ed4b](175ed4b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants