What is an MCP server?
The Model Context Protocol (MCP) is a standard that lets an AI agent call external tools and resources over one common interface, instead of every agent needing hand-written glue code for every service it talks to. A client — Claude Desktop, Claude Code, Cursor, OpenCode, or a custom agent — connects to an MCP server and gets back a catalog of callable tools, each with a name, a description, and a schema. The agent decides when to call one; the server does the work and returns a result.
AnyRouter runs one such server that exposes your workspace — models, keys, presets, credits, conversations, and system status — as JSON-RPC tools. Instead of scripting a call to check your balance or list models, your assistant calls a tool directly over one stable endpoint:
https://anyrouter.dev/api/v1/mcpIt speaks JSON-RPC 2.0 over the Streamable HTTP transport, so any standard MCP client points at it without custom code.
What tools can an agent call?
The server surfaces a small, scoped tool catalog — enough for an agent to manage the workspace on your behalf without ever seeing your account password or full API surface:
| Tool | Purpose | Scope |
|---|---|---|
| list_models | Search the model catalog | None |
| get_credits | Balance and lifetime usage | read:credits |
| list_keys / create_key / revoke_key | Manage LLM API keys | read/write:llm-keys |
| list_presets | List workspace presets | read:presets |
| list_conversations | Search workspace conversations | read:llm-keys |
| get_system_status | Health snapshot across API, providers, smoke tests | None |
There's no chat tool in the catalog on purpose — inference stays on the Chat Completions, Messages, or Responses endpoints, so an agent calling MCP tools and an agent calling the model share the same account without the MCP layer sitting in the token path.
Connect a client in one step
Point your MCP client at the endpoint and authenticate once. Most desktop clients read a small JSON config block; the shape below works for Claude Desktop-style clients that support the Streamable HTTP transport:
{
"mcpServers": {
"anyrouter": {
"url": "https://anyrouter.dev/api/v1/mcp",
"headers": {
"Authorization": "Bearer ak_your_management_key"
}
}
}
}Authentication is an OAuth 2.1 bearer token, or a static key: an LLM key (sk-ar-v1-…, which grants list_models only) or a management key (ak_…) carrying whatever scopes the tools you call require. Full client-by-client setup for Claude Desktop, Claude Code, Cursor, and OpenCode lives at /docs/api-reference/mcp.
Managed access, not per-client config files
On the OAuth consent screen, the user picks one scope bundle — Read-only, Standard, or Full — and can downgrade from what a client requests; a tool call outside the granted bundle returns a permission-denied error instead of silently succeeding. The dashboard's MCP Gateway tab is where this is managed day to day: connect clients, see which tools are exposed to which client, and read the same audit trail you already use for inference — so adding or revoking a tool doesn't mean re-editing every client's config file by hand.

MCP manages the workspace; inference still goes through the API
An agent that has connected to the MCP server for account management still calls the model through the standard, OpenAI-compatible surface — same key, same base URL:
from openai import OpenAI
client = OpenAI(
base_url="https://anyrouter.dev/api/v1",
api_key="sk-ar-v1-...",
)
resp = client.chat.completions.create(
model="anthropic/claude-opus-4-8",
messages=[{"role": "user", "content": "Hello"}],
)That separation is deliberate: MCP tools are for managing the workspace an agent operates in, not for routing tokens through an extra hop.
Connect the AnyRouter MCP server to Claude Desktop, Cursor, or Claude Code — free.
Get a key freeRoute your first request in 2 minutes
Start free with your own keys, or top up and pay per token. Get $4/mo in credits and free models on Go — $2/mo, or free when you donate a provider key.
Start free