openrouter-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@openrouter-mcpAsk x-ai/grok-4 to weigh in on our debate about remote work."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
openrouter-mcp
Remote MCP server that lets Claude invoke third-party models (Grok, GPT, Gemini, DeepSeek — anything OpenRouter carries) as tools mid-conversation, plus fetch live market quotes. The API keys never leave this server.
Tools exposed
ask_model —
{ model, prompt, system?, temperature?, max_tokens?, chat_id? }→ model reply + token/cost footer. Passchat_id(any string you invent) to make the conversation sticky: the server keeps the transcript and replays it on every call, so the model remembers earlier turns. Different calls on one chat may use different models — they share the transcript.list_models —
{ search?, limit? }→ matching OpenRouter model IDs with context length and pricinglist_chats — active sticky chats with turn count, last model, total cost, last activity
get_chat —
{ chat_id }→ full transcript of one sticky chatget_quotes —
{ symbols: string[] }→ JSON array of{ symbol, price, prevClose, marketState, asOfISO, dayHigh, dayLow, currency, source }per ticker. US equities and ETFs (AAPL,VOO) come from Finnhub, real-time on the free tier;marketState(PRE/REGULAR/POST/CLOSED) is derived from US market hours andcurrencyis USD. FX pairs (USDCAD=XorUSD/CAD) come from official, keyless daily reference rates — Bank of Canada for anything involving CAD, ECB (via Frankfurter) otherwise — withmarketState: "REFERENCE"andasOfISOas the date. Not covered: non-US listings such as TSX (Finnhub free tier is US-only), indices, crypto. Unknown or uncovered tickers come back as{ symbol, error }without failing the rest of the batch. Up to 25 symbols per call, cached 30 s (FX 1 h).
Related MCP server: MCP OpenAI Server
Deploy (Render)
Push this repo to GitHub, create a Web Service on Render pointing at it.
Build:
npm install· Start:npm start(Render injectsPORT)
Environment variables:
OPENROUTER_API_KEY— from https://openrouter.ai/keys (set a spend limit on the key)FINNHUB_API_KEY— free at https://finnhub.io/register (60 calls/min, no card)AUTH_TOKEN— generate one:node -e "console.log(require('crypto').randomBytes(24).toString('base64url'))"APP_URL— optional, your Render URL (OpenRouter attribution header)
Sanity check:
GET https://your-app.onrender.com/healthz→{"ok":true}
Also runs fine on the SOCKS5-proxy VPS with pm2 + a reverse proxy for TLS — claude.ai requires HTTPS for connectors.
Connect to claude.ai
Settings → Connectors → Add custom connector → URL:
https://your-app.onrender.com/mcp/<AUTH_TOKEN>No OAuth config needed — the token in the path is the auth. Then in any chat, enable the connector and ask Claude to ask_model with e.g. x-ai/grok-4.
Notes
Stateless transport: every request builds a fresh server instance. No sessions to lose when Render cold-starts or Starlink blips.
Sticky chats are in-memory only: they survive across requests but are lost on restart/redeploy (and Render free-tier sleep). Capped at 100 chats / 200 messages each, LRU-evicted. A failed model call never creates or grows a chat.
The secret lives in the URL path, so treat the connector URL itself as a credential. Rotate
AUTH_TOKENif it leaks.Quote sources: Finnhub is a real API with a TOS and documented limits (60/min free); the server keeps a shared token bucket under that and caches quotes 30 s, so a burst of tool calls from several chats can't trip it. Bank of Canada Valet and ECB/Frankfurter are official and keyless, one rate per business day. Yahoo Finance was tried first and dropped: its endpoint is undocumented, TLS-fingerprints clients, and hard-blocks cloud egress IPs (Render's included) for 13–40+ min at a time.
Free-tier Render sleeps after idle; first call after a nap takes ~30s. Fine for this use case.
This server cannot be deployed
Maintenance
Related MCP Connectors
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
OpenRouter for tools and data. Compare catalog providers and call them from one hosted MCP endpoint.
Claude makes real phone calls for you — in many languages, with transcript and outcome back in chat.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceGives Claude access to multiple AI models (Gemini, OpenAI, OpenRouter, Ollama) for enhanced development capabilities including extended reasoning, collaborative development, code review, and advanced debugging.-
- AlicenseAqualityDmaintenanceEnables Claude to directly invoke OpenAI's chat models (GPT-4o, GPT-4o-mini, o1-preview, o1-mini) through a Model Context Protocol integration, allowing users to query and compare responses from different AI models within Claude Desktop.11MIT
- AlicenseAqualityDmaintenanceEnables Claude to orchestrate tasks across 27 AI providers, run multi-agent plans, and conduct multi-model councils for decision-making.1574 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables adversarial multi-model AI review via OpenRouter, allowing Claude to submit prompts to multiple models and compare responses through custom connector tools.-