OpenRouter
v1.1.8MCP server providing access to 300+ AI models via OpenRouter
Values you need
| Variable | What it is | |
|---|---|---|
OPENROUTER_API_KEY | required secret | OpenRouter API key used to authenticate tool requests. |
DEFAULT_TEXT_MODEL | optional | Default model slug for chat tool calls when no model is provided. |
DEFAULT_IMAGE_MODEL | optional | Default model slug for image generation tool calls. |
DEFAULT_CODE_MODEL | optional | Default model slug for code-oriented tasks. |
DEFAULT_VISION_MODEL | optional | Default model slug for vision-capable tool calls. |
DEFAULT_EMBEDDING_MODEL | optional | Default model slug for embedding tool calls when no model is provided. |
PyPI (uvx) discovery passed
Requires uv (https://docs.astral.sh/uv/)
Run in a terminal
claude mcp add mcp-openrouter -e 'OPENROUTER_API_KEY=<OPENROUTER_API_KEY>' -- uvx mcp-openrouter==1.1.8Add to
claude_desktop_config.json{
"mcpServers": {
"mcp-openrouter": {
"args": [
"mcp-openrouter==1.1.8"
],
"command": "uvx",
"env": {
"OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"mcp-openrouter": {
"args": [
"mcp-openrouter==1.1.8"
],
"command": "uvx",
"env": {
"OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "OPENROUTER_API_KEY",
"id": "openrouter-api-key",
"password": true,
"type": "promptString"
}
],
"servers": {
"mcp-openrouter": {
"args": [
"mcp-openrouter==1.1.8"
],
"command": "uvx",
"env": {
"OPENROUTER_API_KEY": "${input:openrouter-api-key}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.mcp-openrouter]
command = "uvx"
args = ["mcp-openrouter==1.1.8"]
env = { "OPENROUTER_API_KEY" = "<OPENROUTER_API_KEY>" }For AI agents
- Ask the user for: OPENROUTER_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: chat, generate_image, embed, list_models, find_models.
- If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.
Machine-readable: install.md · manifest.json