Skip to content

fix: support MCP Python SDK v2 - #242

Merged
georgeh0 merged 2 commits into
cocoindex-io:mainfrom
fml09:fix/mcp-sdk-v2
Aug 4, 2026
Merged

fix: support MCP Python SDK v2#242
georgeh0 merged 2 commits into
cocoindex-io:mainfrom
fml09:fix/mcp-sdk-v2

Conversation

@fml09

@fml09 fml09 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Fresh installs now resolve mcp 2.0.0, but server startup still imports the removed mcp.server.fastmcp module.

  • Migrate FastMCP to MCPServer.
  • Require mcp>=2,<3 and refresh the lockfile.
  • Cover tool discovery and invocation through the v2 in-memory client.

This follows the official v1 to v2 migration guide.

Tests: uv run prek run --all-files

@badmonster0
badmonster0 requested a review from georgeh0 August 4, 2026 17:52

@georgeh0 georgeh0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the fix!

@georgeh0
georgeh0 merged commit 1a56d0f into cocoindex-io:main Aug 4, 2026
4 checks passed
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.

2 participants