AI Router MCP Server
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., "@AI Router MCP ServerAnalyze this image: /home/user/photo.jpg"
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.
AI Router v2.0 — 多模型智能路由
一个智能的多模型协作程序:图片 → 可切换的视觉模型看图 → DeepSeek 归纳总结 → 最终回答。
纯文本问题直接交给 DeepSeek 处理。
🎯 为什么需要这个程序?
模型 | 优势 | 短板 |
DeepSeek | 推理强、总结好、超便宜 | ❌ 不支持图片输入(纯文本模型) |
视觉模型 | 强大的视觉理解、看图说话 | 归纳总结不如 DeepSeek |
💡 解决方案:取长补短,视觉模型看图 → DeepSeek 总结 → 用户得到最佳回答。
视觉模型可自由切换:Kimi / OpenAI GPT-4o / 通义千问 VL / 智谱 GLM-4V / Google Gemini / 自定义端点。
Related MCP server: glm-vision-mcp-server
🏗 架构
用户输入(文字 + 可选图片)
│
▼
┌─────────────────┐
│ Input Router │ 检测输入类型
└─────┬───────────┘
│
├── 有图片 ──→ [视觉模型] 看图 ──→ 文字描述
│ (kimi/openai/qwen/glm/gemini/custom)
│ │
└── 无图片 ──────────────────────────────┤
▼
┌─────────────────┐
│ DeepSeek Chat │
│ 归纳总结 / 回答 │
└────────┬────────┘
│
▼
最终回答 → 用户🚀 快速开始
1. 安装依赖
cd ai-router
pip install -r requirements.txt
# 如果要用 Gemini 做视觉,额外安装:
# pip install google-genai2. 配置 API Key
cp .env.example .env
# 编辑 .env,填入 API Key:
# DEEPSEEK_API_KEY=sk-你的deepseek-key
# VISION_API_KEY=sk-你的视觉模型-key
# VISION_PROVIDER=kimi (或 openai/qwen/glm/gemini/custom)API Key 获取地址:
DeepSeek: https://platform.deepseek.com
OpenAI: https://platform.openai.com
Gemini: https://aistudio.google.com
3. 使用
命令行
# 纯文本 → DeepSeek
python main.py "量子计算是什么?"
# 图片分析(默认 Kimi)
python main.py "这张图里有什么?" -i photo.jpg
# 切换到 OpenAI GPT-4o
python main.py "分析图表" -i chart.png --vision openai
# 切换到通义千问
python main.py "描述图片" -i img.jpg --vision qwen
# 查看所有供应商
python main.py --list-providers
# 交互模式(可动态切换)
python main.pyWeb 界面
python server.py # 启动后端
# 然后双击 web_ui.html # 打开前端Claude Code 集成(MCP)
AI Router 可以作为 Claude Code 的 MCP 工具使用,让 Claude 在处理图片问题时自动调用。
配置方式: 项目根目录已有 .mcp.json,Claude Code 重新打开后自动加载。
# 重启 Claude Code 后即可使用
# 在对话中直接说"帮我分析这张图片"即可触发可用的 MCP 工具:
工具 | 说明 |
| 核心工具:发问 + 可选图片 → 管道处理 |
| 列出所有视觉供应商 |
| 切换视觉供应商 |
| 检查配置状态 |
使用示例(在 Claude Code 对话中):
用户:帮我分析 C:/photos/screenshot.png 这张图片里有什么?
Claude 会自动:
1. 调用 ai_router_chat(question="这张图片里有什么?", image_paths=["C:/photos/screenshot.png"])
2. 图片 → Kimi 看图 → DeepSeek 总结 → 返回答案给用户用户:切换到 OpenAI 做视觉理解
Claude 调用:
ai_router_switch_provider(provider_id="openai")📁 文件说明
文件 | 说明 |
| 核心引擎:视觉客户端、DeepSeek 客户端、路由器、Pipeline |
| CLI 命令行入口 |
| HTTP API 服务器(供 Web UI 调用) |
| MCP Server(供 Claude Code 集成) |
| Web 界面(单文件,双击即用) |
| API Key 配置模板 |
| Python 依赖 |
🔧 API 端点
方法 | 路径 | 说明 |
POST |
| 对话接口,支持动态切换供应商 |
GET |
| 健康检查 |
GET |
| 获取配置状态 |
GET |
| 列出所有视觉供应商 |
👁 视觉供应商
ID | 名称 | 默认模型 | 获取 Key |
| Kimi (Moonshot) | kimi-k3 | platform.moonshot.cn |
| OpenAI GPT-4o | gpt-4o | platform.openai.com |
| 通义千问 VL | qwen-vl-max | dashscope.console.aliyun.com |
| 智谱 GLM-4V | glm-4v | open.bigmodel.cn |
| Google Gemini | gemini-2.5-flash | aistudio.google.com |
| 自定义端点 | — | Ollama/vLLM/LiteLLM 等 |
📝 许可
MIT License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/2188195028-crypto/ai-router'
If you have feedback or need assistance with the MCP directory API, please join our Discord server