feat(sandbox): Update mcp dependency and server implementation - #38
Closed
gerard-samuel wants to merge 1 commit into
Closed
feat(sandbox): Update mcp dependency and server implementation#38gerard-samuel wants to merge 1 commit into
gerard-samuel wants to merge 1 commit into
Conversation
The `pyproject.toml` file has been updated to specify a minimum version of `mcp>=1.0.0`. The `sandbox/src/mcp_server_plaid/server.py` file has been refactored to support both MCP 1.x (decorator API) and MCP 2.x (callback API) through robust feature detection. This change ensures compatibility with different MCP versions by checking for the presence of the `Server.list_tools` decorator. If the decorator is not found, the server falls back to using the `on_list_tools` and `on_call_tool` callbacks, which are part of the MCP 2.x specification. The client creation logic has also been consolidated into a helper function `_make_clients` for better code organization.
Contributor
|
Thank you for this PR! I don't want us to merge this one it as it has some blocking issues and a broader-than-needed scope but I have opened #39 to resolve this issue instead and intend to merge that instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
pyproject.tomlfile has been updated to specify a minimum version ofmcp>=1.0.0.The
sandbox/src/mcp_server_plaid/server.pyfile has been refactored to support both MCP 1.x (decorator API) and MCP 2.x (callback API) through robust feature detection. This change ensures compatibility with different MCP versions by checking for the presence of theServer.list_toolsdecorator. If the decorator is not found, the server falls back to using theon_list_toolsandon_call_toolcallbacks, which are part of the MCP 2.x specification. The client creation logic has also been consolidated into a helper function_make_clientsfor better code organization.This should close issue #37