DeepSeek Vision MCP
DeepSeek Vision MCP
一个安全、轻量级的 MCP v2 服务器,可为任何兼容 MCP 的代理提供 DeepSeek V4 Flash Vision:图像分析、忠实描述、OCR、 对比、UI/对象定位,以及可复用的 Files API 上传。
该服务器暴露精确模型 deepseek-v4-flash-vision-exp,而无需
在每个代理集成中嵌入特定于提供方的图像负载。
工具
工具 | 用途 |
| 使用自定义提示进行通用单图/多图分析 |
| 忠实的场景/UI 描述 |
| 截图/文档 OCR |
| 比较两张或更多图像 |
| 尽力而为的 UI/对象定位,输出归一化坐标 |
| 将本地图像上传到 DeepSeek Files API |
| 列出可复用的已上传图像 |
| 删除已上传的图像 |
可接受的图像引用:
本地服务器端路径
公共
http://或https://URLdata:image/...;base64,...DeepSeek
file-api-...文件 ID
Related MCP server: vision-mcp
为什么这个服务器很轻量
MCP 服务器不运行本地视觉模型。它仅验证/规范化 图像输入,并将推理委托给 DeepSeek。这使得 CPU/RAM 占用极小, 并让任何支持 MCP 的代理无需在代理自身中嵌入 DeepSeek 特定的 负载结构即可获得视觉能力。
使用 uv 安装
git clone https://github.com/groxaxo/deepseek-vision-mcp.git
cd deepseek-vision-mcp
uv sync --locked
cp .env.example .env
# Set DEEPSEEK_API_KEY and allowed roots in .env对于本地 MCP 主机,stdio 是首选传输方式:
DEEPSEEK_API_KEY="..." \
DEEPSEEK_VISION_ALLOWED_ROOTS="/home/you/Pictures:/tmp/vision" \
uv run deepseek-vision-mcp用于 MCP Inspector 开发:
DEEPSEEK_API_KEY="..." uv run mcp dev src/deepseek_vision_mcp/server.pyMCP 主机配置
典型的 stdio 配置:
{
"mcpServers": {
"deepseek-vision": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/deepseek-vision-mcp",
"run",
"deepseek-vision-mcp"
],
"env": {
"DEEPSEEK_API_KEY": "YOUR_KEY",
"DEEPSEEK_VISION_ALLOWED_ROOTS": "/home/you/Pictures:/tmp/vision"
}
}
}
}不要提交 API 密钥。如果主机可以继承环境变量,
建议从你的密钥管理器或 shell 注入 DEEPSEEK_API_KEY。
安全的共享启动器
当多个本地代理共享一个安装时,run-mcp.py 很有用。它:
仅从进程或环境文件中读取已批准的 DeepSeek 变量;
在启动 MCP 前过滤掉不相关的继承机密;
强制使用
stdio传输;将本地图像限制在明确的根目录内。
默认情况下,它读取 ~/.hermes/.env,并允许当前主目录下
常见的图像工作目录以及 /tmp。无需编辑脚本即可覆盖这些选择:
export DEEPSEEK_VISION_ENV_FILE="$HOME/.config/deepseek-vision.env"
export DEEPSEEK_VISION_ALLOWED_ROOTS="$HOME/Pictures:/tmp/vision"
./run-mcp.pyHermes 配置:
mcp_servers:
deepseek-vision:
command: "/absolute/path/to/deepseek-vision-mcp/run-mcp.py"
args: []
enabled: trueOpenCode 配置:
{
"mcp": {
"deepseek-vision": {
"type": "local",
"command": ["/absolute/path/to/deepseek-vision-mcp/run-mcp.py"],
"enabled": true
}
}
}OMP 和其他标准 MCP 主机可以使用上述 mcpServers 示例,
以 run-mcp.py 作为命令。
流式 HTTP
export DEEPSEEK_API_KEY="..."
export MCP_TRANSPORT=streamable-http
export MCP_HOST=127.0.0.1
export MCP_PORT=8000
uv run deepseek-vision-mcpMCP 端点为:
http://127.0.0.1:8000/mcp在将服务器暴露到可信机器/网络之外之前,请在其前面使用 TLS 和身份验证。
示例工具调用
分析截图
{
"images": ["/home/you/Pictures/screen.png"],
"prompt": "What application is open, what is the current state, and what should I click next?",
"detail": "original"
}快速粗略屏幕读取
{
"images": ["/home/you/Pictures/screen.png"],
"prompt": "Is a modal dialog visible? Answer briefly.",
"detail": "low"
}OCR
{
"image": "/home/you/Pictures/error.png",
"detail": "original"
}尽力而为的 UI 定位
{
"image": "/home/you/Pictures/screen.png",
"target": "the blue Save button"
}vision_locate 返回归一化到 0..1000 的坐标。它被有意描述为
尽力而为:生成式 VLM 不是确定性检测器。在
高影响点击之前验证其目标。
安全模型
此 MCP 分析的图像会发送到 DeepSeek 的外部 API。未经 用户明确同意,请勿发送私人或敏感图像。
本地路径限制在 DEEPSEEK_VISION_ALLOWED_ROOTS 内。如果未配置
根目录,服务器仅允许其当前工作目录下的图像。
这一点很重要:不受限制的 vision_analyze("/etc/...") 风格工具
会让 MCP 主机将图像分析变成任意的本地文件外泄。
服务器还会拒绝明显的 localhost/私有 IP 外部 URL。
共享启动器仅将基线进程变量、XDG_* 和
四个已批准的 DeepSeek 设置传递给子进程。它从不加载
整个凭据文件。
此服务器反映的 DeepSeek 图像行为
JPEG、PNG、GIF、WebP
本地/base64 内联图像:每个最大 32 MiB
DeepSeek Files API 图像:最大 64 MiB
每请求最多 600 张图像
外部 URL 长度:最大 8192 个字符
最大尺寸:每边 8192 像素,或 15 张以上图像时每边 4096 像素
detail=low:DeepSeek 降采样到 512x512detail=original/high:保留原始细节图像仅在用户消息中发送
大/复用图像
上传一次:
{
"local_path": "/home/you/Pictures/large.png",
"expires_seconds": 86400
}然后将返回的 file-api-... ID 传入 vision_analyze。仅当
你故意想要 DeepSeek 永久存储时,才将 expires_seconds 设为 null。
Docker
docker build -t deepseek-vision-mcp .
docker run --rm \
-p 127.0.0.1:8000:8000 \
-e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
deepseek-vision-mcp对于 Docker 中的本地图像路径,仅挂载 MCP 需要的目录,并将
DEEPSEEK_VISION_ALLOWED_ROOTS 设置为容器侧路径。
架构
MCP host / agent
|
| MCP tool call
v
DeepSeek Vision MCP
- validates source
- restricts local paths
- encodes local files
- shapes DeepSeek payload
|
| HTTPS
v
api.deepseek.com
deepseek-v4-flash-vision-exp
|
v
structured MCP result开发
uv sync --locked --extra dev
uv run ruff check .
uv run pytestCI 在 Python 3.11 和 3.13 上运行相同的门控。欢迎贡献和聚焦的 错误报告。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceBridges a vision model to enable text-only models like DeepSeek to describe images, extract text, and compare images via MCP tools.57910MIT
- AlicenseAqualityCmaintenanceGive MCP-compatible AI agents image analysis, metadata inspection, cropping, OCR, and image comparison through any OpenAI-compatible vision model.6MIT
- AlicenseAqualityCmaintenanceProvides image recognition capabilities to MCP clients by integrating with OpenAI-compatible vision models, supporting local images, URLs, multi-image comparison, and model listing.4MIT
- AlicenseNot gradedqualityBmaintenanceProvides multimodal vision MCP tools for image analysis, OCR, object detection, text-to-image generation, and image similarity, integrating OpenAI, Qwen, and Gemini.1,1531MIT
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Generate on-brand images from your AI agent: design, edit, and render templates over MCP.
Generate, edit and upscale AI video and images from any agent via VicSee.
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/groxaxo/deepseek-vision-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server