Skip to content

fix(mcp-server): pin MCP Python SDK to v1.x - #2395

Merged
lyingbug merged 1 commit into
Tencent:mainfrom
lyingbug:fix/mcp-server-pin-mcp-v1
Jul 29, 2026
Merged

lyingbug merged 1 commit into
Tencent:mainfrom
lyingbug:fix/mcp-server-pin-mcp-v1

Conversation

@lyingbug

Copy link
Copy Markdown
Collaborator

Summary

  • Pin mcp to >=1.28,<2 in requirements.txt, pyproject.toml, and setup.py fallback deps.
  • Align pyproject.toml with HTTP transport runtime deps (starlette, uvicorn).
  • Document the fix in mcp-server/CHANGELOG.md.

Why

WeKnora MCP Server still uses MCP Python SDK v1 low-level Server decorators such as @app.list_tools(). MCP SDK 2.0 removed those APIs, so fresh pip install / uv sync installs can fail at startup with:

AttributeError: 'Server' object has no attribute 'list_tools'

The lower bound 1.28 keeps Streamable HTTP transport (StreamableHTTPSessionManager) available.

Test plan

  • uv pip install 'mcp>=1.28,<2' resolves to a 1.x release
  • import weknora_mcp_server succeeds on MCP SDK 1.x
  • python main.py --transport http starts and serves /mcp

WeKnora MCP Server still uses v1 low-level Server decorators such as
@app.list_tools(). MCP SDK 2.0 removed those APIs, so fresh installs
could fail at startup with AttributeError. Cap the dependency at <2 and
require >=1.28 for Streamable HTTP transport support.
@lyingbug
lyingbug merged commit 4f7a36c into Tencent:main Jul 29, 2026
13 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.

1 participant