What is this?
OpenRouter MCP Multimodal is a production-grade Model Context Protocol (MCP) server — listed on the official MCP Registry as . It connects AI coding agents (, , , , , and others) to 's unified LLM API over stdio.
Power your agent
คำสั่งของผู้เผยแพร่เอง ไม่ใช่เอนด์พอยต์ของ PlugMCP
Host a copy with our keys and logs.
npx -y @stabgan/[email protected]Claude Code ไม่มีลิงก์ติดตั้งสำหรับคำสั่งแบบโลคัล ให้คัดลอกคำสั่งด้านล่างแล้วรันในเทอร์มินัล
claude mcp add stabgan-openrouter-mcp-multimodal -- npx -y @stabgan/openrouter-mcp-multimodal@5.1.3รันในเทอร์มินัล
{ "mcpServers": { "stabgan-openrouter-mcp-multimodal": { "command": "npx", "args": [ "-y", "@stabgan/[email protected]" ] } }}claude_desktop_config.json
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
OpenRouter MCP Multimodal is a production-grade Model Context Protocol (MCP) server — listed on the official MCP Registry as . It connects AI coding agents (, , , , , and others) to 's unified LLM API over stdio.
MCP server for OpenRouter — 21 tools: chat with 300+ LLMs, analyze & generate images/audio/video, TTS/STT, embeddings, reranking, structured decisions, async completions, response caching
io.github.stabgan/openrouter-multimodalUnlike text-only MCP servers, one install covers the full multimodal surface:
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).
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:
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.
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.
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.
Paste your OPENROUTER_API_KEY when prompted — deeplinks use placeholders so secrets never appear in URLs.
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/[email protected]"]
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 | ...
Official name: io.github.stabgan/openrouter-multimodal
@stabgan/openrouter-mcp-multimodaldocker.io/stabgan/openrouter-mcp-multimodalClients 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.
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.
Every error carries _meta.code from a closed taxonomy (13 codes). Switch on these for programmatic handling:
Errors include _meta.suggestions with agent-oriented next steps when available.
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:
Default inline ceilings (override per kind or globally):
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).
{
"tool": "chat_completion",
"arguments": {
"model": "google/gemma-4-26b-a4b-it:free",
"messages": [{ "role": "user", "content": "Summarize MCP in one sentence." }]
}
}
{
"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.
{
"tool": "analyze_image",
"arguments": {
"image_path": "diagram.png",
"question": "List every label in this diagram."
}
}
Use
image_pathandquestion— notimage/prompt.
{
"tool": "search_models",
"arguments": {
"query": "gemma",
"capabilities": { "vision": true },
"limit": 10,
"offset": 0
}
}
{
"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.
{
"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.
{
"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
analyze_* and reference images must stay inside OPENROUTER_INPUT_DIR (falls back to OPENROUTER_OUTPUT_DIR, then cwd)save_path must stay inside OPENROUTER_OUTPUT_DIRget_chat_completion_status resolves disk paths only under OPENROUTER_OUTPUT_DIR/openrouter-jobs/ (4.7.0+)_meta.content_is_untrusted: true__proto__, constructor, and prototype keys before forwarding to MCP clientsOverride sandboxes only with OPENROUTER_ALLOW_UNSAFE_PATHS=1 (discouraged).
Report vulnerabilities: SECURITY.md (private disclosure — do not file public issues for exploits).
See .env.example for the full list (provider routing, fetch limits, caching, video polling, async jobs, integration-test overrides).
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
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
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 agentsStructured errors include _meta.suggestions with agent-oriented next steps when available.
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.
Any MCP-compatible client over stdio: Cursor, Claude Desktop, VS Code Copilot, Windsurf, Cline, Kiro, and custom agents.
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.
Fixed in 4.5.2+ — see GHSA-3q7p-736f-x44v, SECURITY.md, and docs/solutions/security-issues/.
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).
Apache 2.0 — see LICENSE.
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.
MCP server for OpenRouter — 21 tools: chat with 300+ LLMs, analyze & generate images/audio/video, TTS/STT, embeddings, reranking, structured decisions, async completions, response caching
{ "mcpServers": { "stabgan-openrouter-mcp-multimodal": { "command": "npx", "args": [ "-y", "@stabgan/[email protected]" ] } }}เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
@stabgan/openrouter MCP Multimodal ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-11-15 MCP server for OpenRouter — 21 tools: chat with 300+ LLMs, analyze & generate images/audio/video, TTS/STT, embeddings, reranking, structured decisions, async completions, response caching