Skip to main content
Glama
7BlockLabs

OpenRouter MCP Server

by 7BlockLabs

OpenRouter MCP Server

A production-shaped Model Context Protocol server for OpenRouter, built by 7Block Labs. It turns OpenRouter's API into a first-party, agent-native surface: any MCP client (Claude, ChatGPT, Cursor, agent frameworks) can browse the model catalog, compare pricing, pick a model by budget/context, and run completions — metered to the caller's own key.

Built for the OpenRouter team as a working example of the official MCP server we'd ship & launch for you (listed in Claude + ChatGPT, with OAuth + per-plan metering). Catalog tools are keyless (OpenRouter's /models is public), so you can run it right now:

python -m venv .venv && source .venv/bin/activate && pip install -e .
python -m or_mcp.server                 # stdio (Claude Desktop / Cursor)
TRANSPORT=http PORT=8000 python -m or_mcp.server   # remote (Streamable HTTP)
# completions: export OPENROUTER_API_KEY=... (billed to that account — the metering seam)

Claude Code: claude mcp add --transport http openrouter http://localhost:8000/mcp

Tools

Tool

What it does

Key?

list_models

Browse the catalog (filter by name)

no

compare_pricing

Rank models by cost (USD/1M tokens)

no

recommend_model

Pick by budget + min context window

no

chat

Run a completion (metered to the caller)

yes

Related MCP server: GPTProto MCP

Why first-party > community wrappers

Several community MCP wrappers of OpenRouter already exist — unmetered, unversioned, outside your control. A first-party server (task-shaped tools, OAuth, usage metering, directory listings) makes agents paying, governed users. That's what 7Block Labs builds for data & API companies.

MIT licensed.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables AI hosts to discover GPTProto models, retrieve live pricing, make documented API requests, submit custom generations, and poll asynchronous tasks through local MCP tools.
    9
    9 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP clients to browse a live catalog of 100+ models with pricing, rankings and measured uptime, check credits and spend, and send chat completions through an OAuth-authenticated, per-connection key capped by a spend limit. Read tools are free, and paid calls are priced and approved before any credit is used.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP clients to discover and inspect available open models, estimate token costs, and run chat completions through an OpenAI-compatible inference endpoint, with optional bearer-key authentication for billed calls.
    Apache 2.0