mcp-openrouter
This MCP server lets local MCP hosts call OpenRouter models through AgentBridge for chat, image generation, embeddings, and model discovery.
chat: send a prompt or multi-turn messages to a chat model, with optional system prompt, sampling controls, JSON/response format, provider routing, stop sequences, seed, reasoning effort, and assistant prefill.generate_image: generate an image from a prompt and optionally save it to an absolute path, with controls for size, aspect ratio, quality, background, and output format.embed: generate embeddings for a string or list of strings, with optional model, dimensions, and encoding format.list_models: list available models, optionally filtered by vision, image generation, embeddings, tool support, or long context.find_models: search model names/slugs and return up to 20 matches.Configure optional default text, image, and embedding models via environment variables; requests are routed through AgentBridge rather than directly to OpenRouter.
Enables use of Google's Gemini models, such as google/gemini-3-pro-image-preview, both for image generation (configurable aspect ratio, 1K/2K/4K size, quality, output format, transparency, and saving to an absolute path) and for text/multimodal chat completions.
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., "@mcp-openrouter chat with anthropic/claude-sonnet-4: explain the plot of inception"
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.
mcp-openrouter adds OpenRouter chat, images, embeddings, and model discovery to MCP clients over local stdio.
Install
Choose the clients to configure:
uvx mcp-openrouter install --yes --clients codex,claude,opencodeThe server supports a configured OpenRouter provider through AgentBridge. See the guide for the gateway environment, tools, and client-specific setup.
MCP server setup and configuration.
Related MCP server: Perplexity Ask OpenRouter
License
Available Tools
5 toolschatB
Send a chat completion request to any OpenRouter model.
Inputs: seed, stop, model, top_k, +13 more. Returns: result
embedB
Generate embeddings for text input using an OpenRouter embedding model.
Inputs: input (required), model, dimensions, encoding_format. Returns: object
find_modelsA
Search for models by name or slug.
Inputs: search_term (required). Returns: result
generate_imageB
Generate an image using an OpenRouter image generation model.
Inputs: prompt (required), size, model, quality, +4 more.
list_modelsA
List available OpenRouter models, optionally filtered by capability.
Inputs: capability. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct operation: chat for text generation, embed for embeddings, generate_image for images, find_models and list_models for model discovery with different query types. No overlap.
All tool names use lowercase with underscores, following a consistent verb or verb_noun pattern (chat, embed, generate_image, find_models, list_models).
5 tools cover the core functionalities of the OpenRouter API—chat, embedding, image generation, model search, and listing—without being excessive or insufficient.
The set covers the primary OpenRouter capabilities (chat, embed, image gen, model discovery). A minor gap is the lack of an explicit streaming tool, but chat can be parameterized for streaming.
Maintenance
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
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.
MCP server for AI dialogue using various LLM models via AceDataCloud
Chat, image, video, and audio models from many vendors behind one remote MCP server and one key.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that wraps the OpenRouter API, enabling users to access diverse language models like Google Gemini 3 Pro for chat and image tasks. It provides tools for generating completions and listing available models within MCP-compatible clients.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects to OpenRouter's API to provide Perplexity's models (Sonar, Sonar Deep Research, Sonar Reasoning) for use with any MCP-compatible client.8MIT
- AlicenseAqualityDmaintenanceA lightweight MCP server that enables AI coding assistants to interact with OpenRouter API for direct queries, file analysis, and batch processing.3MIT
- AlicenseAqualityDmaintenanceAn MCP server that gives LLMs direct access to OpenRouter's Image API to generate images, edit/transform existing ones, and browse the model catalog.41Apache 2.0