The TanStack MCP Server is available at https://tanstack.com/api/mcp and uses the Streamable HTTP transport.
There are two ways to authenticate with the TanStack MCP server:
MCP clients that support OAuth can authenticate automatically. Just use the server URL and your client will open a browser window to authorize access:
https://tanstack.com/api/mcp
No API key needed. Your client handles the OAuth flow automatically.
For clients that don't support OAuth, or if you prefer manual key management:
Replace YOUR_API_KEY in the examples below with your actual API key.
Claude Desktop supports OAuth authentication. Add to your config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"tanstack": {
"url": "https://tanstack.com/api/mcp"
}
}
}
Restart Claude Desktop. On first use, a browser window will open to authorize access.
{
"mcpServers": {
"tanstack": {
"command": "npx",
"args": ["mcp-remote", "https://tanstack.com/api/mcp"],
"env": {
"MCP_HEADERS": "Authorization: Bearer YOUR_API_KEY"
}
}
}
}
claude mcp add tanstack https://tanstack.com/api/mcp
On first use, a browser window will open to authorize access.
claude mcp add --transport http tanstack https://tanstack.com/api/mcp --header "Authorization: Bearer YOUR_API_KEY"
Add to your Cursor MCP configuration:
{
"mcpServers": {
"tanstack": {
"url": "https://tanstack.com/api/mcp"
}
}
}
{
"mcpServers": {
"tanstack": {
"command": "npx",
"args": ["mcp-remote", "https://tanstack.com/api/mcp"],
"env": {
"MCP_HEADERS": "Authorization: Bearer YOUR_API_KEY"
}
}
}
}
Add to your VS Code settings or .vscode/mcp.json:
{
"servers": {
"tanstack": {
"url": "https://tanstack.com/api/mcp"
}
}
}
{
"servers": {
"tanstack": {
"type": "http",
"url": "https://tanstack.com/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Add to your OpenCode MCP configuration in ~/.config/opencode/config.json:
{
"mcp": {
"servers": {
"tanstack": {
"type": "remote",
"url": "https://tanstack.com/api/mcp"
}
}
}
}
After adding the config, run the auth flow manually the first time:
npx mcp-remote auth https://tanstack.com/api/mcp
This opens a browser to authorize access. After that, OpenCode will connect automatically.
{
"mcp": {
"servers": {
"tanstack": {
"type": "remote",
"url": "https://tanstack.com/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
}
Add to your Windsurf MCP configuration:
{
"mcpServers": {
"tanstack": {
"serverUrl": "https://tanstack.com/api/mcp"
}
}
}
{
"mcpServers": {
"tanstack": {
"serverUrl": "https://tanstack.com/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Use the MCP Inspector to test the server interactively:
npx @modelcontextprotocol/inspector https://tanstack.com/api/mcp
npx @modelcontextprotocol/inspector https://tanstack.com/api/mcp --header "Authorization: Bearer YOUR_API_KEY"
For custom integrations, the server accepts standard MCP requests via HTTP:
The server supports OAuth 2.1 with PKCE for secure authentication:
Example request using curl with an API key:
curl -X POST https://tanstack.com/api/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
API requests are rate-limited to protect the service:
After connecting, ask your AI assistant to list TanStack libraries:
"Use the TanStack MCP to list all available libraries"
You should see a list of all TanStack libraries with their versions and descriptions.
