OpenRouter MCP connector
OAuth 2.1/DCRAIConnect to OpenRouter's MCP server to access unified LLM routing, model discovery, and generation tools directly from your AI workflows.
OpenRouter MCP connector
-
Install the SDK
Section titled “Install the SDK”Terminal window npm install @scalekit-sdk/nodeTerminal window pip install scalekit -
Set your credentials
Section titled “Set your credentials”Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret> -
Authorize and make your first call
Section titled “Authorize and make your first call”quickstart.ts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENV_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'openroutermcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize OpenRouter MCP:', link)process.stdout.write('Press Enter after authorizing...')await new Promise(r => process.stdin.once('data', r))// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'openroutermcp_get_credits',toolInput: {},})console.log(result)quickstart.py import osfrom scalekit.client import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENV_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "openroutermcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize OpenRouter MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="openroutermcp_get_credits",connection_name=connection_name,identifier=identifier,)print(result)
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Image generate — Generate an image from a text prompt and return it inline
- Get credits, generation, model — Check the remaining account credit balance before running a workload
- List app rankings, benchmarks, daily model rankings — See which APPS/products drive the most OpenRouter traffic, filterable by category, to gauge ecosystem adoption and find example use cases
- Ping records — Health-check tool that verifies the MCP connection is alive
- Search docs — Search the full OpenRouter documentation to answer “how do I…” questions with correct, current API usage
- Send feedback, message — Submit structured feedback on a specific generation the caller made — a category plus an optional comment
Tool list
Section titled “Tool list”Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.
openroutermcp_generate_image#Generate an image from a text prompt and return it inline. The image is sent back as an image content block: clients that render images (e.g. desktop apps) display it, and the model can see it. This bills the authenticated user for the generation.3 params
Generate an image from a text prompt and return it inline. The image is sent back as an image content block: clients that render images (e.g. desktop apps) display it, and the model can see it. This bills the authenticated user for the generation.
modelstringrequiredImage model slug, e.g. "bytedance-seed/seedream-4.5"promptstringrequiredText description of the desired imagesizestringoptionalOptional output size, e.g. "2K", "4K", or explicit "1024x1024"openroutermcp_get_credits#Check the remaining account credit balance before running a workload.0 params
Check the remaining account credit balance before running a workload.
openroutermcp_get_generation#Inspect cost, token counts, and serving provider for a specific generation id, to debug spend and routing. send-message returns the generation id of each call in its output.1 param
Inspect cost, token counts, and serving provider for a specific generation id, to debug spend and routing. send-message returns the generation id of each call in its output.
requestobjectrequiredIdentifies the generation to inspect.openroutermcp_get_model#Get full details for one model by author/slug (supports :variant suffixes and slug aliases) without fetching the whole catalog. Use this instead of list-models when the model is already known.1 param
Get full details for one model by author/slug (supports :variant suffixes and slug aliases) without fetching the whole catalog. Use this instead of list-models when the model is already known.
requestobjectrequiredIdentifies the model to fetch by author and slug.openroutermcp_list_app_rankings#See which APPS/products drive the most OpenRouter traffic, filterable by category, to gauge ecosystem adoption and find example use cases. For model rankings use list-daily-model-rankings instead.1 param
See which APPS/products drive the most OpenRouter traffic, filterable by category, to gauge ecosystem adoption and find example use cases. For model rankings use list-daily-model-rankings instead.
requestobjectoptionalOptional filters and pagination for the app ranking query.openroutermcp_list_benchmarks#Compare model quality beyond price using third-party benchmarks. The optional source arg selects the dataset and the result shape: source=artificial-analysis returns intelligence, coding, and agentic index scores; source=design-arena returns head-to-head standings (elo, win rate) filterable by arena and category. Omit source to get results from all sources in one call. Optional task_type (coding, intelligence, agentic) narrows to models suited for that workload.1 param
Compare model quality beyond price using third-party benchmarks. The optional source arg selects the dataset and the result shape: source=artificial-analysis returns intelligence, coding, and agentic index scores; source=design-arena returns head-to-head standings (elo, win rate) filterable by arena and category. Omit source to get results from all sources in one call. Optional task_type (coding, intelligence, agentic) narrows to models suited for that workload.
requestobjectoptionalOptional filters for the benchmark query.openroutermcp_list_daily_model_rankings#See which MODELS are most used and trending by token volume, to pick a proven model. Optionally slice by period (day/week/month), modality, context_bucket, or by category / language_type (sampled weekly estimates). For app/product rankings use list-app-rankings instead.1 param
See which MODELS are most used and trending by token volume, to pick a proven model. Optionally slice by period (day/week/month), modality, context_bucket, or by category / language_type (sampled weekly estimates). For app/product rankings use list-app-rankings instead.
requestobjectoptionalOptional filters and time grain for the model ranking query.openroutermcp_list_model_endpoints#See which providers serve a given model and at what price, latency, throughput, and data-policy status, to choose routing or debug a slow provider.1 param
See which providers serve a given model and at what price, latency, throughput, and data-policy status, to choose routing or debug a slow provider.
requestobjectrequiredIdentifies the model whose serving endpoints should be listed.openroutermcp_list_models#List the live OpenRouter model catalog with pricing, context length, modalities, supported parameters, and benchmark scores, to pick a model and wire the right slug into code. Prefer the server-side params over fetching the full list and post-processing. Search/sort: q (free-text name/slug search), sort (pricing-low-to-high/high-to-low, context-high-to-low, throughput-high-to-low, latency-low-to-high, most-popular, top-weekly, newest, intelligence-high-to-low, coding-high-to-low, agentic-high-to-low, design-arena-elo-high-to-low). Filters: category (use case, e.g. programming), min_price/max_price (prompt $/M), min_output_price/max_output_price (completion $/M), context (minimum tokens), min_age_days/max_age_days (model age), min_intelligence_index/max, min_coding_index/max, min_agentic_index/max (Artificial Analysis indices), min_tool_success_rate/max (0-1), arch (model family), model_authors, providers (case-sensitive display names, e.g. Groq), input/output_modalities, supported_parameters, zdr, and region.1 param
List the live OpenRouter model catalog with pricing, context length, modalities, supported parameters, and benchmark scores, to pick a model and wire the right slug into code. Prefer the server-side params over fetching the full list and post-processing. Search/sort: q (free-text name/slug search), sort (pricing-low-to-high/high-to-low, context-high-to-low, throughput-high-to-low, latency-low-to-high, most-popular, top-weekly, newest, intelligence-high-to-low, coding-high-to-low, agentic-high-to-low, design-arena-elo-high-to-low). Filters: category (use case, e.g. programming), min_price/max_price (prompt $/M), min_output_price/max_output_price (completion $/M), context (minimum tokens), min_age_days/max_age_days (model age), min_intelligence_index/max, min_coding_index/max, min_agentic_index/max (Artificial Analysis indices), min_tool_success_rate/max (0-1), arch (model family), model_authors, providers (case-sensitive display names, e.g. Groq), input/output_modalities, supported_parameters, zdr, and region.
requestobjectoptionalSearch, sort, and filter parameters for the model catalog. All fields are optional; omit entirely to list all models with default ordering.openroutermcp_list_providers#List available providers to configure allow/deny/routing preferences.0 params
List available providers to configure allow/deny/routing preferences.
openroutermcp_list_task_classifications#See what OpenRouter traffic is actually used for: a market-share breakdown by task type (code generation, web search, summarization, ...) over a trailing window, each with its top models by usage, plus macro-category (Code, Data, Agent, General) aggregates. Use to learn which models real usage favors for a given kind of work. All shares are fractions (0-1) of sampled traffic; absolute volumes are not exposed.1 param
See what OpenRouter traffic is actually used for: a market-share breakdown by task type (code generation, web search, summarization, ...) over a trailing window, each with its top models by usage, plus macro-category (Code, Data, Agent, General) aggregates. Use to learn which models real usage favors for a given kind of work. All shares are fractions (0-1) of sampled traffic; absolute volumes are not exposed.
requestobjectoptionalOptional windowing options for the task classification query.openroutermcp_ping#Health-check tool that verifies the MCP connection is alive.0 params
Health-check tool that verifies the MCP connection is alive.
openroutermcp_search_docs#Search the full OpenRouter documentation to answer "how do I…" questions with correct, current API usage. Each result includes a "View docs" link to the source page; if a result is marked truncated or the complete page is needed, fetch that link or share it with the user.2 params
Search the full OpenRouter documentation to answer "how do I…" questions with correct, current API usage. Each result includes a "View docs" link to the source page; if a result is marked truncated or the complete page is needed, fetch that link or share it with the user.
querystringrequiredWhat to look up in the OpenRouter docs, e.g. "stream responses"max_resultsintegeroptionalHow many doc sections to returnopenroutermcp_send_feedback#Submit structured feedback on a specific generation the caller made — a category plus an optional comment. Use after a generation had a problem (wrong or incoherent output, latency, formatting, billing, or an API error) so the OpenRouter team can act on it. Requires the generation id, which get-generation and send-message both return.1 param
Submit structured feedback on a specific generation the caller made — a category plus an optional comment. Use after a generation had a problem (wrong or incoherent output, latency, formatting, billing, or an API error) so the OpenRouter team can act on it. Requires the generation id, which get-generation and send-message both return.
requestobjectrequiredStructured feedback about a specific generationopenroutermcp_send_message#Chat with a model and get its plain-text response, to test a prompt or compare models without leaving the editor. Model slug suffixes activate routing variants: ":online" enables web search (e.g. "deepseek/deepseek-v4-pro:online"), ":nitro" prioritizes throughput, ":floor" prioritizes lowest price, ":free" uses a free endpoint if one exists. For normal chats, omit "provider" and let the router choose. Set "provider" to pin the upstream provider only when zero variance is needed, such as running evals or reproducing a result.4 params
Chat with a model and get its plain-text response, to test a prompt or compare models without leaving the editor. Model slug suffixes activate routing variants: ":online" enables web search (e.g. "deepseek/deepseek-v4-pro:online"), ":nitro" prioritizes throughput, ":floor" prioritizes lowest price, ":free" uses a free endpoint if one exists. For normal chats, omit "provider" and let the router choose. Set "provider" to pin the upstream provider only when zero variance is needed, such as running evals or reproducing a result.
messagestringrequiredThe user message to sendmodelstringrequiredModel slug, e.g. "openai/gpt-4o-mini"providerobjectoptionalProvider routing preferences. Leave unset for normal chats so the router picks the best provider. Set ONLY when the request needs zero provider variance — running evals, benchmarking, or reproducing a result — because providers differ in quantization, throughput, and sampling, so the same model can return different outputs depending on who serves it. To hard-pin one provider: { only: ["fireworks"], allow_fallbacks: false }.systemstringoptionalOptional system promptopenroutermcp_view_skills#Retrieve a curated OpenRouter best-practice recipe (an Agent Skill) by name. Available skills:
- find-best-model-evals: Find the best OpenRouter model for a specific task by running a real eval on your own data — balancing quality, cost, and speed, with each candidate pinned to one provider so results don't drift.2 params
Retrieve a curated OpenRouter best-practice recipe (an Agent Skill) by name. Available skills: - find-best-model-evals: Find the best OpenRouter model for a specific task by running a real eval on your own data — balancing quality, cost, and speed, with each candidate pinned to one provider so results don't drift.
namestringrequiredSkill name from the list in this tool descriptionpathstringoptionalFile within the skill (defaults to SKILL.md)