Router Desk

HomeOpenRouter MCP

OpenRouter MCP

MCP here is a remote tool server. It does not replace the chat completions API in your app.

Updated 2026-09-27

OpenRouter hosts the MCP server. Nothing is installed from npm to get the server itself. You add one URL and approve OAuth in the browser. After that, the agent can list models, read prices, check your credit balance, and send a short test message.

Claude Code

claude mcp add --transport http openrouter https://mcp.openrouter.ai/mcp
claude mcp login openrouter

Inside a Claude Code session, /mcp and then Authenticate does the same login. Codex CLI uses codex mcp add openrouter --url https://mcp.openrouter.ai/mcp and codex mcp login openrouter. OpenCode takes a remote MCP block in ~/.config/opencode/opencode.json and starts OAuth on first use.

Use MCP while you are choosing a model. Production traffic should still call https://openrouter.ai/api/v1 with a key. The MCP login is not that key.

Questions

What is the OpenRouter MCP URL?

https://mcp.openrouter.ai/mcp

Does MCP spend credits?

Looking up models and prices does not run a completion. A test message the tool sends is a normal generation and can spend credits.

Do I paste my API key into MCP?

The documented flow is OAuth in the browser, via claude mcp login or the equivalent in your client.

  • Claude Code on OpenRouter

    Point Claude Code at https://openrouter.ai/api, put the OpenRouter key in ANTHROPIC_AUTH_TOKEN, and set ANTHROPIC_API_KEY to an empty string.

  • OpenCode and OpenRouter

    OpenCode is an open-source coding agent. Connect OpenRouter with /connect in the terminal, or the same credentials in the desktop app.

  • OpenRouter API URL

    The OpenRouter base URL is https://openrouter.ai/api/v1. Chat calls go to /chat/completions with a Bearer key.

  • Coding agents

    OpenRouter’s coding-agent apps include Claude Code, OpenCode, and others. The agent is the client. The model is the slug you attach.

Sources