spike(mcp): port to MCP Python SDK v2 / spec 2026-07-28 - DO NOT MERGE YET - #88
Open
StephenAbbott wants to merge 1 commit into
Open
spike(mcp): port to MCP Python SDK v2 / spec 2026-07-28 - DO NOT MERGE YET#88StephenAbbott wants to merge 1 commit into
StephenAbbott wants to merge 1 commit into
Conversation
…E YET Throwaway reference port answering the R2 open questions (all favourable): - FastMCP → MCPServer is mechanical: constructor keeps name/instructions; transport settings (stateless_http, path, transport_security) move to streamable_http_app() in asgi_app(). app.py needed ZERO changes — the session_manager property, routes-extraction (307 workaround) and lifespan pattern all carry over. - Dependency resolution is clean: httpx 0.28 (opencheck) and httpx2 2.9 (mcp v2) coexist as separate packages; starlette stays 1.0.0; fastapi 0.136 untouched; adds mcp-types, opentelemetry-api, truststore. - Downlevel clients verified live: an mcp 1.28 client negotiates 2025-11-25 against this server via the old initialize handshake, while a v2 client negotiates 2026-07-28 — dual-version serving works out of the box. - SEP-2549 cache hints wired: tools/list now advertises ttlMs=86400000, cacheScope=public (R4). - Test suite: 21/21 pass after one snake_case fix (inputSchema → input_schema in test_mcp.py). Held back for the real migration phase: pass version=__version__ to MCPServer (server_info.version is empty), CORS header review (MCP-Protocol-Version / Mcp-Method / Mcp-Name), docs/mcp-server.md + ard.md + descriptor updates, MCP Inspector run, Tasks extension (R3), per-tool rate limiting via Mcp-Name (R5).
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.
Throwaway reference port answering the R2 open questions (all favourable):
Held back for the real migration phase: pass version=version to MCPServer (server_info.version is empty), CORS header review (MCP-Protocol-Version / Mcp-Method / Mcp-Name), docs/mcp-server.md + ard.md + descriptor updates, MCP Inspector run, Tasks extension (R3), per-tool rate limiting via Mcp-Name (R5).