OpenRouter MCP
Intro
OpenRouter MCP is a remote Model Context Protocol (MCP) server hosted by OpenRouter at https://mcp.openrouter.ai/mcp . Product page: https://openrouter.ai/mcp ; docs: https://openrouter.ai/docs/guides/overview/mcp-server .
It plugs OpenRouter into agents and coding tools you already use—Claude Code, Codex CLI, OpenCode, Cursor, or any MCP client—so the assistant can pull live OpenRouter data and run selected generation tools without installing a local server.
Highlights:
- Live catalog & account data: models, prices, endpoints, rankings, docs search, remaining credits;
- Billable inference tools (charged to the connected OpenRouter account): e.g. test messages and image generation; the product surface also covers speech/video generation workflows described on the MCP page;
- Auth: browser OAuth (dedicated MCP key, typically 7-day expiry with a default $10 spend cap) or
Authorization: Bearer <OPENROUTER_API_KEY>for clients without OAuth; - Transport: Streamable HTTP remote MCP—nothing installed locally.
Explain
Problem
Coding agents often guess model names, prices, and capability from stale training data. Teams also leave the editor to open dashboards just to check credits or try a prompt. OpenRouter MCP keeps that loop inside the agent.
How it works
- Add the remote URL
https://mcp.openrouter.ai/mcpin your MCP client; - Complete OAuth (or pass an API key as Bearer). OpenRouter mints a dedicated key labeled for MCP use;
- Tools proxy the public OpenRouter API with that key—live data, no local state. Source code is not sent unless you call generation/feedback tools.
Documented tools include list-models, get-model, list-model-endpoints, get-credits, list-daily-model-rankings, list-benchmarks, search-docs, send-message, generate-image, and others (see the docs tool table).
Limits
- MCP is for building/choosing models inside the agent; production app inference still goes through the normal OpenRouter API;
- MCP keys expire (commonly within 7 days) and may need re-auth;
- Generation tools are billable—watch the spend cap.
Usage
Who it's for
- Developers using Claude Code, Codex, OpenCode, Cursor, or other MCP clients who route models via OpenRouter;
- Teams that want in-editor model discovery, credit checks, and quick prompt tests against live OpenRouter data.
Getting started
- Read https://openrouter.ai/mcp and https://openrouter.ai/docs/guides/overview/mcp-server ;
- Add the server, e.g. Claude Code:
claude mcp add --transport http openrouter https://mcp.openrouter.ai/mcpthenclaude mcp login openrouter; - Cursor: put
{ "mcpServers": { "openrouter": { "url": "https://mcp.openrouter.ai/mcp" } } }in~/.cursor/mcp.jsonand authenticate; - Prefer
list-models/ rankings / benchmarks before hard-coding a model; treat generation tool calls as paid API usage.
Advertisement