Support the MCP 2026-07-28 specification ("MCP 2.0") - #24
Open
javabudd wants to merge 3 commits into
Open
Conversation
Upgrade to FastMCP 4, the first release implementing the 2026-07-28 MCP revision. The server now answers server/discover and tools/list with no initialize handshake and no Mcp-Session-Id, and still serves handshake-era clients on 2025-11-25 from the same /mcp endpoint, so the xAI hosted MCP client used by test_grok_mcp.py keeps working unchanged. - Pin fastmcp>=4.0.0b1 and swap httpx for httpx2, which FastMCP 4 uses. The X API client and all four event hooks (OAuth1 signing, comma-joined array query params, request/response logging) move across unchanged. - Drop the FASTMCP_EXPERIMENTAL_ENABLE_NEW_OPENAPI_PARSER passthrough; that setting no longer exists in FastMCP 4. - Advertise a server version and 2.0 cache hints on tools/list and server/discover. The tool set is derived from the OpenAPI spec once at startup and is immutable for the life of the process, so it is genuinely cacheable. Tunable via MCP_CACHE_TTL (default 300s). - Document the protocol behavior, bump the stated Python floor to 3.10 to match FastMCP 4, and correct a stale README line about the spec being fetched from api.twitter.com. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Support the MCP 2026-07-28 specification ("MCP 2.0")
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.
Upgrade to FastMCP 4, the first release implementing the 2026-07-28 MCP revision. The server now answers server/discover and tools/list with no initialize handshake and no Mcp-Session-Id, and still serves handshake-era clients on 2025-11-25 from the same /mcp endpoint, so the xAI hosted MCP client used by test_grok_mcp.py keeps working unchanged.