Prerequisites
Before you begin, create an account and get your API Key.
Getting started
Connect to OpenRouter to access multiple AI models, compare model performance, and manage usage across different AI providers through AI agents.1
Install the SDKs (optional)
2
Create a server instance
Response Information: The API returns:
serverUrl
: The URL for connecting your MCP client to OpenRouterinstanceId
: Unique identifier for your server instance- Note: OpenRouter requires an API key which should be configured after creation
3
Configure authentication
You can get your OpenRouter API key from the OpenRouter website.
🎉 Your OpenRouter MCP Server is ready! You can now use your MCP server URL with any MCP-compatible client to access multiple AI models.
Available Tools
Tools Information
Tools Information
Tool Name | Description |
---|---|
openrouter_list_models | List available models on OpenRouter |
openrouter_search_models | Search for models based on query, category, or provider |
openrouter_get_model_pricing | Get pricing information for a specific model |
openrouter_create_chat_completion | Create a chat completion using a selected model |
openrouter_create_chat_completion_stream | Create a streaming chat completion |
openrouter_create_completion | Create a text completion (legacy completion endpoint) |
openrouter_get_usage | Get usage statistics for the authenticated user |
openrouter_get_user_profile | Get the current user’s profile information |
openrouter_get_credits | Get the current user’s credit balance |
openrouter_get_api_key_info | Get information about the current API key |
openrouter_get_cost_estimate | Estimate cost for a model given input/output tokens |
openrouter_compare_models | Run the same prompt across multiple models and compare |
openrouter_analyze_model_performance | Analyze one model over multiple prompts |
openrouter_get_model_recommendations | Get model recommendations based on use case and constraints |
For more details about tool input schema, use the get_tools API.