OpenRouter MCP Multimodal Server
The OpenRouter MCP Multimodal Server provides access to 300+ LLMs via OpenRouter with broad multimodal capabilities:
Text Chat: Converse with any OpenRouter model using
chat_completion, with control over temperature and max tokens.Image Analysis: Analyze images from local files, URLs, or data URIs using
analyze_imagewith vision models.Audio Analysis: Transcribe and analyze audio files (WAV, MP3, FLAC, OGG, etc.) via
analyze_audio.Video Analysis: Understand video content (mp4, mpeg, mov, webm) from files, URLs, or data URIs using
analyze_video.Image Generation: Create images from text prompts via
generate_image, with optional disk save.Audio Generation: Generate speech or music from text with
generate_audio(auto-detects format).Video Generation: Async video generation (Veo 3.1, Sora 2 Pro, Seedance, Wan) via
generate_videowith progress polling.Video Job Management: Resume polling and download results for video jobs using
get_video_status.Model Search & Discovery: Filter models by name, provider, or capabilities (vision/audio/video) via
search_models.Model Info: Get pricing, context length, and capability details with
get_model_info.Model Validation: Verify a model ID exists on OpenRouter using
validate_model.Security & Error Handling: Includes SSRF mitigation, path sandboxing for file writes, and structured
_meta.codeerrors for programmatic failure handling.
Offers deployment through Docker containers, with support for environment variables and seamless integration with MCP configurations.
Enables use of Google's Gemini models through OpenRouter for text chat and multimodal conversations, with support for vision capabilities and model customization.
Provides Node.js-based installation and execution options with NPX support for easy integration into MCP environments.
Supports Python-based installation and execution using UV package manager for those preferring Python environments.
Click on "Install 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 MCP Multimodal Serveranalyze this product photo and suggest improvements for the lighting"
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.
What is this?
OpenRouter MCP Multimodal is a production-grade Model Context Protocol (MCP) server — listed on the official MCP Registry as io.github.stabgan/openrouter-multimodal. It connects AI coding agents (Cursor, Claude Desktop, VS Code, Windsurf, Cline, and others) to OpenRouter's unified LLM API over stdio.
Unlike text-only MCP servers, one install covers the full multimodal surface:
Capability | Tools | Highlights |
Chat |
| 300+ models, |
Vision |
| OCR, captioning, VQA, image generation with reference inputs |
Audio |
| Transcription, speech/music generation |
Video |
| Clip understanding, Veo / Sora / Seedance / Wan generation with progress notifications |
Catalog |
| Model discovery, validation, reranking, ops health |
Production hardening: input/output path sandboxes (including analyze_* local files as of v4.5.2), SSRF guards, structured errors with _meta.code, MCP 2025-06-18 structured outputs, async video progress notifications, and 650+ automated tests (unit, mock, regression, and live integration).
Related MCP server: OpenRouter MCP Multimodal Server
Quick start
1. Get an API key (free tier works) → openrouter.ai/keys
2. Run the server
export OPENROUTER_API_KEY=sk-or-v1-...
npx -y @stabgan/openrouter-mcp-multimodal3. Add to your MCP client (Cursor, Claude Desktop, VS Code, etc.) — see Install below.
No credits required to start. Free models such as
google/gemma-4-26b-a4b-it:freework for chat and vision. Video/audio generation typically needs credits.
Install
MCP servers are distributed through several packaging models. This server is implemented in Node.js/TypeScript; the table below maps each ecosystem method to how you run it here.
Method | Runtime | Best for | This server |
Node.js 20+ | Most MCP clients (default) | ✅ | |
Python 3.10+ and Node.js 20+ | Python-first workflows, same pattern as PyPI MCP servers | ||
Node.js 20+ | Pin a version without re-downloading | ✅ | |
Node.js 20+ | Contributors / air-gapped builds | ✅ | |
Docker | Isolation, no Node on host | ✅ | |
Docker | GitHub-native OCI pulls | ✅ | |
Node.js (via installer) | Interactive install into Claude/Cursor/etc. | ✅ | |
npm or OCI | Official discovery ( | ✅ listing | |
Node.js | Cursor, VS Code, Kiro | ✅ | |
Node.js | Terminal-first Claude Code users | ✅ | |
Node.js | Debug / list tools locally | ✅ | |
Windows | Node.js | Claude Desktop / Cursor when | |
pip / uv (direct) | — | Native Python MCP servers only | — use uvx row above |
DXT desktop extensions | — | Bundled Claude Desktop | not yet |
Remote HTTP / SSE | — | Hosted Smithery / Cloudflare endpoints | via Smithery |
uvx vs npx: In the MCP ecosystem,
npxruns npm (Node) packages anduvxruns PyPI (Python) packages. Because this server is Node-based,uvxuses a thin Python launcher that execsnpx -y @stabgan/openrouter-mcp-multimodal— you still need Node installed.
One-click
Paste your OPENROUTER_API_KEY when prompted — deeplinks use placeholders so secrets never appear in URLs.
Manual config
export OPENROUTER_API_KEY=sk-or-v1-...
npx -y @stabgan/openrouter-mcp-multimodal{
"mcpServers": {
"openrouter": {
"command": "npx",
"args": ["-y", "@stabgan/openrouter-mcp-multimodal"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-..."
}
}
}
}Pin a release: "args": ["-y", "@stabgan/openrouter-mcp-multimodal@4.5.3"]
Install uv (includes uvx), ensure Node.js 20+ is also on your PATH, then:
export OPENROUTER_API_KEY=sk-or-v1-...
uvx mcp-server-openrouter-multimodal
# pin npm version: OPENROUTER_MCP_NPM_VERSION=4.5.3 uvx mcp-server-openrouter-multimodal{
"mcpServers": {
"openrouter": {
"command": "uvx",
"args": ["mcp-server-openrouter-multimodal"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-..."
}
}
}
}pipx equivalent: pipx run mcp-server-openrouter-multimodal
Optional: OPENROUTER_MCP_NPM_VERSION=4.5.3 pins the underlying npm package.
npm install -g @stabgan/openrouter-mcp-multimodal{
"mcpServers": {
"openrouter": {
"command": "openrouter-multimodal",
"env": { "OPENROUTER_API_KEY": "sk-or-v1-..." }
}
}
}git clone https://github.com/stabgan/openrouter-mcp-multimodal.git
cd openrouter-mcp-multimodal
npm ci && npm run build{
"mcpServers": {
"openrouter": {
"command": "node",
"args": ["/absolute/path/to/openrouter-mcp-multimodal/dist/index.js"],
"env": { "OPENROUTER_API_KEY": "sk-or-v1-..." }
}
}
}docker run --rm -i -e OPENROUTER_API_KEY=sk-or-v1-... stabgan/openrouter-mcp-multimodal:latest{
"mcpServers": {
"openrouter": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"OPENROUTER_API_KEY=sk-or-v1-...",
"stabgan/openrouter-mcp-multimodal:latest"
]
}
}
}Use -i (interactive stdio). Avoid -t (TTY corrupts MCP framing on some hosts).
docker run --rm -i -e OPENROUTER_API_KEY=sk-or-v1-... \
ghcr.io/stabgan/openrouter-mcp-multimodal:4.5.3{
"mcpServers": {
"openrouter": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "OPENROUTER_API_KEY=sk-or-v1-...",
"ghcr.io/stabgan/openrouter-mcp-multimodal:latest"
]
}
}
}Interactive install (writes config for your client):
npx -y @smithery/cli install @stabgan/openrouter-mcp-multimodal --client claude
# or: --client cursor | vscode | windsurf | ...Listing: smithery.ai/server/@stabgan/openrouter-mcp-multimodal
Official name: io.github.stabgan/openrouter-multimodal
Registry: registry.modelcontextprotocol.io
npm package:
@stabgan/openrouter-mcp-multimodalOCI image:
docker.io/stabgan/openrouter-mcp-multimodal
Clients that support registry-driven install will offer npm or Docker; otherwise use the JSON blocks above.
claude mcp add openrouter -- npx -y @stabgan/openrouter-mcp-multimodal
# project scope:
claude mcp add --scope project openrouter -- npx -y @stabgan/openrouter-mcp-multimodalSet OPENROUTER_API_KEY in your shell or client env before starting Claude Code.
Debug tools/list and tool calls against a live OpenRouter key:
export OPENROUTER_API_KEY=sk-or-v1-...
npx -y @modelcontextprotocol/inspector npx -y @stabgan/openrouter-mcp-multimodalWhen Claude Desktop or Cursor cannot find npx (GUI apps often miss shell PATH), wrap with cmd:
{
"mcpServers": {
"openrouter": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@stabgan/openrouter-mcp-multimodal"],
"env": { "OPENROUTER_API_KEY": "sk-or-v1-..." }
}
}
}If still failing, use the full path from where npx as the command.
Why this server?
Capability | This server | Typical MCP LLM servers |
Text chat (300+ models) | ✅ | ✅ |
Image analysis + generation | ✅ | partial |
Audio analysis + TTS | ✅ | ❌ |
Video analysis + generation | ✅ | ❌ |
Model search / validate / rerank | ✅ | ❌ |
Path sandbox + SSRF protection | ✅ | rare |
MCP 2025 structured outputs | ✅ | rare |
Async video + progress notifications | ✅ | ❌ |
Tools
14 MCP tools. Each description includes Use when, Good/Bad examples, Fails when, and Works with so agents pick the right tool and recover from errors.
Tool | Purpose |
| Text chat, web search, provider routing, caching, reasoning |
| Vision — local path, URL, or data URL + |
| Transcribe / analyze audio files |
| Describe / Q&A over video files |
| Text-to-image with optional reference images |
| Text-to-speech / music |
| Text-to-video (async, resumable) |
| Image-to-video (narrower schema) |
| Poll / resume video jobs |
| Paginated model catalog search |
| Pricing, context, modalities |
| Cheap model ID existence check |
| Relevance ranking for RAG |
| API key + reachability probe |
Errors use a closed _meta.code taxonomy: INVALID_INPUT · UNSAFE_PATH · UPSTREAM_* · MODEL_NOT_FOUND · JOB_STILL_RUNNING · and more.
Examples
Chat (free model)
{
"tool": "chat_completion",
"arguments": {
"model": "google/gemma-4-26b-a4b-it:free",
"messages": [{ "role": "user", "content": "Summarize MCP in one sentence." }]
}
}Analyze an image
{
"tool": "analyze_image",
"arguments": {
"image_path": "diagram.png",
"question": "List every label in this diagram."
}
}Use
image_pathandquestion— notimage/prompt.
Search models (vision + free)
{
"tool": "search_models",
"arguments": {
"query": "gemma",
"capabilities": { "vision": true },
"limit": 10,
"offset": 0
}
}Generate video (async)
{
"tool": "generate_video",
"arguments": {
"model": "google/veo-3.1",
"prompt": "Ocean waves at sunrise, cinematic drone shot",
"duration": 4,
"save_path": "river.mp4"
}
}If the job is still running when max_wait_ms elapses, the response succeeds with _meta.code: JOB_STILL_RUNNING and a video_id — call get_video_status to resume. This is not an error.
More examples: docs/plans/tool-description-improvement.md
Security
Input path sandbox —
analyze_*and reference images must stay insideOPENROUTER_INPUT_DIROutput path sandbox —
save_pathmust stay insideOPENROUTER_OUTPUT_DIRSSRF protection — private/reserved IPs blocked on URL fetches
Untrusted content — analyze outputs tagged
_meta.content_is_untrusted: true
Override sandboxes only with OPENROUTER_ALLOW_UNSAFE_PATHS=1 (discouraged).
Configuration
Variable | Required | Default | Description |
| Yes | — | OpenRouter API key |
| No |
| Default when tools omit |
| No |
| Model used by live integration tests |
| No |
| Sandbox root for |
| No | — | Sandbox root for local input files |
| No |
|
|
See .env.example for the full list (provider routing, image/audio/video limits, caching, video polling).
Development
git clone https://github.com/stabgan/openrouter-mcp-multimodal.git
cd openrouter-mcp-multimodal
npm install
cp .env.example .env # add OPENROUTER_API_KEY
npm run buildTesting
Command | What it runs |
| 652 unit + mock tests (no API key, <2s) |
| Security + schema regression guards |
| 16 live OpenRouter scenarios (requires |
| Full MCP stdio smoke ( |
| lint + format + build + all of the above except e2e |
Free models for CI / zero-credit accounts: integration tests default to google/gemma-4-26b-a4b-it:free (override with OPENROUTER_INTEGRATION_MODEL). GitHub Actions requires the OPENROUTER_API_KEY repository secret.
Mock tests live under src/__tests__/mock/ and cover handlers, path sandboxes, SSRF blocks, model-cache pagination, tool descriptions, and structured outputs — 330+ additional cases beyond the core suite.
npm run lint
npm run format:checkFAQ
Do I need paid OpenRouter credits?
No, to get started. Free models work for chat and vision. Audio/video generation usually requires credits; analysis may return 402 on some models — the server surfaces that as a structured error.
Which MCP clients are supported?
Any MCP-compatible client over stdio: Cursor, Claude Desktop, VS Code Copilot, Windsurf, Cline, Kiro, and custom agents.
How is this different from calling OpenRouter directly?
This server adds MCP tool schemas, security sandboxes, error taxonomy, model caching, async video polling with progress notifications, and agent-oriented tool descriptions — so LLMs invoke the right capability without custom HTTP glue.
Where is the security advisory for path traversal?
Fixed in 4.5.2+ — see GHSA-3q7p-736f-x44v and docs/solutions/security-issues/.
Compatibility
Works with any MCP client. Protocol: MCP 2025-06-18. Node ≥ 20 (Docker image uses Node 22).
License
Apache 2.0 — see LICENSE.
Contributing
Issues and PRs welcome. For large changes, open an issue first. Run npm run ci before submitting.
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/stabgan/openrouter-mcp-multimodal'
If you have feedback or need assistance with the MCP directory API, please join our Discord server