- MCP Server ToolsUpdated
- Managed MCP with chat()Updated
- Manual MCPUpdated
- MCP Type GenerationUpdated
- MCP Client InputUpdated
- MCP Server Tools: AdvancedNew
- MCP EventsNew
- MCP AppsUpdated
- Serve Tools over HTTPUpdated
- Serve Resources and PromptsUpdated
- Ask for InputUpdated
- Draft Text from a ToolUpdated
- MCP Server TasksUpdated
- MCP Server AuthUpdated
- MCP Server SessionsUpdated
- MCP Server on stdioUpdated
Persistence (Advanced)
- GenerationsUpdated
- Realtime Voice ChatUpdated
- Text-to-SpeechUpdated
- TranscriptionUpdated
- Transcription: AdvancedNew
- Voice CreationUpdated
- Audio RecordingUpdated
- Audio GenerationUpdated
- Image GenerationUpdated
- Image Generation: AdvancedNew
- Video GenerationUpdated
- Video Generation: AdvancedNew
- Live GenerationUpdated
- World GenerationUpdated
- Generation HooksUpdated
- OverviewUpdated
- Quick StartUpdated
- ProvidersUpdated
- HarnessesUpdated
- Harness AuthUpdated
- WorkspaceUpdated
- ToolsUpdated
- PolicyUpdated
- Lifecycle & SnapshotsUpdated
- Portable SnapshotsUpdated
- Keep Files After ReloadUpdated
- Save a Named VersionUpdated
- Branch From a VersionUpdated
- Send a Frozen FileUpdated
- Let the Agent Save and ForkUpdated
- Pick Which Files to KeepUpdated
- What a Snapshot StoresUpdated
- Instance DurabilityUpdated
- Durable RunsUpdated
- EventsUpdated
Sandboxes (Advanced)
- Runtime ContextUpdated
- Bring Your Own KeyUpdated
- Debug LoggingUpdated
- Multimodal ContentUpdated
- Files APIUpdated
- Per-Model Type SafetyUpdated
- Runtime Adapter SwitchingUpdated
- Tree-ShakingUpdated
- Extend AdapterUpdated
- Extend Adapter: AdvancedNew
- Typed Pre-Configured OptionsUpdated
- Test with a Fake ModelUpdated
- Prompt CachingUpdated
- Mid-Conversation ChangesUpdated
- Approval Flow ProcessingUpdated
MCP SDK packages
@tanstack/ai-mcp imports the MCP v2 packages. An import from @modelcontextprotocol/sdk does not resolve.
- A client app imports @modelcontextprotocol/client.
- A server app imports @modelcontextprotocol/server.
Upgrade#
If your app imports @modelcontextprotocol/sdk, run the MCP codemod from the app root:
shellnpx @modelcontextprotocol/codemod@latest v1-to-v2 .The codemod rewrites the imports from @modelcontextprotocol/sdk. It also rewrites the dependencies in package.json.
If your app does not import @modelcontextprotocol/sdk, remove that dependency.
The codemod comes from the MCP project. TanStack AI does not ship its own codemod for this change.
This is what the codemod does to your imports:
- import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'
- import type { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js'
+ import {
+ StreamableHTTPClientTransport,
+ type OAuthClientProvider,
+ } from '@modelcontextprotocol/client'
- import { Server } from '@modelcontextprotocol/sdk/server/index.js'
+ import { Server } from '@modelcontextprotocol/server'Protocol version#
You do not change your createMCPClient call. Keep the same transport configuration.
createMCPClient tries protocol 2026-07-28 first. If the server does not support that protocol, the client uses the 2025 initialize handshake.
Done#
Your app has no @modelcontextprotocol/sdk import, and createMCPClient connects to your server with the same transport configuration. For the full MCP setup, see MCP Server Tools.