MCP Vision Server
Enables Claude Code to describe images and extract text using Kimi/Moonshot vision API. Supports local image files with customizable prompts.
README
MCP Vision Server · 视觉识别服务
基于 Kimi/Moonshot 视觉 API 的 MCP 服务器,作为 Claude Code 全局插件使用。传入本地图片路径,返回 AI 对图片内容的详细描述、文字提取等。
MCP server for image recognition via Kimi/Moonshot vision API. Works as a global Claude Code plugin.
中文
功能
- describe_image — 识别图片内容,返回文字描述
- describe_image_to_file — 识别并保存为 UTF-8 文件(解决 Windows 终端中文乱码)
- 支持 PNG / JPG / GIF / WebP / BMP,最大 20MB
- 支持自定义提示词(如"提取所有文字""描述图表结构")
安装
pip install mcp-vision-server
或从源码安装:
git clone https://github.com/coffe-d/MCP-Vision-Server.git
cd mcp-vision-server
pip install -e .
获取 API Key
在 Moonshot 开放平台 注册并创建 API Key。
注册到 Claude Code
claude mcp add vision-server \
--env KIMI_API_KEY="sk-你的密钥" \
-- mcp-vision-server
注册后 Claude Code 即可使用 describe_image 和 describe_image_to_file 两个工具。
配置
| 环境变量 | 必填 | 默认值 | 说明 |
|---|---|---|---|
KIMI_API_KEY |
是 | — | Moonshot API 密钥 |
KIMI_BASE_URL |
否 | https://api.moonshot.cn/v1 |
API 地址 |
KIMI_MODEL |
否 | moonshot-v1-8k-vision-preview |
模型名称 |
工具说明
describe_image — 识别图片,返回文本描述。
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
image_path |
string | 是 | — | 图片绝对路径 |
prompt |
string | 否 | — | 自定义提示词 |
max_tokens |
int | 否 | 4096 | 最大输出长度 |
describe_image_to_file — 识别图片,结果保存为 UTF-8 文件。适合中文环境避免终端乱码。
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
image_path |
string | 是 | — | 图片绝对路径 |
output_path |
string | 否 | 自动(同名 .md) | 输出文件路径 |
常见问题
"KIMI_API_KEY environment variable is not set"
未设置环境变量。注册时确保使用了 --env KIMI_API_KEY="sk-..."。
终端中文乱码
使用 describe_image_to_file 代替 describe_image,结果直接写入 UTF-8 文件。
"不支持的图片格式"
仅支持 PNG、JPG、JPEG、GIF、WebP、BMP 格式。
许可
MIT — 详见 LICENSE。
English
Features
- describe_image — Recognize image content and return text description
- describe_image_to_file — Recognize and save result to a UTF-8 file
- Supports PNG / JPG / GIF / WebP / BMP up to 20MB
- Customizable prompt for targeted extraction
Install
pip install mcp-vision-server
Or from source:
git clone https://github.com/coffe-d/MCP-Vision-Server.git
cd mcp-vision-server
pip install -e .
Get an API key
Sign up at Moonshot Platform and create an API key.
Register with Claude Code
claude mcp add vision-server \
--env KIMI_API_KEY="sk-your-key-here" \
-- mcp-vision-server
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
KIMI_API_KEY |
Yes | — | Moonshot API key |
KIMI_BASE_URL |
No | https://api.moonshot.cn/v1 |
API base URL |
KIMI_MODEL |
No | moonshot-v1-8k-vision-preview |
Model name |
API Reference
describe_image — Return image description as text.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image_path |
string | Yes | — | Absolute path to image |
prompt |
string | No | — | Custom prompt |
max_tokens |
int | No | 4096 | Max output tokens |
describe_image_to_file — Save result to a UTF-8 file.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image_path |
string | Yes | — | Absolute path to image |
output_path |
string | No | auto (.md) | Output file path |
Troubleshooting
"KIMI_API_KEY environment variable is not set" — Make sure you passed --env KIMI_API_KEY="sk-..." when running claude mcp add.
Garbled Chinese in terminal — Use describe_image_to_file to write directly to UTF-8 file.
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。