
Openrouter Multimodal
io.github.stabgan由 GitHub 帳號 stabgan 發布v4.5.1更新於 Nov 3, 2026
Chat with 300+ LLMs via OpenRouter. Analyze and generate images, audio, and video from MCP.
概覽
讓助理透過 OpenRouter 統一介面與 300 多個模型對話,並分析、生成影像、音訊與影片。
- 可以做什麼
- 與 300 多個模型對話,支援非同步工作、結構化輸出、網路搜尋與供應商路由
- 分析影像、音訊與影片檔案,並生成圖片、語音、音樂與影片片段
- 轉錄音訊,並用專用語音工具把文字轉成語音
- 產生向量嵌入、重新排序文件,並取得結構化的判斷或評分結果
- 搜尋、檢視與驗證 OpenRouter 模型目錄,並檢查 API 可用性
- 適用情境
- 適合想用一把金鑰接上多種大型模型,或需要多模態處理(例如讀圖、轉錄錄音、生成圖片、語音或短影片)而不想分別整合的情況。
- 執行需求
- 以 stdio 方式在本機執行,可用 npx(需 Node.js 22+)或 Docker 映像;Python 啟動方式仍需安裝 Node。需要 OPENROUTER_API_KEY 中的 OpenRouter API 金鑰,並能連線至 OpenRouter。選用變數可設定預設模型、輸出目錄、快取、推理內容傳遞與供應商路由。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Openrouter Multimodal,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[OpenRouter MCP Multimodal — MCP server for chat, vision, audio, and video AI tools]
OpenRouter MCP Multimodal
The MCP server for multimodal AI agents.
One install · 21 tools · 300+ OpenRouter models · text, vision, audio & video — analysis and generation.
[npm version] [PyPI version] [GitHub release] [Docker version] [CI status] [Apache 2.0 license] [Node.js 22+]
[npm downloads] [Docker pulls] [MCP Registry] [Smithery MCP registry]
Quick start · Tools · Examples · Security · Troubleshooting · Development · Releasing · FAQ
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:
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
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.
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.
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
npx (recommended)
Pin a release: "args": ["-y", "@stabgan/[email protected]"]
uvx / pipx (Python launcher)
Install uv (includes uvx), ensure Node.js 22+ is also on your PATH, then:
pipx equivalent: pipx run mcp-server-openrouter-multimodal
Optional: OPENROUTER_MCP_NPM_VERSION=5.1.3 pins the underlying npm package.
npm global
node (local clone)
Docker
Use -i (interactive stdio). Avoid -t (TTY corrupts MCP framing on some hosts).
GHCR (GitHub Container Registry)
Smithery
Interactive install (writes config for your client):
Listing: smithery.ai/server/@stabgan/openrouter-mcp-multimodal
MCP Registry
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 Code CLI
Set OPENROUTER_API_KEY in your shell or client env before starting Claude Code.
MCP Inspector
Debug tools/list and tool calls against a live OpenRouter key:
Windows npx
When Claude Desktop or Cursor cannot find npx (GUI apps often miss shell PATH), wrap with cmd:
If still failing, use the full path from where npx as the command.
Why this server?
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.
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.
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:
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).
Examples
Chat (free model)
Chat with structured output (JSON Schema)
For simpler JSON without a schema, use
"response_format": { "type": "json_object" }. Add"response_healing": trueto auto-fix malformed JSON.
Analyze an image
Use
image_pathandquestion— notimage/prompt.
Search models (vision + free)
Generate video (async)
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)
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)
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
Environment variables
See .env.example for the full list (provider routing, fetch limits, caching, video polling, async jobs, integration-test overrides).
Development
Testing
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.
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
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.
來源:README.md,提交 dbc5ceb
工具
0版本歷史
1- v4.5.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分