
A Model Context Protocol (MCP) server for OpenRouter API - Access 100+ AI models through a unified interface with Claude Desktop integration
概览
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. - 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 Client config formats differ, but the launch information is usually the same: - command: npx - args: ["@physics91/openrouter-mcp", "start"] - env: Use only when the client cannot rely on openrouter-mcp init or inherited environment variables.
README
以下为原文 README 节选,完整内容请查看原文。
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 start
Global install:
npm install -g @physics91/openrouter-mcp
openrouter-mcp init
openrouter-mcp start
MCP 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 init - Let
openrouter-mcp startresolve the API key from secure storage or runtime environment
Client-specific examples:
- Claude Desktop:
mcpServersinclaude_desktop_config.json - Claude Code:
claude mcp add ...or project.mcp.json - VS 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
-m pip install -r requirements.txt
安装
npx @physics91/openrouter-mcp init