Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/tanstack/ai/ai-mcpnpx skills add TanStack/ai --skill ai-mcpgit clone --depth 1 https://github.com/TanStack/aiWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00069 | $0.07221 |
| Opus 5 | $0.00034 | $0.03610 |
| Sonnet 5 | $0.00014 | $0.01444 |
| Haiku 4.5 | $0.00007 | $0.00722 |
Grade A, and why
ai-mcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 855 lines — stays where its author put it; the contents beside it link to each section on GitHub.
@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.
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.
Do NOT use this package for browser/client-side code — MCP connections are server-side only.
Install
pnpm add @tanstack/ai-mcp
The package has two subpath exports:
.— main client API (createMCPClient,createMCPClients, converters, types)./stdio— Node-only stdio transport factory (stdioTransport); import it separately so edge bundles stay clean
createMCPClient — single server
import { createMCPClient } from '@tanstack/ai-mcp'
const client = await createMCPClient({
transport: { type: 'http', url: 'https://mcp.example.com/mcp' },
prefix: 'weather', // optional: prefixes all tool names (e.g. 'weather_get_forecast')
name: 'my-app', // optional: client identity sent to the server
})
createMCPClient connects immediately and returns an MCPClient. Throws
MCPConnectionError if the connection fails.
Transports
Streamable HTTP (default for internet-facing servers)
const client = await createMCPClient({
transport: {
type: 'http',
url: 'https://mcp.example.com/mcp',
headers: { Authorization: 'Bearer sk-...' },
},
})
SSE
const client = await createMCPClient({
transport: {
type: 'sse',
url: 'https://mcp.example.com/sse',
headers: { Authorization: 'Bearer sk-...' },
},
})
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 855 lines · 69 tokens per session scan A 21e582367454
ai-mcp is a skill published in the GitHub repository TanStack/ai (3,056 stars, last pushed today), licensed MIT. It adds 69 tokens to every session and 7,221 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
run-skill-generator
Author or improve the run- skill - a per-project skill that tells agents how to build, launch, and drive this project's app. Use when the user asks to set up the project, get it running, write run instructions, or verify build/run steps work from a clean environment.
schedule
Create, update, list, or run scheduled cloud agents (routines) that execute on a cron schedule.
skill-creator
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
clawhub
Search and install agent skills from ClawHub, the public skill registry.
composio
Route and complete Composio work across Composio For You and Composio Platform. Use when the user mentions Composio; wants an agent to use apps such as Gmail, Slack, GitHub, Notion, Calendar, or Linear; needs first-time setup, an SDK or MCP integration, CLI operation, migration guidance, current documentation, or help…
workflow-authoring
Reference for writing a Workflow tool script (script API and gotchas, resume, quality patterns, worked examples). Load before authoring a script for a workflow the user already opted into; it does not itself authorize running one.