Skip to content

Commit bfef196

Browse files
committed
fix(deps): require mcp>=1.19.0 for CallToolResult handler returns
create_sdk_mcp_server tool handlers return CallToolResult objects since v0.1.51 (PR #717). mcp<1.19.0 cannot handle this return type from @server.call_tool() decorated functions — it falls through the iterable branch, fails pydantic validation, and silently swallows the tool output into an error result. Users upgrading claude-agent-sdk in an existing env with old mcp would see in-process SDK MCP tools run but return validation error blobs instead of actual results.
1 parent 3600dd0 commit bfef196

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.1.70
4+
5+
### Bug Fixes
6+
7+
- Bumped minimum `mcp` dependency to `>=1.19.0`. Older versions cannot handle `CallToolResult` returns from in-process SDK MCP tool handlers (introduced in v0.1.51), causing tool results to be silently replaced with a pydantic validation error.
8+
39
## 0.1.69
410

511
### Documentation

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies = [
2828
"anyio>=4.0.0",
2929
"sniffio>=1.0.0",
3030
"typing_extensions>=4.0.0; python_version<'3.11'",
31-
"mcp>=0.1.0",
31+
"mcp>=1.19.0",
3232
]
3333

3434
[project.optional-dependencies]

0 commit comments

Comments
 (0)