OpenRouter MCP Server
Provides tools for discovering and querying Google models available on OpenRouter, including model listing, search, comparison, and detailed metadata retrieval.
Provides tools for discovering and querying OpenAI models available on OpenRouter, including model listing, search, comparison, and detailed metadata retrieval for GPT models.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenRouter MCP Serversearch for vision models under $3 per million tokens"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenRouter MCP Server
MCP (Model Context Protocol) server for discovering and querying 300+ AI models available on OpenRouter.
Features
List models — Browse all available models with pricing, context limits, and capabilities
Search & filter — Find models by provider, price, context length, features (tools, vision, etc.)
Compare models — Side-by-side comparison of multiple models
Get details — Full metadata for any specific model
Cached responses — 5-minute cache to reduce API calls
Related MCP server: Model Hub MCP
Installation
pip install openrouter-mcpUsage
With OpenClaw
Add to your openclaw.json MCP servers config:
{
"mcp": {
"servers": {
"openrouter-models": {
"command": "openrouter-mcp",
"env": {
"OPENROUTER_API_KEY": "your-api-key"
}
}
}
}
}Then restart the gateway. Agents can now use the MCP tools to query OpenRouter models.
Note:
OPENROUTER_API_KEYis optional but recommended for higher rate limits (200 req/min vs 20 req/min). Get your key at: https://openrouter.ai/keys
Example agent usage:
# Agent can now call MCP tools like:
list_models(sort_by="context_length")
search_models(query="claude", max_input_price=5.0)
get_model(model_id="anthropic/claude-sonnet-4.6")
compare_models(model_ids="qwen/qwen3.6-plus,anthropic/claude-sonnet-4.6")Standalone (stdio)
export OPENROUTER_API_KEY=your-key
python -m openrouter_mcp.serverAvailable Tools
Tool | Description |
| List all models with optional modality filter and sorting |
| Get detailed info for a specific model by ID |
| Search and filter models by query, provider, price, context, features |
| Compare multiple models side by side |
| Force refresh the model cache from OpenRouter API |
Examples
List models sorted by context length
{
"name": "list_models",
"arguments": {
"modality": "text",
"sort_by": "context_length"
}
}Search for Claude models under $5/1M tokens
{
"name": "search_models",
"arguments": {
"query": "claude",
"provider": "anthropic",
"max_input_price": 5.0,
"requires_tools": true
}
}Compare 3 models
{
"name": "compare_models",
"arguments": {
"model_ids": "anthropic/claude-sonnet-4.6,qwen/qwen3.6-plus,openai/gpt-5.4"
}
}Get model details
{
"name": "get_model",
"arguments": {
"model_id": "anthropic/claude-sonnet-4.6"
}
}API Reference
list_models(modality, sort_by)
modality(str, default: "text"): Filter by output type. Options:text,image,audio,embeddings,allsort_by(str, default: "name"): Sort by:name,created,price,context_length
get_model(model_id)
model_id(str, required): Model slug, e.g.anthropic/claude-sonnet-4.6
search_models(query, provider, max_input_price, min_context, requires_tools, requires_vision, free_only)
query(str): Free-text search in model name/id/descriptionprovider(str): Filter by provider (e.g.anthropic,google,openai)max_input_price(float): Max input price per 1M tokens (0 = no limit)min_context(int): Minimum context window sizerequires_tools(bool): Only models supporting tool callingrequires_vision(bool): Only models with vision/image inputfree_only(bool): Only free models
compare_models(model_ids)
model_ids(str, required): Comma-separated list of model IDs
refresh_cache()
Force refresh the model cache from OpenRouter API.
Rate Limits
Without API key: 20 requests/minute
With API key: 200 requests/minute
Model data is cached for 5 minutes
Get your API key at: https://openrouter.ai/keys
License
MIT
Contributing
Contributions welcome! Please open an issue or PR on GitHub.
Available Tools
5 toolscompare_modelsB
Compare multiple models side by side.
Args: model_ids: Comma-separated model IDs
| Name | Required | Description | Default |
|---|---|---|---|
| model_ids | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not disclose behavioral traits such as whether the operation is read-only, potential side effects, or output format. The minimal description lacks sufficient transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short with no wasted words. It lacks structure (e.g., sections) but remains efficient. A bit more detail could be added without compromising conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (1 param) and presence of output schema, the description is incomplete. It fails to describe what 'side by side' means in the output, whether it shows differences or full models, or how results are presented.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains that model_ids is 'comma-separated model IDs,' adding format context beyond the schema (which only specifies type string). However, with 0% schema description coverage, more detail on parameter constraints would improve clarity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Compare multiple models side by side,' specifying the verb 'compare' and the resource 'multiple models.' It distinguishes itself from sibling tools like get_model (single) and list_models (list) by implying a comparative operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives. While the purpose implies it's for comparing multiple models, there is no guidance on exclusions or when-not-to-use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_modelA
Get detailed info for one model.
Args: model_id: Model slug, e.g. 'anthropic/claude-sonnet-4.6'
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavior. It states a simple read operation with no side effects, which is accurate but lacks details on potential errors (e.g., if model_id doesn't exist) or caching behavior. The safety profile is implied but not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise – one line plus a parameter note – without wasted words. While it lacks formal structure, it efficiently conveys the essential information for a simple getter tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has one parameter and an output schema, the description covers the core purpose and parameter explanation. Minor omissions like error handling or existence checks could be included, but overall it is sufficient for a straightforward operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description adds an example value for model_id ('anthropic/claude-sonnet-4.6') and clarifies it must be a model slug. This significantly improves understanding beyond the schema's bare 'Model Id' title.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves detailed info for one model, using a specific verb ('Get') and resource ('detailed info for one model'). It distinguishes itself from siblings like list_models (multiple models) and compare_models (comparison).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives like list_models or search_models. The description only states what it does, leaving the agent to infer context without any directional cues.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_modelsB
List models available on OpenRouter.
Args: modality: Filter by output type. Options: text, image, audio, embeddings, all sort_by: Sort by: name, created, price, context_length
| Name | Required | Description | Default |
|---|---|---|---|
| modality | No | text | |
| sort_by | No | name |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the filtering and sorting parameters, implying a read-only listing operation. However, it does not mention rate limits, pagination, result limits, or any side effects. For a simple list tool, basic behavioral traits are partially covered but not comprehensively.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, with a clear one-liner purpose followed by parameter details in a readable arg list. No unnecessary words. However, the parameter list could be formatted more clearly (e.g., bullet points) for machine parsing, though it remains human-readable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 optional params, output schema exists), the description is functionally sufficient but lacks context about when to invoke it relative to siblings. It does not mention that it returns a full list or the default behavior (e.g., all modalities). The output schema likely covers return format, but usage context is minimal.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, so the description adds meaning by listing possible values for 'modality' (text, image, audio, embeddings, all) and 'sort_by' (name, created, price, context_length). However, it does not explain what each sort option means (e.g., alphabetical, date, cost, token limit), leaving some ambiguity. The added value compensates for schema gaps but is still minimal.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'List models available on OpenRouter.' This directly distinguishes it from siblings like 'compare_models' (comparison), 'get_model' (specific model), and 'search_models' (search). The verb 'List' plus resource 'models' is specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide any guidance on when to use this tool versus alternatives (e.g., search_models, compare_models). It only describes the parameters, leaving the agent to infer the use case. Without explicit context, the agent may struggle to choose the appropriate tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
refresh_cacheA
Force refresh the model cache from OpenRouter.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. The description mentions 'force refresh' but does not disclose potential side effects (e.g., impact on ongoing requests, rate limits, or whether it is idempotent), leaving significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the key action. Every word contributes to the meaning, with no unnecessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no parameters and an output schema exists, the description is largely complete for its purpose. It explains the action, and the output schema can document return values. However, it lacks any usage context or behavioral notes that could be useful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the input schema provides complete coverage. Per guidelines, baseline is 4. The description adds no additional parameter meaning, but that is acceptable given no parameters exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool refreshes the model cache from OpenRouter. The verb 'refresh' and resource 'model cache' are specific, and it distinguishes from sibling tools that compare, get, list, or search models.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when cache is stale but does not provide explicit guidance on when to use or when not to use, nor does it mention alternatives among siblings. The context is clear but lacks exclusions or comparisons.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_modelsA
Search and filter OpenRouter models.
Args: query: Free-text search in model name/id/description provider: Filter by provider (anthropic, google, openai, etc.) max_input_price: Max input price per 1M tokens, 0 = no limit min_context: Minimum context window size requires_tools: Only models supporting tool calling requires_vision: Only models with vision/image input free_only: Only free models
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| provider | No | ||
| max_input_price | No | ||
| min_context | No | ||
| requires_tools | No | ||
| requires_vision | No | ||
| free_only | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the full burden, but it only explains parameter semantics. It does not disclose side effects, authentication requirements, rate limits, or how filters combine. The tool's effect on the system is opaque.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the main purpose and then lists parameters in a clear, compact format. Every line provides essential information without redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the 7 parameters and the existence of an output schema, the description covers parameter purposes but omits context on output format, default behavior, and limitations. It is adequate but not thorough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description adds crucial meaning for each parameter, e.g., 'Free-text search in model name/id/description'. It compensates well for the schema's lack of descriptions, though individual parameter explanations are brief.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Search and filter OpenRouter models,' identifying both the action (search and filter) and the resource. It is distinct from sibling tools like list_models and get_model, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description lists filters but does not provide explicit guidance on when to use this tool versus siblings. No alternatives or exclusion criteria are mentioned, only implied through the list of parameters.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a distinct purpose: get single model details, list with basic filters, search with advanced filters, compare multiple, and cache refresh. No overlapping functionality; descriptions clearly differentiate them.
All tool names follow a consistent verb_noun pattern using lowercase with underscores: list_models, search_models, get_model, compare_models, refresh_cache. No mixing of conventions.
With 5 tools, the server provides a focused set for model discovery and management. This is neither too few nor too many for the domain of querying model information from OpenRouter.
The tool set covers all essential operations for interacting with OpenRouter models: listing, searching, getting details, comparing, and cache management. No obvious gaps like missing model capability queries, as search covers those.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables AI applications to access 20+ model providers (including OpenAI, Anthropic, Google) through a unified interface for text and image generation.230MIT
- AlicenseBqualityDmaintenanceAn MCP server that retrieves and provides AI model information from OpenAI, Anthropic, and Google through a unified interface.317MIT
- FlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that wraps the OpenRouter API, enabling users to access diverse language models like Google Gemini 3 Pro for chat and image tasks. It provides tools for generating completions and listing available models within MCP-compatible clients.
- AlicenseAqualityDmaintenanceAn MCP server that provides access to 400+ AI models via OpenRouter, enabling chat, comparison, and document analysis through Claude.556MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lumishoang/openrouter-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server