Connector guide7-minute read13 MCP tools7 languages

How to Connect OpenRouter to Claude via MCP

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check what the key has spent, look up past generations, and send chat completions, embeddings and image requests to any model.

HCBy HelpCode teamUpdated 7 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

OpenRouter

OpenRouter

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check the key's spending, look up past generations, and send chat completions, embeddings and image requests to any model.

tools

13

Region

INTL

Category

Public Data

Authentication

Bearer Token

Required env vars

OPENROUTER_API_KEY
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the OpenRouter in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

AnythingMCP is listed in Claude's connector directory: add it to Claude in one click (opens in a new tab), then sign in and choose which MCP servers Claude may use.

Summary

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check what the key has spent, look up past generations, and send chat completions, embeddings and image requests to any model.

Try asking

Example prompts for OpenRouter

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

OpenRouter · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → OpenRouter, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

OpenRouter + Claude

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check what the key has spent, look up past generations, and send chat completions, embeddings and image requests to any model.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

OPENROUTER_API_KEY

Step 1 — Get credentials

Setting up takes about 2 minutes. You need an OpenRouter account.

  1. Sign in at https://openrouter.ai and add credits under Settings, Credits. Free :free models work without credits, within daily limits.
  2. Open Settings, API Keys (https://openrouter.ai/settings/keys), click Create Key, give it a name and, strongly recommended, a credit limit: the key can spend the account balance up to that limit.
  3. Paste the key, which starts with sk-or-v1-, into OPENROUTER_API_KEY. It is sent as Authorization: Bearer. A management key does not work here. Requests carry HTTP-Referer and X-OpenRouter-Title headers that name AnythingMCP as the calling app on OpenRouter.
  4. Install the connector and run openrouter_get_current_key to check the key.

What it reads (free):

  • The model catalog with openrouter_list_models: model ids, context length, prices, input and output modalities, supported parameters and reasoning support, with filters such as q, category, supported_parameters=tools, max_price and context, and server-side sorting like sort=pricing-low-to-high. openrouter_list_user_models shows the models this key may actually use under the account's provider preferences, privacy settings and guardrails.
  • One model with openrouter_get_model, the provider endpoints that serve it with openrouter_list_model_endpoints (price, context and output limits, quantization, status, uptime, latency and throughput over the last 30 minutes), and openrouter_list_providers for provider slugs, headquarters, datacenter countries and policy links.
  • Quality and popularity: openrouter_list_benchmarks (Artificial Analysis, Design Arena and OpenRouter's own evals) and openrouter_get_model_rankings (top 50 models by tokens per day, week or month, data from 2025-01-01).
  • Spending: openrouter_get_current_key shows the key's limit, limit_remaining, usage today, this week, this month and in total, budgets and free-tier status. openrouter_get_generation gives the exact cost, tokens, latency and provider of one call (its id is the id of the completion and can take a few seconds to appear), and openrouter_get_generation_content the stored prompt and output when prompt logging is on.

What costs money: openrouter_chat_completion (with model and messages; models adds fallbacks, provider steers routing by order, only, price or throughput, data_collection: deny or zdr, response_format asks for JSON, reasoning sets the effort), openrouter_create_embeddings and openrouter_generate_image (returned as image content). They are billed to the account unless a :free model is used. Every tool is on at install, so the AI confirms the model and the purpose before larger or repeated calls and sets max_completion_tokens to cap a reply.

Data formats: model ids are author/slug (openai/gpt-4o), with variants :free (free, rate limited), :online (web search), :nitro (fastest provider), :floor (cheapest) and :thinking. Catalog prices are strings in USD per token ("0.0000025" is 2.50 USD per million tokens); request and image are per request or per image. The max_price filters and the routing max_price take USD per million tokens. Costs and usage in key and generation answers are USD. A completion returns choices[0].message.content, a finish_reason (stop, length when the token cap was hit, tool_calls, content_filter), usage with token counts and cost, and provider. created is Unix seconds; dates are UTC.

Paging: the model list tools return 50 models by default; the AI passes offset 50, 100 and so on with the same limit until a page comes back shorter, and prefers filters and sort over reading the whole catalog.

Limits: :free models allow 20 requests a minute and 50 a day, or 1,000 a day once 10 USD of credits were ever bought. Paid models are limited by the account balance, the key's credit limit and any budgets an organization admin set. Benchmarks allow 30 requests a minute per key.

Common errors: 401 means an invalid or disabled key. 402 means not enough credits or the key's limit is used up (error.metadata.limit_source says which; add credits or raise the limit). 403 is a guardrail or moderation block, 404 an unknown model or generation, 408 a timeout, 429 a rate limit (wait, or use a paid variant), 502 a failure of the model's provider, and 503 no provider matching the routing requirements (relax provider). A provider error during generation can arrive with HTTP 200 and an error object; it is reported as a failed call.

The connector does not show the whole account's credit balance, activity reports or analytics and does not manage keys, because those need a separate management key. Streaming, the legacy text completions endpoint, batches, video and audio are not exposed either.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Claude

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Recommended path: works on claude.ai web without editing any config file.

  1. In Claude, open Customize → Connectors.
  2. Click +, then Add custom connector.
  3. Enter a name, e.g. OpenRouter, and the remote MCP server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID, then click Add.
  4. Click Connect and sign in to AnythingMCP (OAuth) to allow access.

All tools below appear in your chat: start typing prompts.

Available tools

ToolWhat it does
openrouter_list_modelsSearch the OpenRouter model catalog (public, no cost): model ids, context length, prices per token, input and output modalities, supported…
openrouter_list_user_modelsList the models this API key may actually use, after the account's provider preferences, privacy settings and guardrails are applied
openrouter_get_modelFull details of one model by author and slug (openai/gpt-4o): description, context length, pricing, modalities, supported and default…
openrouter_list_model_endpointsList the provider endpoints that serve one model: provider name and tag, price per token, context and output limits, quantization…
openrouter_list_providersList the inference providers OpenRouter routes to, with slug, name, headquarters, datacenter countries and links to their privacy policy…
openrouter_list_benchmarksBenchmark scores of models from Artificial Analysis (intelligence, coding and agentic indices), Design Arena (ELO) and OpenRouter's own…
openrouter_get_model_rankingsPublic OpenRouter usage rankings: the top 50 models by tokens processed per day, week or month, plus one aggregated other row per period…
openrouter_get_current_keySpending and limits of the API key in use: label, credit limit and what remains of it, reset interval, usage today, this week, this month…
openrouter_get_generationCost and metadata of one past generation by its id: model, provider that served it, total cost in USD, prompt, completion and reasoning…
openrouter_get_generation_contentThe stored prompt, completion, reasoning and error of one past generation by its id
openrouter_chat_completionSend a conversation to a model and return its reply (non-streaming)
openrouter_create_embeddingsTurn one text or a list of texts into embedding vectors with an embeddings model
openrouter_generate_imageGenerate images from a text prompt with an image model and return them as images

Example prompts

  • "Which models with tool calling and at least 128K context cost less than 1 USD per million input tokens?"
  • "Compare the providers that serve deepseek/deepseek-chat by price, uptime and throughput."
  • "How much has this API key spent this month, and how much of its limit is left?"
  • "Ask google/gemini-2.5-flash to summarise this text in five bullet points, with at most 500 output tokens."
  • "Which models are in the top 10 by tokens this week, and how do they score on the coding benchmarks?"

FAQ

Does it work with Claude Code as well as Claude Desktop? Yes, point both at https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID.

Next steps

Was this guide helpful?

Your OpenRouter agent is one click away.

Install the connector, paste the key, prompt Claude. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect OpenRouter to ChatGPT via MCP

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check what the key has spent, look up past generations, and send chat completions, embeddings and image requests to any model.

Connectors

How to Connect OpenRouter to Microsoft Copilot via MCP

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check what the key has spent, look up past generations, and send chat completions, embeddings and image requests to any model.

Connectors

How to Connect OpenRouter to Cursor via MCP

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check what the key has spent, look up past generations, and send chat completions, embeddings and image requests to any model.

Connectors

How to Connect OpenRouter to Gemini via MCP

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check what the key has spent, look up past generations, and send chat completions, embeddings and image requests to any model.

Connectors

How to Connect OpenRouter to Meta Muse via MCP

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check what the key has spent, look up past generations, and send chat completions, embeddings and image requests to any model.

Connectors

OpenRouter to MCP: Model Catalog, Prices, Benchmarks, Key Spending and Completions in any AI Agent

OpenRouter, one API for hundreds of AI models: search the model catalog with prices, providers, benchmarks and rankings, check what the key has spent, look up past generations, and send chat completions, embeddings and image requests to any model.