chore(deps): support MCP 2 and preserve SDK 1 compatibility - #43
Merged
Conversation
Updates the requirements on [mcp](https://github.com/modelcontextprotocol/python-sdk) to permit the latest version. - [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases) - [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md) - [Commits](modelcontextprotocol/python-sdk@v1.28.0...v2.1.1) --- updated-dependencies: - dependency-name: mcp dependency-version: 2.1.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
Contributor
Author
LabelsThe following labels could not be found: Please fix the above issues or remove invalid values from |
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.
MCP 2 removes the low-level decorators that this server uses, so widening the dependency range alone prevents Agent from starting. This change supports
mcp>=1.28,<3through the SDK 1 decorators and SDK 2 constructor handlers. Both paths use the same tool dispatch, explicit input-schema checks, andCallToolResultresponses. Validation errors don't expose argument values.Operator confirmation still precedes every attended decision. The server uses the request's actual context and refuses when the client cannot complete form elicitation. SDK 2 clients need
mode="legacy"for attended decisions; the newer discovery protocol has no server-initiated confirmation channel. Discovery, authoring tools, and governed workflow execution remain available. Upstream migration guide.The tests now connect real SDK client/server sessions instead of invoking private handler dictionaries. They cover tool schemas and annotations, successful reads, every attended decision with accept/decline/cancel responses, malformed arguments, protected exception text, modern discovery refusal, and the CLI's stdio transport. A run-tool test invokes the installed Flow CLI and confirms its admission refusal for an unsigned synthetic bundle.
Validation:
uv lock --locked, wheel/sdist builds, and all package/source-boundary checks pass. The refreshed lock selects MCP 2.2.0.CI retains three jobs and tests the SDK 1 floor, SDK 2 floor, and current allowed dependencies. This PR does not create a package release or change an admission.