ai@7) and raises the minimum Node.js version to 22. Most upgrades are a dependency bump and a one-line image-reading change; the rest of the SDK API is unchanged.
Breaking changes
Node.js 22 or later required
@mcpjam/sdk now requires Node.js 22 or later. Node.js 18 and 20 are no longer supported.
AI SDK 7 (ai@7)
The SDK now depends on ai@7 and the v7 line of every model provider package. If your project imports from ai or any @ai-sdk/* package directly, upgrade those to their v7 releases as well.
MCP tool image parts changed shape
Model-visible MCP tool images are now emitted as AI SDK 7file parts:
PromptResult or a raw message array, replace direct property access with the new readModelOutputImage helper, which accepts all three historical shapes (file, media, and image-data):
readModelOutputImage returns null for any part that is not an image, so it is safe to call on every part in a loop.
@mcpjam/chat-ui peer dependency
If you use @mcpjam/chat-ui, update its peer dependencies:
What did not change
- The
HostRunner,HostRuntime,Host,MCPClientManager,EvalTest,EvalSuite, and all conformance suite APIs are unchanged. - Model string format (
provider/model-id) is unchanged. - Reporting, result upload, and CI integration are unchanged.
- The
@mcpjam/vitestand@mcpjam/widget-reactpackages updated their@mcpjam/sdkpeer to^9.0.0with no other changes.
Upgrade checklist
1
Check your Node.js version
2
Bump the SDK
3
Upgrade AI SDK peer dependencies
4
Replace image-part reads with readModelOutputImage
Search your codebase for direct reads of
.type === "media" or .type === "image-data" on message parts and replace them with readModelOutputImage(part).5
Update @mcpjam/chat-ui if used

