Skip to content

v0.3.0 — mcp 2.x

Choose a tag to compare

@musharna musharna released this 31 Jul 00:52
cf86609

Migration to the mcp 2.x SDK. No change to what the tools do.

FastMCP was renamed, not removed — it is now mcp.server.mcpserver.MCPServer, and Image moved with it.

The dependency moves to mcp>=2,<3 rather than widening to <3. This package imports mcp.server.mcpserver, which does not exist in 1.x, so a range spanning both majors could resolve to a version that cannot import the server at all. mcp 2.x requires Python >=3.10, below this package's >=3.11 floor, so the support matrix is unchanged.

The one real API change behind the renames

call_tool now returns a CallToolResult — not a bare block sequence, and not a (content, structured) tuple. Tests read .content and .structured_content directly; the old res[0] if isinstance(res, tuple) else res shims were removed rather than extended, because under 2.x that shape sniff falls through and hands back the result object, moving the failure a long way from its cause.

mcp.types fields are snake_case (outputSchemaoutput_schema, readOnlyHintread_only_hint). Constructing ToolAnnotations still accepts camelCase via pydantic aliases, but reading the attributes does not — so construction would have stayed green while every read broke.

Full changelog: https://github.com/musharna/plantcv-mcp/blob/master/CHANGELOG.md