The Routeplane MCP server exposes the gateway to AI coding assistants over the Model Context Protocol. Point Claude Code, Cursor, or VS Code Copilot at it and the assistant gains 33 curated tools — send completions through your governed gateway, inspect logs and FinOps, check sovereign-routing decisions, and drive the agentic-security surface — plus three read-only resources.
Do not confuse this with the gateway's own MCP gateway. This package is a client-side MCP server that gives your assistant tools to operate Routeplane. The gateway's agentic-security MCP gateway is a server-side policy boundary that governs an agent's tool calls. This page is about the former.
Install and connect
The server speaks MCP over stdio and ships as an npx-runnable binary, so most clients need only a small config block. Set your gateway key in the env — the server reads ROUTEPLANE_API_KEY first.
Claude Code
Add a routeplane server to your MCP config (project .mcp.json, or run claude mcp add):
{
"mcpServers": {
"routeplane": {
"command": "npx",
"args": ["-y", "@routeplane/mcp-server"],
"env": {
"ROUTEPLANE_API_KEY": "rp_live_...",
"ROUTEPLANE_BASE_URL": "https://api.routeplane.ai"
}
}
}
}
Cursor / VS Code
Both use the same shape. In Cursor add it to .cursor/mcp.json; in VS Code, to the mcp.servers settings block. The command, args, and env are identical to the block above.
Config resolution. The API key and base URL resolve in the same order as the CLI: ROUTEPLANE_API_KEY / ROUTEPLANE_BASE_URL environment first, then --api-key / --base-url args, then a ~/.routeplane/config.json profile (set ROUTEPLANE_PROFILE to pick one). If you already ran rp init, the server can pick up that profile with no env at all. Base URL defaults to https://api.routeplane.ai.
Tool reference
Each tool is annotated for the client: read-only tools are hinted as such, and the two destructive tools (delete_provider, purge_cache) carry a destructive hint so the assistant can prompt before running them.
Inference — 7 tools
| Tool | What it does |
|---|---|
chat_completion | Send a chat completion through the gateway, with fallback chains, strategy, and residency routing. |
embed_text | Generate embedding vectors for one or more input strings. |
rerank | Rerank a set of documents by relevance to a query. |
moderate | Run content moderation over the input text. |
image_generate | Generate an image from a text prompt. |
speech | Synthesize speech audio from text (returns a confirmation, not the raw audio). |
prompt_completion | Render a stored prompt template with variables and run it as a chat completion. |
Management — 8 tools
| Tool | What it does |
|---|---|
list_models | List available models, optionally filtered by provider. |
get_model | Get details for a single model by id. |
list_providers | List custom (self-registered) OpenAI-compatible providers. |
create_provider | Register a custom OpenAI-compatible provider (e.g. an Ollama/vLLM endpoint). |
delete_provider | Remove a previously registered custom provider. Destructive. |
get_prompt | Fetch a stored prompt template by reference. |
render_prompt | Render a prompt template with variables, without running a completion. |
submit_feedback | Attach a quality score and optional comment to a prior request by id. |
Observability — 9 tools
| Tool | What it does |
|---|---|
get_status | Gateway health, version, and per-provider circuit state. |
list_logs | Recent request logs. |
get_analytics | Recent usage analytics events. |
get_usage | FinOps usage export (aggregate spend and token counts). |
get_usage_daily | Daily usage rollups over an optional date range. |
get_timeseries | Usage timeseries suitable for charting. |
get_cache_savings | Response-cache savings rollup (requests and cost avoided). |
get_saver_metrics | Per-saver cost telemetry (cache, difficulty routing, token compression, …). |
get_latency | Per-tenant latency statistics. |
Config — 3 tools
| Tool | What it does |
|---|---|
purge_cache | Purge the gateway response cache for this tenant. Destructive. |
get_residency_summary | Summary of recent sovereign-routing residency decisions. |
get_residency_ledger | Recent entries from the sovereign residency ledger. |
Security — 6 tools
| Tool | What it does |
|---|---|
get_guardrail_outcomes | Guardrail detection telemetry (PII masking, blocked checks, verdicts). |
get_evaluations | Judge / evaluation scores recorded for recent requests. |
mcp_run_step | Execute one MCP agent tool-call step through the agentic-security gateway (default-deny). |
list_mcp_runs | List recent MCP agent runs. |
hitl_approve | Approve a pending human-in-the-loop decision. |
hitl_deny | Deny a pending human-in-the-loop decision, with an optional reason. |
Resources
Alongside the tools, the server publishes three read-only MCP resources an assistant can pull in as context:
| Resource | Contents |
|---|---|
routeplane://models | The model catalog available through the gateway. |
routeplane://providers | Self-registered OpenAI-compatible providers. |
routeplane://status | Health, version, and per-provider circuit state. |
Links
- @routeplane/mcp-server on npm ↗
- routeplane-core/routeplane-devtools on GitHub ↗
- CLI — the same operations from your terminal.
- Model Context Protocol ↗ — the open standard this implements.