Package Exports
- @mcpservers/openrouterai
- @mcpservers/openrouterai/build/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mcpservers/openrouterai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OpenRouter MCP Server
A Model Context Protocol (MCP) server that provides integration with OpenRouter.ai, allowing access to various AI models through a unified interface.
Features
- Access to all OpenRouter.ai models through MCP tools
- Advanced model search and filtering capabilities
- Automatic rate limiting and error handling
- Model information caching for optimal performance
- Comprehensive model capability tracking
Installation
npm install @mcpservers/openrouteraiConfiguration
Add the server to your MCP settings configuration file (cline_mcp_settings.json or claude_desktop_config.json):
{
"mcpServers": {
"openrouterai": {
"command": "npx",
"args": ["@mcpservers/openrouterai"],
"env": {
"OPENROUTER_API_KEY": "your-api-key-here",
"OPENROUTER_DEFAULT_MODEL": "optional-default-model"
}
}
}
}Required environment variables:
OPENROUTER_API_KEY: Your OpenRouter API key (get one at https://openrouter.ai/keys)OPENROUTER_DEFAULT_MODEL(optional): Default model to use for chat completions
Available Tools
chat_completion
Send messages to OpenRouter.ai models:
{
model?: string; // Optional if default model is set
messages: {
role: "system" | "user" | "assistant";
content: string;
}[];
temperature?: number; // Optional, defaults to 1.0
}search_models
Search and filter available models:
{
query?: string; // Search in name/description
provider?: string; // Filter by provider
minContextLength?: number;
maxContextLength?: number;
maxPromptPrice?: number;
maxCompletionPrice?: number;
capabilities?: {
functions?: boolean;
tools?: boolean;
vision?: boolean;
json_mode?: boolean;
};
limit?: number; // Default: 10, max: 50
}get_model_info
Get detailed information about a specific model:
{
model: string; // Model identifier
}validate_model
Check if a model ID is valid:
{
model: string; // Model identifier to validate
}For detailed documentation, development setup, and implementation details, see CONTRIBUTING.md.