ai-mcp
Installation
SKILL.md
@tanstack/ai-mcp
This skill covers the @tanstack/ai-mcp package. Read ai-core/tool-calling/SKILL.md
first — MCP tools flow into chat() the same way hand-written tools do.
If you host the tools yourself, use createMCPServer.
When to use this package
Use @tanstack/ai-mcp when:
- A third-party MCP server exposes tools you want an agent or chat loop to call.
- You want to read MCP server resources (files, text, data) or prompts into a
chat()message list. - You want generated TypeScript types for an external MCP server's tool
signatures (via the bundled
generateCLI). - You are running tool execution on the server side and want to connect to MCP servers with HTTP (Streamable HTTP or SSE) or stdio transports.
- You want to expose your own tools as an MCP server over HTTP or stdio.