Skip to content

Add support for mcp v2 - #38

Merged
herber merged 1 commit into
mainfrom
feat/add-support-for-mcp-v2
Nov 9, 2026
Merged

herber merged 1 commit into
mainfrom
feat/add-support-for-mcp-v2

Conversation

@herber

@herber herber commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Note

Medium Risk
Touches core MCP client, transport, and tool serialization paths used by all provider and framework integrations; CI mitigates with dual-major interop tests but runtime behavior changes on HTTP failures and field naming are user-visible.

Overview
Release 2.7.0 adds first-class support for MCP Python SDK 2.x while keeping 1.21+ working. Version-specific behavior is centralized in metorial.mcp._compat (timeouts, JSON-RPC shape, camelCase vs snake_case fields, server capabilities, resource URIs).

The Streamable HTTP transport now maps failed HTTP exchanges to per-request JSON-RPC errors instead of tearing down the whole client, forwards per-message headers from the MCP session, and parses messages through the compat helpers. Tool results for providers and framework integrations use shared metorial._tool_results helpers so outputs keep MCP wire keys (isError, structuredContent, etc.) on either SDK major.

Packaging bumps the supported mcp range to >=1.21.0,<3, adds a direct httpx-sse dependency, and CI runs pytest across Python 3.10–3.12 with both MCP majors (plus mypy against v1).

Reviewed by Cursor Bugbot for commit e854b50. Bugbot is set up for automated code reviews on this repo. Configure here.

@herber herber self-assigned this Nov 9, 2026
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​httpx-sse@​0.4.3100100100100100

View full report

@herber
herber merged commit e854b50 into main Nov 9, 2026
17 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