openrouter-multimodal MCP Server
Chat with 300+ LLMs via OpenRouter. Analyze and generate images, audio, and video from MCP.
openrouter-multimodal scores 73 (Good), licensed Apache-2.0 and written in TypeScript. It installs as a local process. It declares 21 tools. Filed under Developer tools, Media, AI and memory. GitHub shows 105 stars. Package registries report about 437 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
73 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: apache-2.0.
License, quality and maintenance
Quality: Grade B
84/100 for listing completeness. Lost points: 6 of 21 tools barely described, short summary, no docs link.
How quality is graded
Where the 73 comes from
22 + 20 + 7 + 10 + 4 + 10 = 73. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 7 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "stabgan-openrouter-mcp-multimodal": { "command": "npx", "args": [ "-y", "@stabgan/openrouter-mcp-multimodal@4.5.1" ], "env": { "OPENROUTER_API_KEY": "YOUR_OPENROUTER_API_KEY", "OPENROUTER_DEFAULT_MODEL": "", "OPENROUTER_OUTPUT_DIR": "", "OPENROUTER_MAX_TOKENS": "", "OPENROUTER_PROVIDER_SORT": "", "OPENROUTER_PROVIDER_IGNORE": "", "OPENROUTER_PROVIDER_ORDER": "", "OPENROUTER_PROVIDER_QUANTIZATIONS": "", "OPENROUTER_PROVIDER_REQUIRE_PARAMETERS": "", "OPENROUTER_PROVIDER_DATA_COLLECTION": "", "OPENROUTER_PROVIDER_ALLOW_FALLBACKS": "", "OPENROUTER_CACHE_RESPONSES": "", "OPENROUTER_INCLUDE_REASONING": "" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
OPENROUTER_API_KEYSecret | Required | OpenRouter API key. Get one free at https://openrouter.ai/keys |
OPENROUTER_DEFAULT_MODEL | Optional | Default model for chat + analyze tools. Defaults to nvidia/nemotron-nano-12b-v2-vl:free. |
OPENROUTER_OUTPUT_DIR | Optional | Sandbox root for save_path on generate_* tools. Defaults to the current working directory. |
OPENROUTER_MAX_TOKENS | Optional | Default max_tokens for chat_completion when unset in the request. |
OPENROUTER_PROVIDER_SORT | Optional | price / throughput / latency |
OPENROUTER_PROVIDER_IGNORE | Optional | CSV of provider slugs to exclude. |
OPENROUTER_PROVIDER_ORDER | Optional | JSON array or CSV of preferred provider IDs. |
OPENROUTER_PROVIDER_QUANTIZATIONS | Optional | CSV of quantization levels (fp16,int8). |
OPENROUTER_PROVIDER_REQUIRE_PARAMETERS | Optional | true/false. Require providers to support all request params. |
OPENROUTER_PROVIDER_DATA_COLLECTION | Optional | allow/deny |
OPENROUTER_PROVIDER_ALLOW_FALLBACKS | Optional | true/false |
OPENROUTER_CACHE_RESPONSES | Optional | Enable response caching server-wide. Sends X-OpenRouter-Cache: true on every chat/analyze call unless overridden per-request. Zero tokens billed on cache hits. |
OPENROUTER_INCLUDE_REASONING | Optional | Enable reasoning tokens passthrough server-wide. Adds _meta.reasoning to chat_completion responses for DeepSeek R1 / Gemini Thinking / Opus 4.7. |
OPENROUTER_API_KEYSecret | Required | OpenRouter API key. Get one free at https://openrouter.ai/keys |
Tools21Tool docs quality grade D
All capabilitiesanalyze_audiotoolTranscribe / analyze audio files
analyze_imagetoolVision — local path, URL, or data URL + question
analyze_videotoolDescribe / Q&A over video files
chat_completiontoolText chat, web search, provider routing, caching, reasoning, structured output
embed_texttoolVector embeddings (37+ models: text-embedding-3-small/large, Nomic, etc.)
generate_audiotoolText-to-speech / music via chat completions
generate_imagetoolText-to-image via chat completions with reference images
Text-to-image via dedicated /api/v1/images (resolution, quality, format)
generate_videotoolText-to-video (async, resumable)
Image-to-video (narrower schema)
Poll / retrieve async completion results
get_model_infotoolPricing, context, modalities
About
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 | chat_completion, start_chat_completion, get_chat_completion_status | 300+ models, :nitro / :floor / :free / :online / :exacto suffixes, provider routing, web search, response caching, reasoning tokens, reasoning effort control, structured output (JSON Schema), async jobs, multi-model fusion, subagent delegation, response healing |
| Vision | analyze_image, generate_image, generate_image_dedicated | OCR, captioning, VQA, image generation with reference inputs, dedicated Image API with resolution/quality/format control |
| Audio | analyze_audio, generate_audio, text_to_speech, speech_to_text | Transcription, speech/music generation, dedicated TTS (Deepgram, ElevenLabs, OpenAI; free Deepgram default, voices, mp3/pcm), dedicated STT (Whisper, GPT-4o Transcribe, Voxtral, ElevenLabs Scribe) |
| Video | analyze_video, generate_video, generate_video_from_image, get_video_status | Clip understanding, Veo 3.1 / Seedance 2.5 / Kling v3.0 / Wan 2.7 / Grok Imagine Video generation with progress notifications |
| Embedding | embed_text | 37+ embedding models (text-embedding-3-small/large, Nomic, Jina, Voyage, etc.) |
| Decisions | decide | Structured yes/no, choice, or score decisions with calibrated probabilities (System One models) |
| Catalog | search_models, get_model_info, validate_model, rerank_documents, health_check | 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-11-25 structured outputs + tool icons, async video progress notifications, and 3929 automated tests (3905 unit/mock + 7 regression + 17 live integration).
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-multimodal
3. Add to your MCP client — copy one JSON block from Install into your client config:
| Client | Config location |
|---|---|
| Cursor | Project: .cursor/mcp.json · User: Cursor Settings → MCP |
| Claude Desktop | macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json |
| VS Code | .vscode/mcp.json (workspace) or User Settings → MCP |
| Windsurf | Windsurf Settings → MCP (same mcpServers JSON shape as Cursor) |
Use the mcpServers object from Manual config 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 |
|---|---|---|---|
| npx | Node.js 22+ | Most MCP clients (default) | ✅ @stabgan/openrouter-mcp-multimodal |
| uvx / pipx | Python 3.10+ and Node.js 22+ | Python-first workflows, same pattern as PyPI MCP servers | ✅ mcp-server-openrouter-multimodal |
| npm global | Node.js 22+ | Pin a version without re-downloading | ✅ |
| node (local) | Node.js 22+ | Contributors / air-gapped builds | ✅ |
| Docker Hub | Docker | Isolation, no Node on host | ✅ stabgan/openrouter-mcp-multimodal |
| GHCR | Docker | GitHub-native OCI pulls | ✅ ghcr.io/stabgan/openrouter-mcp-multimodal |
| Smithery CLI | Node.js (via installer) | Interactive install into Claude/Cursor/etc. | ✅ |
| MCP Registry | npm or OCI | Official discovery (io.github.stabgan/openrouter-multimodal) | ✅ listing |
| One-click deeplinks | Node.js | Cursor, VS Code, Kiro | ✅ |
| Claude Code CLI | Node.js | Terminal-first Claude Code users | ✅ |
| MCP Inspector | Node.js | Debug / list tools locally | ✅ |
Windows cmd /c npx | Node.js | Claude Desktop / Cursor when npx not on GUI PATH | ✅ see below |
| pip / uv (direct) | — | Native Python MCP servers only | — use uvx row above |
| DXT desktop extensions | — | Bundled Claude Desktop .dxt | 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@5.1.3"]
Install uv (includes uvx), ensure Node.js 22+ 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=5.1.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=5.1.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:5.1.3
{
"mcpServers": {
"openrouter": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"OPENROUTER_API_KEY=sk-or-v1-...",
"ghcr.io/stabgan/openrouter-mcp-multimodal:5.1.3"
]
}
}
}
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-multimodal - OCI 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-multimodal
Set 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-multimodal
When 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 + STT | ✅ | ❌ |
| Video analysis + generation | ✅ | ❌ |
| Vector embeddings (37+ models) | ✅ | ❌ |
| Structured decisions (System One) | ✅ | ❌ |
| Model search / validate / rerank | ✅ | ❌ |
| Path sandbox + SSRF protection | ✅ | rare |
| MCP 2025 structured outputs | ✅ | rare |
| Async video + progress notifications | ✅ | ❌ |
Tools
21 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 |
|---|---|
chat_completion | Text chat, web search, provider routing, caching, reasoning, structured output |
start_chat_completion | Async background job for long-running reasoning models |
get_chat_completion_status | Poll / retrieve async completion results |
analyze_image | Vision — local path, URL, or data URL + question |
analyze_audio | Transcribe / analyze audio files |
analyze_video | Describe / Q&A over video files |
generate_image | Text-to-image via chat completions with reference images |
generate_image_dedicated | Text-to-image via dedicated /api/v1/images (resolution, quality, format) |
generate_audio | Text-to-speech / music via chat completions |
text_to_speech | Dedicated TTS (/api/v1/audio/speech) — Deepgram, ElevenLabs, OpenAI; voices, speed, mp3/pcm |
speech_to_text | Dedicated STT (/api/v1/audio/transcriptions) — Whisper, GPT-4o Transcribe, Voxtral, ElevenLabs Scribe |
generate_video | Text-to-video (async, resumable) |
generate_video_from_image | Image-to-video (narrower schema) |
get_video_status | Poll / resume video jobs |
search_models | Paginated model catalog search |
get_model_info | Pricing, context, modalities |
validate_model | Cheap model ID existence check |
rerank_documents | Relevance ranking for RAG |
embed_text | Vector embeddings (37+ models: text-embedding-3-small/large, Nomic, etc.) |
decide | Structured decisions with calibrated probabilities (System One models) |
health_check | API key + reachability probe |
Every error carries _meta.code from a closed taxonomy (13 codes). Switch on these for programmatic handling:
_meta.code | Meaning | Recovery |
|---|---|---|
INVALID_INPUT | Bad or missing arguments | Check tool description for correct schema |
INVALID_CREDENTIALS | API key missing, invalid, or revoked | Regenerate at openrouter.ai/keys |
UNSAFE_PATH | Local path escaped the input/output sandbox | Move files under OPENROUTER_INPUT_DIR / OPENROUTER_OUTPUT_DIR |
UPSTREAM_HTTP | Non-auth HTTP error from OpenRouter (4xx/5xx) | Check _meta.details.status; retry if transient |
UPSTREAM_TIMEOUT | Upstream did not respond in time | Retry, or use start_chat_completion for slow models |
UPSTREAM_REFUSED | Content policy, rate limit, or insufficient credits | Check _meta.retry_after_seconds; review prompt or add credits |
UNSUPPORTED_FORMAT | File is not a recognized media format | Verify file type matches tool expectations |
RESOURCE_TOO_LARGE | File exceeds fetch/inline size cap | Trim file or use save_path to skip inline |
ZDR_INCOMPATIBLE | Model/provider requires zero data retention | Use a ZDR-compatible provider or different model |
MODEL_NOT_FOUND | Model slug not in OpenRouter catalog | Run validate_model or search_models first |
JOB_FAILED | Async job (video/chat) failed on provider side | Check _meta.details; retry or change model |
JOB_STILL_RUNNING | Async job not yet complete (not an error) | Call get_video_status / get_chat_completion_status to poll |
INTERNAL | Unexpected server-side error | Report if reproducible |
Errors include _meta.suggestions with agent-oriented next steps when available.
Binary tool results (v4.7.0+)
Generate tools (generate_image, generate_image_dedicated, generate_audio, text_to_speech, generate_video, generate_video_from_image, get_video_status) return image, audio, or video bytes. As of 4.7.0 the behavior is explicit:
save_path | Tool result |
|---|---|
| Set | Text pointer only — e.g. Image saved to: out.png (… bytes, image/png) plus _meta.save_path. No inline base64 (avoids duplicating large payloads in the MCP channel). |
| Unset, under byte ceiling | Inline media block and summary text (images/audio use MCP image / audio types; video uses MCP resource blocks). |
| Unset, over ceiling | Text only with a hint to pass save_path. |
Default inline ceilings (override per kind or globally):
| Kind | Default | Env vars (precedence: per-kind → global) |
|---|---|---|
| Image | 1 MiB | OPENROUTER_IMAGE_INLINE_MAX_BYTES → OPENROUTER_INLINE_MAX_BYTES |
| Audio | 1 MiB | OPENROUTER_AUDIO_INLINE_MAX_BYTES → OPENROUTER_INLINE_MAX_BYTES |
| Video | 10 MiB | OPENROUTER_VIDEO_INLINE_MAX_BYTES → OPENROUTER_INLINE_MAX_BYTES |
If you previously relied on both a saved file and inline media in the same tool result, read the file from _meta.save_path (or omit save_path to get inline media when under the ceiling).
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." }]
}
}
Chat with structured output (JSON Schema)
{
"tool": "chat_completion",
"arguments": {
"model": "openai/gpt-4o",
"messages": [{ "role": "user", "content": "Extract the name and age from: 'Alice is 30 years old.'" }],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "person",
"schema": {
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"required": ["name", "age"]
}
}
}
}
}
For simpler JSON without a schema, use
"response_format": { "type": "json_object" }. Add"response_healing": trueto auto-fix malformed JSON.
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.
With save_path set (as above), the result is a text pointer to the saved file once complete — not inline video. See Binary tool results.
Embed text (vector embeddings)
{
"tool": "embed_text",
"arguments": {
"texts": ["What is MCP?", "Model Context Protocol enables tool use for LLMs."],
"model": "openai/text-embedding-3-small",
"dimensions": 1024
}
}
Returns embedding arrays for RAG, semantic search, or clustering. 37+ models supported — pass a single string or an array of up to 2048 texts.
Structured decision (System One)
{
"tool": "decide",
"arguments": {
"questions": {
"is_bug": {
"type": "noul",
"instructions": "Is this a bug report or a feature request?",
"criteria": {
"true": "Describes broken or incorrect behavior",
"false": "Requests new functionality"
}
}
},
"state": {
"ticket": "The login button does not respond when clicked on Safari."
}
}
}
Returns calibrated probabilities instead of generated text. Three question types: noul (yes/no), choice (pick one category), score (ordinal rubric). Models: typesafe/jev-1.13 (default), upstage/solar-decide, microsoft/decision-1.
More examples: docs/plans/tool-description-improvement.md
Security
- Input path sandbox — local paths on
analyze_*and reference images must stay insideOPENROUTER_INPUT_DIR(falls back toOPENROUTER_OUTPUT_DIR, thencwd) - Output path sandbox —
save_pathmust stay insideOPENROUTER_OUTPUT_DIR - Async job reads —
get_chat_completion_statusresolves disk paths only underOPENROUTER_OUTPUT_DIR/openrouter-jobs/(4.7.0+) - SSRF protection — private/reserved IPs blocked on URL fetches
- Untrusted content — analyze outputs tagged
_meta.content_is_untrusted: true - Prototype-pollution defense — all API output boundaries (model records, embeddings, decisions, rerank results, log context) recursively strip
__proto__,constructor, andprototypekeys before forwarding to MCP clients - Secret redaction — the stderr JSON logger redacts API keys and sensitive values; stdout is reserved for MCP protocol traffic
Override sandboxes only with OPENROUTER_ALLOW_UNSAFE_PATHS=1 (discouraged).
Report vulnerabilities: SECURITY.md (private disclosure — do not file public issues for exploits).
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
OPENROUTER_API_KEY | Yes | — | OpenRouter API key |
OPENROUTER_DEFAULT_MODEL | No | google/gemma-4-26b-a4b-it:free | Default when tools omit model |
OPENROUTER_OUTPUT_DIR | No | cwd | Sandbox root for save_path |
OPENROUTER_INPUT_DIR | No | OUTPUT_DIR or cwd | Sandbox root for local input files |
OPENROUTER_INLINE_MAX_BYTES | No | 1048576 (image/audio) | Global inline media ceiling |
OPENROUTER_IMAGE_INLINE_MAX_BYTES | No | falls back to global | Per-kind inline ceiling |
OPENROUTER_AUDIO_INLINE_MAX_BYTES | No | falls back to global | Per-kind inline ceiling |
OPENROUTER_VIDEO_INLINE_MAX_BYTES | No | 10485760 | Video inline ceiling |
OPENROUTER_LOG_LEVEL | No | info | error / warn / info / debug |
See .env.example for the full list (provider routing, fetch limits, caching, video polling, async jobs, integration-test overrides).
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 build
Testing
| Command | What it runs |
|---|---|
npm test | 3905 unit + mock tests (no API key, <20s) |
npm run test:regression | 7 security + schema regression guards |
npm run test:integration | 17 live OpenRouter scenarios (requires .env key) |
npm run test:e2e | Full MCP stdio smoke (scripts/live-e2e.mjs) |
npm run ci | lint + format + version sync + build + all tests |
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 — 396 additional cases beyond the core suite.
npm run lint
npm run format:check
npm run version:check # package.json vs src/version.ts, server.json, pyproject.toml
Releasing
Published artifacts (npm, PyPI/uvx, Docker, GHCR) all ship from the same semver on a git tag (vX.Y.Z). Pushing to main runs tests but does not publish to npm or PyPI.
Normal flow: merge conventional commits to main → Release Please opens a Release PR → merge it → tag is created → CI publishes everywhere.
Manual flow: bump all version files → npm run version:check → npm run ci + smoke tests → commit → git tag vX.Y.Z → git push origin vX.Y.Z.
Full checklist, file list, CI secrets, and agent instructions:
docs/RELEASING.md— maintainer release guideAGENTS.md— quick reference for AI agents
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Server exits immediately / OPENROUTER_API_KEY is required | Missing or empty API key | Set OPENROUTER_API_KEY in client env or shell — get one at openrouter.ai/keys |
_meta.code: INVALID_CREDENTIALS or HTTP 401 | Bad or revoked key | Regenerate at openrouter.ai/keys; restart the MCP client |
_meta.code: MODEL_NOT_FOUND | Typo or retired model ID | Run search_models or validate_model; check openrouter.ai/models |
| HTTP 402 / insufficient credits | Paid model or generation on zero balance | Add credits at openrouter.ai/credits or use a :free model |
_meta.code: UPSTREAM_HTTP with 429 | Rate limit | Wait for _meta.retry_after_seconds if present; reduce concurrency |
_meta.code: UNSAFE_PATH | Local path outside sandbox | Put files under OPENROUTER_INPUT_DIR or set OPENROUTER_OUTPUT_DIR wider; see Security |
npx not found (Windows GUI apps) | GUI PATH differs from terminal | Use the Windows npx cmd /c wrapper |
| No inline image/audio after upgrade | v4.7.0 with save_path set | Expected — result is text + _meta.save_path only; omit save_path or read the saved file |
| MCP client shows stale tool list | Client cache | Restart MCP / reload window after upgrading the package pin |
Structured errors include _meta.suggestions with agent-oriented next steps when available.
FAQ
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, SECURITY.md, and docs/solutions/security-issues/.
Compatibility
Works with any MCP client. Protocol: MCP 2025-11-25 (backwards-compatible with 2025-06-18 and earlier). Node ≥ 22 (Docker image uses Node 24).
License
Apache 2.0 — see LICENSE.
Contributing
Issues and PRs welcome. For large changes, open an issue first.
Before submitting: run npm run ci. Use Conventional Commits (fix:, feat:, etc.) so Release Please can cut the next release. See docs/RELEASING.md if you need to ship a version.
Frequently asked questions
What is openrouter-multimodal MCP Server?
Chat with 300+ LLMs via OpenRouter. Analyze and generate images, audio, and video from MCP.
How do I install openrouter-multimodal MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. openrouter-multimodal MCP Server runs locally from the npm package @stabgan/openrouter-mcp-multimodal with the command npx -y @stabgan/openrouter-mcp-multimodal@4.5.1.
Is openrouter-multimodal MCP Server free and open source?
Yes. openrouter-multimodal MCP Server is released under the Apache-2.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does openrouter-multimodal MCP Server support remote (HTTP) connections?
No remote endpoint is listed for openrouter-multimodal MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does openrouter-multimodal MCP Server provide?
openrouter-multimodal MCP Server provides 21 tools, including analyze_audio, analyze_image, analyze_video, and chat_completion. See the full tool list for descriptions and parameters.
How is openrouter-multimodal MCP Server's trust score calculated?
openrouter-multimodal MCP Server scores 73 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.