OpenRouter MCP 多模态服务器
为 OpenRouter 提供文本聊天和图像分析工具的 MCP 服务器。
快速入门
安装
- 通过 npm 安装 npm install -g @stabgan/openrouter-mcp-multimodal
- 通过 Docker 运行 docker run -i -e OPENROUTER_API_KEY=your-api-key-here stabgandocker/openrouter-mcp-multimodal:latest
配置
在 MCP 设置文件中添加以下内容: { "mcpServers": { "openrouter": { "command": "npx", "args": [ "-y", "@stabgan/openrouter-mcp-multimodal" ], "env": { "OPENROUTER_API_KEY": "your-api-key-here", "DEFAULT_MODEL": "qwen/qwen2.5-vl-32b-instruct:free" } } } }
示例
使用 mcp_openrouter_chat_completion
工具发送消息:
use_mcp_tool({
server_name: "openrouter",
tool_name: "mcp_openrouter_chat_completion",
arguments: {
model: "google/gemini-2.5-pro-exp-03-25:free",
messages: [
{
role: "user",
content: "法国的首都是哪里?"
}
]
}
});