← Back to directory
O

OpenRouter MCP Server

Community
MCP server for OpenRouter.ai integration
Category
Dev Tools #272 of 438
Stars
★ 64 Popular
Transport
stdio (local process)
Runtime
Node.js
Credentials
API key / credential required
License
Apache-2.0
Last commit
⚠
Tools
4
49FMRS · D

This server provides a clear unified response format and error handling, with flexible configuration, but depends on the OpenRouter service.

Strongest · Documentation 14/20 Weakest · Reliability 6/20

Reliability
6/20
Security and permissions
10/20
Maintenance
8/20
Documentation
14/20
Setup experience
11/20
Why each score
Reliability 6/20
Source code is not available, so tool implementation cannot be verified. README describes a unified ToolResult structure and error handling, but there is no test or CI evidence. Static review confirms a clear list of tools and input schemas, but actual execution behavior is unconfirmed. Deductions: lack of actual tests and workflows.
Security and permissions 10/20
Evidence is only from the README. API key is handled via environment variable, which is standard. No hardcoded tokens or obvious malicious behavior found. However, no source code or security audit available to assess least privilege and data boundaries. Red lines not triggered since no dangerous defaults or secrets found. Deductions: no source verification, limited security assessment.
Maintenance 8/20
Repository is active with 63 stars and 3 open issues. License is Apache-2.0. There is a CHANGELOG and CONTRIBUTING file. However, no commit history or release history available, so sustained maintenance is unconfirmed. Version 2.2.0 is claimed but not verified. Deductions: missing version control details.
Documentation 14/20
README provides thorough setup instructions, including environment variables, client configuration, and tool input schema examples. Error categories are covered. Seems to have a good documentation structure. Possibly missing troubleshooting section. Based on static evidence, documentation looks robust.
Setup experience 11/20
Installation command is standard npm/pnpm package. Client configuration JSON example provided. API key required. This appears to be a simple setup process. Without actual runtime execution, all dependencies and compatibility cannot be confirmed. Static verification limited, so not above 15.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessUses the network

Best for

  • Developers
  • AI applications needing access to multiple AI models
  • MCP client users

Not for

  • Fully offline environments
  • Users needing a native OpenAI API-compatible endpoint (though this server provides a unified wrapper)

Required permissions

  • Requires OPENROUTER_API_KEY
  • Network access to OpenRouter API
  • Local Node.js process running

Risks and side effects

  • API key leakage risk
  • Dependency on OpenRouter service availability
  • Misconfiguration of models could cause request failures

Setup

Before you start

Runtime:Node.js

OPENROUTER_API_KEY requiredsecret Required OpenRouter API key, obtainable at https://openrouter.ai/keys.
Other optional settings (9)
OPENROUTER_DEFAULT_MODEL optional Optional default model used when none is specified in the request, e.g. openrouter/auto.
OPENROUTER_MAX_TOKENS optional Optional default max tokens when max_tokens is not provided in the request.
OPENROUTER_PROVIDER_QUANTIZATIONS optional Optional default quantization levels filter (e.g. fp16,int8).
OPENROUTER_PROVIDER_IGNORE optional Optional default provider names to exclude.
OPENROUTER_PROVIDER_SORT optional Optional default provider sort order: price, throughput or latency.
OPENROUTER_PROVIDER_ORDER optional Optional default prioritized provider list as a JSON array string.
OPENROUTER_PROVIDER_REQUIRE_PARAMETERS optional Optional default boolean requiring providers to support all request parameters.
OPENROUTER_PROVIDER_DATA_COLLECTION optional Optional default data collection policy: allow or deny.
OPENROUTER_PROVIDER_ALLOW_FALLBACKS optional Optional default boolean controlling fallback to other providers.
  1. Install Node.js and pnpm.
  2. Run pnpm install @mcpservers/openrouterai.
  3. Obtain an OpenRouter API key.
  4. Configure your MCP client (e.g., Claude Desktop or Cline) with the environment variable OPENROUTER_API_KEY. Optionally set OPENROUTER_DEFAULT_MODEL and others.
claude_desktop_config.json
{
  "mcpServers": {
    "openrouterai": {
      "command": "npx",
      "args": [
        "@mcpservers/openrouterai"
      ],
      "env": {
        "OPENROUTER_API_KEY": "your-api-key-here",
        "OPENROUTER_DEFAULT_MODEL": "optional-default-model",
        "OPENROUTER_MAX_TOKENS": "1024",
        "OPENROUTER_PROVIDER_QUANTIZATIONS": "fp16,int8",
        "OPENROUTER_PROVIDER_IGNORE": "openai,anthropic"
      }
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "openrouterai": {
      "command": "npx",
      "args": [
        "@mcpservers/openrouterai"
      ],
      "env": {
        "OPENROUTER_API_KEY": "your-api-key-here",
        "OPENROUTER_DEFAULT_MODEL": "optional-default-model",
        "OPENROUTER_MAX_TOKENS": "1024",
        "OPENROUTER_PROVIDER_QUANTIZATIONS": "fp16,int8",
        "OPENROUTER_PROVIDER_IGNORE": "openai,anthropic"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add openrouterai -e OPENROUTER_API_KEY=your-api-key-here -e OPENROUTER_DEFAULT_MODEL=optional-default-model -e OPENROUTER_MAX_TOKENS=1024 -e OPENROUTER_PROVIDER_QUANTIZATIONS=fp16,int8 -e OPENROUTER_PROVIDER_IGNORE=openai,anthropic -- npx @mcpservers/openrouterai

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Check that the client's tool list shows chat_completion, search_models, get_model_info and validate_model; then call validate_model on a model ID — a response of { isError: false, valid: true } confirms the connection works.

Troubleshooting

  1. Ensure OPENROUTER_API_KEY is valid and not expired
  2. Check network connectivity and proxy settings
  3. Verify model IDs are correct using the validate_model tool
  4. Inspect error categories (Validation, API, Rate Limit, Internal) to take appropriate action

Things to try

Once connected, you can ask your AI assistant things like:

  • Search OpenRouter models with vision capability and at least 128k context length
  • Get detailed info for the openai/gpt-4o model
  • Validate whether anthropic/claude-3-haiku is a valid model ID
  • Write a short explanation of quantization using anthropic/claude-3-haiku with a 500 token limit

Tools 4

chat_completion writes
Sends a request to the OpenRouter Chat Completions API, supporting model selection, messages, temperature, max_tokens, and provider routing configuration.
search_models read-only
Search and filter available models by query, provider, minimum context length, and capabilities.
get_model_info read-only
Get detailed information about a specific model.
validate_model read-only
Check if a model ID is valid.

Use cases

Call multiple AI models on OpenRouter from MCP clients
Centralize model routing, provider selection, and parameter configuration
Build AI applications requiring flexible model selection and fallback mechanisms

Supported clients

Claude Desktop
Cline

Listed from the project's documentation, not tested by this site.

Overview

The OpenRouter MCP server provides seamless integration with OpenRouter.ai's diverse model ecosystem. Access various AI models through a unified, type-safe interface with built-in caching, rate limiting, and error handling.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.9k · Tools 2 Compare with this →

Source revision 3678d309d893 Data synced 2026-10-12 Read the FMRS scoring method