- Home
- MCP servers
- OpenRouter
OpenRouter
- typescript
8
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"th3nolo-openrouter-mcp": {
"command": "node",
"args": [
"/path/to/openrouter-mcp/dist/server.js"
],
"env": {
"OPENROUTER_API_KEY": "your_api_key_here",
"OPENROUTER_APP_NAME": "MyOpenRouterApp",
"OPENROUTER_BASE_URL": "https://openrouter.ai/api/v1",
"OPENROUTER_SITE_URL": "https://your-site.example.com"
}
}
}
}You can run an MCP server that exposes OpenRouter’s 400+ AI models through a unified interface, enabling you to list, chat with, and compare models directly from your preferred MCP client or Claude ecosystem.
How to use
You connect to the OpenRouter MCP server from your MCP client or Claude integration. Start the server locally, then use the available MCP tools to list models, chat with a specific model, or compare multiple models side by side. Key actions include: listing all models with pricing, chatting with a chosen model, comparing responses across models, and retrieving detailed model information. Use the model identifiers provided by your client to specify which model you want to query or chat with.
How to install
Prerequisites: Node.js installed on your system. You can verify by running node -v and npm -v in your terminal.
Step 1: Clone the MCP server repository.
Step 2: Install dependencies.
Step 3: Build the TypeScript code.
Step 4: Run the server with your API key set in the environment.
Configuration and usage notes
Create a local environment file and place your API key for OpenRouter. The server expects the API key to be available as an environment variable.
Environment and usage notes
This MCP server uses the following environment variables. Set these in your shell or in your process manager when starting the server.
Example usage in Claude Code or Desktop
Add the server to Claude Code or Desktop so you can issue MCP commands directly from your workspace. When you start the server with your API key, you can access the list, chat, and compare functions from your MCP client.
Available tools
list_models
Retrieve a list of all available models with pricing information.
chat_with_model
Send a message to a specific model and receive a response.
compare_models
Submit a message and get side-by-side responses from multiple models for comparison.
get_model_info
Obtain detailed information about a specific model, including context limits and capabilities.