Developer tools

MCP server for AI assistants

Give Claude Code, Cursor, or VS Code Copilot 33 gateway tools over the Model Context Protocol — completions, logs, FinOps, residency, and the agentic-security surface.

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):

json.mcp.json
{
  "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

ToolWhat it does
chat_completionSend a chat completion through the gateway, with fallback chains, strategy, and residency routing.
embed_textGenerate embedding vectors for one or more input strings.
rerankRerank a set of documents by relevance to a query.
moderateRun content moderation over the input text.
image_generateGenerate an image from a text prompt.
speechSynthesize speech audio from text (returns a confirmation, not the raw audio).
prompt_completionRender a stored prompt template with variables and run it as a chat completion.

Management — 8 tools

ToolWhat it does
list_modelsList available models, optionally filtered by provider.
get_modelGet details for a single model by id.
list_providersList custom (self-registered) OpenAI-compatible providers.
create_providerRegister a custom OpenAI-compatible provider (e.g. an Ollama/vLLM endpoint).
delete_providerRemove a previously registered custom provider. Destructive.
get_promptFetch a stored prompt template by reference.
render_promptRender a prompt template with variables, without running a completion.
submit_feedbackAttach a quality score and optional comment to a prior request by id.

Observability — 9 tools

ToolWhat it does
get_statusGateway health, version, and per-provider circuit state.
list_logsRecent request logs.
get_analyticsRecent usage analytics events.
get_usageFinOps usage export (aggregate spend and token counts).
get_usage_dailyDaily usage rollups over an optional date range.
get_timeseriesUsage timeseries suitable for charting.
get_cache_savingsResponse-cache savings rollup (requests and cost avoided).
get_saver_metricsPer-saver cost telemetry (cache, difficulty routing, token compression, …).
get_latencyPer-tenant latency statistics.

Config — 3 tools

ToolWhat it does
purge_cachePurge the gateway response cache for this tenant. Destructive.
get_residency_summarySummary of recent sovereign-routing residency decisions.
get_residency_ledgerRecent entries from the sovereign residency ledger.

Security — 6 tools

ToolWhat it does
get_guardrail_outcomesGuardrail detection telemetry (PII masking, blocked checks, verdicts).
get_evaluationsJudge / evaluation scores recorded for recent requests.
mcp_run_stepExecute one MCP agent tool-call step through the agentic-security gateway (default-deny).
list_mcp_runsList recent MCP agent runs.
hitl_approveApprove a pending human-in-the-loop decision.
hitl_denyDeny 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:

ResourceContents
routeplane://modelsThe model catalog available through the gateway.
routeplane://providersSelf-registered OpenAI-compatible providers.
routeplane://statusHealth, version, and per-provider circuit state.