The TanStack MCP Server provides 5 tools for accessing documentation, NPM statistics, and ecosystem recommendations.
List all available TanStack libraries with their metadata.
| Parameter | Type | Required | Description |
|---|---|---|---|
| group | string | No | Filter by group: state, headlessUI, performance, or tooling |
{
"name": "list_libraries",
"arguments": {
"group": "state"
}
}
Fetch a specific documentation page by library and path.
| Parameter | Type | Required | Description |
|---|---|---|---|
| library | string | Yes | Library ID (e.g., query, router, table, form) |
| path | string | Yes | Documentation path (e.g., framework/react/overview, framework/react/guides/queries) |
| version | string | No | Version (e.g., v5, v1). Defaults to latest |
{
"name": "doc",
"arguments": {
"library": "query",
"path": "framework/react/guides/queries",
"version": "v5"
}
}
Most TanStack libraries follow this path structure:
Where {framework} is one of: react, vue, solid, svelte, angular
Full-text search across all TanStack documentation.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search query |
| library | string | No | Filter to specific library (e.g., query, router) |
| framework | string | No | Filter to specific framework (e.g., react, vue, solid) |
| limit | number | No | Maximum results (default: 10, max: 50) |
{
"name": "search_docs",
"arguments": {
"query": "useQuery refetch",
"library": "query",
"framework": "react",
"limit": 5
}
}
NPM download statistics for TanStack org, individual libraries, or package comparisons.
| Parameter | Type | Required | Description |
|---|---|---|---|
| library | string | No | TanStack library ID (e.g., query, router) |
| packages | string[] | No | NPM packages to compare (max 10) |
| preset | string | No | Preset comparison ID (e.g., data-fetching) |
| listPresets | boolean | No | List available preset comparisons |
| range | string | No | Time range: 30d, 90d, 180d, 1y, 2y, all. Default: 90d |
| bin | string | No | Aggregation: monthly, weekly, daily. Default: monthly |
The tool operates in different modes based on which parameters are provided:
Org summary (no params):
{
"org": "tanstack",
"totalDownloads": 1234567890,
"ratePerDay": 5000000,
"libraries": [{ "id": "query", "downloads": 500000000, "packages": 12 }]
}
Package comparison:
{
"range": { "start": "2024-01-01", "end": "2024-03-31" },
"bin": "monthly",
"packages": [
{
"name": "@tanstack/react-query",
"total": 15000000,
"avgPerDay": 165000,
"data": [{ "date": "2024-01-01", "downloads": 5000000 }]
}
]
}
// Org summary
{ "name": "npm_stats", "arguments": {} }
// Library breakdown
{ "name": "npm_stats", "arguments": { "library": "query" } }
// Compare packages
{
"name": "npm_stats",
"arguments": {
"packages": ["@tanstack/react-query", "swr", "@apollo/client"],
"range": "1y",
"bin": "monthly"
}
}
// Use preset
{ "name": "npm_stats", "arguments": { "preset": "data-fetching" } }
// List presets
{ "name": "npm_stats", "arguments": { "listPresets": true } }
Use listPresets: true to see all available presets. Common ones include:
Ecosystem partner recommendations filtered by category or TanStack library.
| Parameter | Type | Required | Description |
|---|---|---|---|
| category | string | No | Filter by category: database, auth, deployment, monitoring, cms, api, data-grid, code-review, learning |
| library | string | No | Filter by TanStack library (e.g., start, router, query) |
{
"name": "ecosystem",
"arguments": {
"category": "database",
"library": "start"
}
}
Search results include URLs that reveal the documentation path structure. For example, a URL like https://tanstack.com/query/latest/docs/framework/react/guides/queries indicates:
For understanding library internals beyond what documentation provides (implementation details, type definitions, test patterns), clone the relevant repository directly:
| Library | Clone Command |
|---|---|
| Query | git clone --depth 1 https://github.com/tanstack/query |
| Router/Start | git clone --depth 1 https://github.com/tanstack/router |
| Table | git clone --depth 1 https://github.com/tanstack/table |
| Form | git clone --depth 1 https://github.com/tanstack/form |
| Virtual | git clone --depth 1 https://github.com/tanstack/virtual |
| Store | git clone --depth 1 https://github.com/tanstack/store |
| DB | git clone --depth 1 https://github.com/tanstack/db |
Then use native file tools (grep, read) to explore implementations, types, and tests.
