Skip to content

Migrate the MCP adapter to the official SDK v2 - #7

Merged
RightL merged 2 commits into
mainfrom
agent/mcp-sdk-v2
Aug 18, 2026
Merged

Migrate the MCP adapter to the official SDK v2#7
RightL merged 2 commits into
mainfrom
agent/mcp-sdk-v2

Conversation

@RightL

@RightL RightL commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the MCP Python SDK v1 pin with the stable v2 line
  • migrate the server from FastMCP to the public v2 MCPServer API
  • replace the full pydantic-ai meta-package with pydantic-ai-slim[anthropic,openai], matching the providers RightMemory actually supports and avoiding Pydantic AI's optional MCP-client dependency chain
  • exercise tool discovery and calls through the v2 in-memory Client, rather than only invoking server methods directly
  • document that the local stdio adapter uses the official SDK v2

Why

The previous v1 pin was chosen to coexist with the full pydantic-ai package, 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

  • dependency resolution selected mcp==2.0.0, mcp-types==2.0.0, and pydantic-ai-slim==2.31.1 without FastMCP or Pydantic AI's MCP client extra
  • package compilation passed on Python 3.11 for Ubuntu and Windows
  • the complete 1,196-test suite passed on both platforms
  • MCP tests exercise discovery and tool calls through the v2 in-memory Client

@RightL
RightL marked this pull request as ready for review August 18, 2026 06:41
@RightL
RightL merged commit b81733e into main Aug 18, 2026
2 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