Openrouterai MCP Server

MCP server for OpenRouter.ai integration

Local serverstdioTypeScript

What is the Openrouterai MCP Server?

MCP server for OpenRouter.ai integration

What it actually does

A Model Context Protocol (MCP) server providing 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.

  • Model Access —
  • Direct access to all OpenRouter.ai models
  • Automatic model validation and capability checking
  • Default model configuration support
  • Performance Optimization —
  • Smart model information caching (1-hour expiry)

Configuration

  1. Get your OpenRouter API key from OpenRouter Keys 2. Choose a default model (optional)

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
chat_completionThis example requests a completion from anthropic/claude-3-haiku, limits the response to 500 tokens. It specifies provider routing options: prefer fp16 quantized models, ignore openai providers, sort remaining providers
search_models
get_model_info
validate_model// Response: // Success: { isError: false, valid: true } // Error: { isError: true, error: "Model not found" }

How to install the Openrouterai MCP Server

claude mcp add openrouterai --env OPENROUTER_API_KEY=your-value --env OPENROUTER_DEFAULT_MODEL=your-value --env OPENROUTER_MAX_TOKENS=your-value --env OPENROUTER_PROVIDER_QUANTIZATIONS=your-value --env OPENROUTER_PROVIDER_IGNORE=your-value -- npx -y @mcpservers/openrouterai

Configuration

  1. Get your OpenRouter API key from OpenRouter Keys 2. Choose a default model (optional)
VariableDescriptionRequired
OPENROUTER_API_KEYCredential the server authenticates with.Yes
OPENROUTER_DEFAULT_MODELConfiguration value read at startup.Optional
OPENROUTER_MAX_TOKENSCredential the server authenticates with.Yes
OPENROUTER_PROVIDER_QUANTIZATIONSConfiguration value read at startup.Optional
OPENROUTER_PROVIDER_IGNOREConfiguration value read at startup.Optional

Example prompts to try

  • “Use Openrouterai to Prerequisites.”
  • “Use Openrouterai to Setup.”
  • “Use Openrouterai to chat completion.”

Frequently asked questions

MCP server for OpenRouter.ai integration Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.