Skip to content

fix(mcp): constrain installs to the supported SDK API - #749

Open
rudycelekli wants to merge 1 commit into
Panniantong:mainfrom
rudycelekli:fix/mcp-sdk-compatibility
Open

rudycelekli wants to merge 1 commit into
Panniantong:mainfrom
rudycelekli:fix/mcp-sdk-compatibility

Conversation

@rudycelekli

Copy link
Copy Markdown

Problem

The all extra permits MCP SDK 2.x, but this server uses the SDK 1.x low-level decorator API. A fresh install resolving MCP 2.2.0 fails in create_server() with AttributeError: 'Server' object has no attribute 'list_tools' before it can serve any tools. Existing fake-Server tests do not detect this dependency incompatibility.

Change

Constrain the existing MCP dependency to >=1.0,<2 until the integration is migrated to the new API. Add an optional real-SDK smoke test that initializes a client session, lists get_status, and calls it. Only the synchronous doctor response is stubbed; tool registration and the MCP exchange use the actual SDK.

This is distinct from #624's missing mcp extra and #697's event-loop fix: it changes the supported dependency range, not the advertised extras or handler concurrency.

Validation

  • Before: native MCP 2.2.0 startup and the real-SDK regression fail at tool registration.
  • After: resolving .[all,dev] against repository constraints selects MCP 1.30.0; native SDK smoke and existing MCP tests pass (3 tests), and the full suite passes (608 tests).
  • MyPy with the supported SDK: no issues in 36 source files. Ruff check passes; new test formatting passes.
  • Built wheel has no duplicate entries and contains required skill, guide and script resources. Its actual dependency metadata admits 1.30.0 and excludes 2.2.0.
  • Unchanged main already fails formatting checks in 54 files; no unrelated formatting changes.

SDK v2's documented low-level API uses constructor callbacks rather than these decorators.

AI assistance: prepared with Codex, independently reviewed, and verified using the native SDK before submission.

Signed-off-by: Rudy Celekli <47457359+rudycelekli@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.

1 participant