Labsco
MCP SERVER

OpenRouter

by heltonteixeira

Send a completion to any model on OpenRouter, after picking that model by price, context length or capability rather than by memory.

Model Routing, Multi-Model Consultation & Cost ControlVerified
Summary
Choosing a model becomes a query instead of a memory exercise.

search_models filters the registry by price ceiling, context length and capability, so the cheapest model meeting a hard requirement is one call rather than a browse through a pricing page. Completions then go wherever you picked, with provider routing and parameter overrides supplied per request. Four tools, and none of them a framework: this routes, it does not orchestrate.

What it is

Four tools over OpenRouter.ai: one sends messages to a named model, three answer questions about the registry — search it, describe one model, or check that an ID is valid.

What you get
  • Chat completions against a specified model, with temperature and max_tokens overridden per call
  • Provider routing passed alongside the request rather than fixed at startup
  • Registry search filtered by capabilities, provider, minimum and maximum context length, and prompt or completion price ceilings
  • Complete metadata for a single model ID: pricing, context limits and capabilities
  • A boolean check that a model ID exists, before another call depends on it
Requirements

An OpenRouter account and OPENROUTER_API_KEY. Four further environment variables hold defaults the calls fall back to: OPENROUTER_DEFAULT_MODEL, OPENROUTER_MAX_TOKENS, OPENROUTER_PROVIDER_QUANTIZATIONS and OPENROUTER_PROVIDER_IGNORE.

Setup effort

One command plus a key — pnpm install @mcpservers/openrouterai, then supply credentials