Migrate the MCP adapter to the official SDK v2 - #7
Merged
Conversation
RightL
marked this pull request as ready for review
August 18, 2026 06:41
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.
Summary
FastMCPto the public v2MCPServerAPIpydantic-aimeta-package withpydantic-ai-slim[anthropic,openai], matching the providers RightMemory actually supports and avoiding Pydantic AI's optional MCP-client dependency chainClient, rather than only invoking server methods directlyWhy
The previous v1 pin was chosen to coexist with the full
pydantic-aipackage, whose MCP extra resolved through the v1-era client stack. RightMemory does not use Pydantic AI as an MCP client, so that coupling was unnecessary. Declaring only the Pydantic AI provider extras RightMemory actually uses lets the MCP server track the stable v2 SDK directly without compatibility wrappers or dual implementations.Scope
The ordinary tool surface, stdio-only transport, root resolution, silent successful writes, asynchronous Update behavior, and guidance-capture policy are unchanged.
Validation
mcp==2.0.0,mcp-types==2.0.0, andpydantic-ai-slim==2.31.1without FastMCP or Pydantic AI's MCP client extraClient