Provides access to Google's Gemini models including Gemini 2.5 Pro/Flash with 1M+ context windows through OpenRouter, supporting both text-only and vision capabilities.
Enables interaction with Meta's Llama models including Llama 3.3, Llama 3.2 vision models, and Llama 2 chat models through OpenRouter's unified API.
Provides access to OpenAI models including GPT-4o, GPT-4 Turbo, and GPT-3.5 Turbo through OpenRouter's unified API, with support for text and vision capabilities, streaming responses, and usage tracking.
Provides access to Perplexity's web-connected Llama 3 Sonar models through OpenRouter, enabling AI interactions with real-time web information.
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 Servercompare GPT-4o and Claude 3.5 for analyzing this image"
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
A Model Context Protocol (MCP) server for OpenRouter. Register it in MCP-compatible clients that can launch a local stdio server to use OpenRouter models for chat, vision, benchmarking, and collective-intelligence workflows.
Features
MCP tools: chat, model listing, usage stats, vision chat, vision model listing, free chat, free model listing, free model metrics
Benchmarking suite and performance comparison tools
Collective intelligence tools (consensus, ensemble reasoning, adaptive routing, cross-model validation, collaborative solving)
Secure API key storage (OS keychain, encrypted file, or .env) with audit logging
Streaming responses, caching, and rich model metadata
Quick start
npx @physics91/openrouter-mcp init
npx @physics91/openrouter-mcp startGlobal install:
npm install -g @physics91/openrouter-mcp
openrouter-mcp init
openrouter-mcp startMCP client setup
Client config formats differ, but the launch information is usually the same:
command:npxargs:["@physics91/openrouter-mcp", "start"]env: Use only when the client cannot rely onopenrouter-mcp initor inherited environment variables.
Recommended credential flow:
Run
npx @physics91/openrouter-mcp initLet
openrouter-mcp startresolve the API key from secure storage or runtime environment
Client-specific examples:
Claude Desktop:
mcpServersinclaude_desktop_config.jsonClaude Code:
claude mcp add ...or project.mcp.jsonVS Code:
serversin.vscode/mcp.json
See docs/MCP_CLIENT_GUIDE.md for the common flow and client-specific examples.
Prerequisites
Node.js 16+
Python 3.10+ (
pythonorpython3must be available inPATH)First run attempts dependency install via
<python> -m pip install -r requirements.txtOpenRouter API key: https://openrouter.ai
DevOps Readiness (Clone -> Test/Build/Deploy)
If you clone this repository and want to trust local DevOps gates immediately, run this baseline once:
git clone <repo-url>
cd openrouter-mcp
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements-dev.txt
npm install --no-audit --no-fundThen run the quality/release gates:
Build gate (
buildskill):
ruff check src/ tests/
black --check src/ tests/
isort --check-only src/ tests/Test gate (
testskill):
python3 run_tests.py assurance -vDeploy pre-flight (
deployskill):
npm whoamiNotes:
assuranceincludes Python test gates and thennpm run test:securityonly after pytest passes.If your OS blocks global pip installs (PEP 668), use
.venvas shown above.npm run buildis intentionally a no-op in this project; static quality gates above are the real build criteria.Publishing is always manual and intentional:
npm publish --access publiconly after all gates pass and explicit confirmation.
CLI
Use openrouter-mcp <command> or npx @physics91/openrouter-mcp <command>.
Commands:
startStart the MCP server (stdio)initInitialize API key storagestatusShow configuration statusinstall-claudeConfigure Claude Desktopinstall-claude-codeConfigure Claude Code CLIrotate-keyRotate API key across storagedelete-credentialsRemove stored credentialssecurity-auditAudit credential storage and permissionsmigrate-encryptionMigrate encrypted credentials to v2.0
Global options: --verbose, --debug
start options: --host, --port
MCP client integration
Common MCP client setup:
docs/MCP_CLIENT_GUIDE.mdClaude Desktop shortcut:
openrouter-mcp install-claudeClaude Code CLI shortcut:
openrouter-mcp install-claude-codeGenerated server entries use:
npx @physics91/openrouter-mcp start
See:
docs/MCP_CLIENT_GUIDE.mddocs/CLAUDE_DESKTOP_GUIDE.mddocs/CLAUDE_CODE_GUIDE.md
Notes
Vision tools accept images as base64 or URL only (file paths are not supported).
API keys should not be committed. Use
initfor secure storage. SeeSECURITY.md.
Documentation
docs/INSTALLATION.mddocs/MCP_CLIENT_GUIDE.mddocs/CLAUDE_DESKTOP_GUIDE.mddocs/CLAUDE_CODE_GUIDE.mddocs/API.mddocs/SECURITY.mddocs/MULTIMODAL_GUIDE.mddocs/BENCHMARK_GUIDE.mddocs/SECURE_STORAGE_INTEGRATION.mddocs/QUICK_REFERENCE.mddocs/USAGE_GUIDE_KR.mddocs/CLAUDE_CODE_SETUP_KR.md
Contributing
See CONTRIBUTING.md.
Quick setup for local hook enforcement:
pip install -r requirements-dev.txt
pre-commit installThe installed hooks enforce:
pre-commitfast checks before commitcommit-msgConventional Commit format in Englishpre-pushsmoke tests
Deeper static analysis remains available as advisory/manual checks rather than push blockers.
Use pre-commit run --hook-stage manual mypy-advisory --all-files (and the other *-advisory hooks) when you want the broader reports locally.
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.