DeepSeek Vision MCP Server
DeepSeek Vision MCP Server
一个使用 FastMCP 构建的 DeepSeek vision MCP server,为 opencode 等 MCP 客户端实现了官方 vision guide 中的三种图像输入接口。
模型:
deepseek-v4-flash-vision-expAPI:OpenAI 兼容格式,
base_url = https://api.deepseek.com
中文文档请参见 README.zh.md。
接口
工具 | 方法 | 描述 |
| 1. Base64 内联 | 读取本地图像,将其编码为 data URL 嵌入请求中;单张图像最大 32 MiB |
| 2. 外部 URL | 传入由服务器下载的公共 http(s) 链接;URL ≤ 8192 字符 |
| 3. Files API | 引用已上传文件的 file_id;单张图像最大 64 MiB,可在多个请求间复用 |
| Files API 辅助 | 上传本地图像(purpose=user_data),返回一个 |
detail 选项:low(缩放至 512×512,速度更快、成本更低)、high、original、auto。
Related MCP server: Look At Pic MCP
安装
mkdir %HOMEPATH%\mcp\DeepSeek
python -m venv %HOMEPATH%\mcp\DeepSeek\.venv
%HOMEPATH%\mcp\DeepSeek\.venv\Scripts\pip install -r %HOMEPATH%\mcp\DeepSeek\requirements.txt依赖已固定于 requirements.txt 中:fastmcp==3.4.7、openai==3.3.1。
配置
在 %HOMEPATH%\.config\opencode\opencode.jsonc 的 mcp 部分中添加以下内容:
"deepseek-vision": {
"type": "local",
"command": ["C:\\Users\\%USERNAME%\\mcp\\DeepSeek\\.venv\\Scripts\\python",
"C:\\Users\\%USERNAME%\\mcp\\DeepSeek\\server.py"],
"enabled": true,
"environment": {
"DEEPSEEK_API_KEY": "<your DeepSeek API key>"
}
}从 DeepSeek Platform 获取你的 API 密钥。
使用示例
配置完成后,你可以直接在在对话中提出:
"使用 analyze_local_image 描述 D:\pics\screenshot.png 中的内容"
"使用 analyze_image_url 查看 https://example.com/photo.jpg 并描述场景"
"先用 upload_image 上传 big_photo.png,再用 analyze_file_id 读取其中的文本"
限额速查表
限额项 | 值 |
支持的格式 | JPEG, PNG, GIF, WebP |
请求包大小(内联) | 48 MiB |
单张图像(base64 / 外部 URL) | 32 MiB |
单张图像(Files API) | 64 MiB |
外部 URL 长度 | 8192 个字符 |
每个请求的最大图像数 | 600 |
注意事项:
图像只能出现在
user消息中;system/assistant消息中的图像会返回 400。只有视觉模型能接受图像;其他模型会返回 "This model does not support image"。
每张图像在进入模型前都会自动调整大小;单张图像最多消耗 ~384 个 token。
验证
%HOMEPATH%\mcp\DeepSeek\.venv\Scripts\python %HOMEPATH%\mcp\DeepSeek\server.py没有错误即表示服务器在 stdio 模式下正常启动(实际调用需要配置 DEEPSEEK_API_KEY)。
This server cannot be deployed
Maintenance
Related MCP Connectors
Search over 1.85 million captioned images using text, a reference image, or both. Upload a JPEG, PNG, or WebP image as base64, or provide a public HTTPS image URL. Find similar images from a Lightdrift asset ID and retrieve hosted file URLs, source licenses, and attribution. Connect with OAuth or an API key. Searches cost $0.005 ($5 per 1,000); image details are free. Setup: https://docs.lightdrift.ai/guides/images-mcp
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Image infrastructure for agents. Upload, transform, and deliver images through MCP, CLI, or API.
Generate images from Claude, ChatGPT, Cursor and Codex with 12 top AI image models. Up to 4 images per call, SVG vectorization, background removal, upscaling and image-to-video. Remote MCP with OAuth, no API keys.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables image understanding using Doubao vision models via MCP, supporting local file paths and URLs with customizable prompts.169 npmMIT
- FlicenseNot gradedqualityBmaintenanceEnables image analysis using GLM-4V multimodal model, supporting local files and base64 images with optional custom prompts.-
- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible agents to analyze images via NVIDIA NIM vision models, supporting file paths, URLs, or base64 input to return actionable textual descriptions.10 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables to analyze images using GLM-4V vision model via the MCP protocol, supporting local file paths and Data URLs.170 npmMIT