From 9742422643d1ee0965df0729732066eb417637b2 Mon Sep 17 00:00:00 2001 From: jujumilk3 Date: Tue, 21 Apr 2026 18:50:13 +0900 Subject: [PATCH] fix(deps): require mcp>=1.19 for CallToolResult passthrough Since #717, create_sdk_mcp_server() returns a CallToolResult from its @server.call_tool() handler. The mcp low-level server only has the isinstance(results, CallToolResult) passthrough branch starting at mcp==1.19.0. On mcp<=1.18.x, CallToolResult (a pydantic BaseModel) falls into the iterable branch, yielding (field, value) tuples that fail ContentBlock union validation with 20 errors (4 fields x 5 union members). Bump the minimum mcp constraint so every install has the passthrough branch #717 relies on. Refs #717 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6c001ff9..b1ec77d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ keywords = ["claude", "ai", "sdk", "anthropic"] dependencies = [ "anyio>=4.0.0", "typing_extensions>=4.0.0; python_version<'3.11'", - "mcp>=0.1.0", + "mcp>=1.19.0", ] [project.optional-dependencies]