vision-mcp-ms
云端视觉 MCP 服务:通过 OpenAI 兼容接口(默认硅基流动 SiliconFlow)分析图片, 为 DeepSeek 这类纯文本大模型提供「看图」能力。
- 单一工具
analyze_image(image, prompt) - 支持 HTTP(S) 图片 URL 和 base64 data URL
- 多模型按顺序自动 fallback(限流 / 超时 / 5xx 时切下一个)
- 纯 API 调用、不依赖本地环境,可部署到魔搭 MCP 广场云端托管
环境变量
| 变量 | 必填 | 默认值 | 说明 |
|---|---|---|---|
OPENAI_API_KEY |
是* | - | API Key(也兼容 SILICONFLOW_API_KEY / API_KEY) |
OPENAI_BASE_URL |
否 | https://api.siliconflow.cn/v1 |
OpenAI 兼容接口地址 |
VISION_MODELS |
否 | Qwen/Qwen2.5-VL-7B-Instruct |
逗号分隔的有序模型列表,靠前的优先 |
VISION_REQUEST_TIMEOUT_MS |
否 | 60000 |
单次模型请求超时(毫秒) |
* 部署时在魔搭 / MCP 客户端的 env 里配置。
本地使用(stdio)
在 MCP 客户端(Cherry Studio 桌面版等)里添加:
{
"mcpServers": {
"vision-mcp-ms": {
"command": "uvx",
"args": ["vision-mcp-ms"],
"env": {
"OPENAI_API_KEY": "sk-你的硅基流动Key",
"OPENAI_BASE_URL": "https://api.siliconflow.cn/v1",
"VISION_MODELS": "Qwen/Qwen2.5-VL-7B-Instruct,Qwen/Qwen2.5-VL-72B-Instruct"
}
}
}
}
本地 stdio 模式下,
image参数也支持本地文件绝对路径(如D:\Pictures\a.png)。 云端托管模式下仅支持 URL / data URL(服务端读不到你的本地文件)。
开发 / 测试
uv sync # 建环境
uv run python -m vision_mcp # 以 stdio 模式启动
uv run python -c "from vision_mcp.server import _to_data_url; print(_to_data_url('https://httpbin.org/image/jpeg')[:40])"
发布到 PyPI
cd vision-mcp-ms
uv run python -m build
uv run twine upload dist/*.whl
部署到魔搭 MCP 广场(云端托管)
- 把代码推到 GitHub 仓库(或发布到 PyPI 后)。
- 打开 https://www.modelscope.cn/mcp/servers/create?template=customize
- 托管类型选「可托管部署」,来源选你的 GitHub 仓库 / PyPI 包。
- 配置
command/args(如uvx/vision-mcp-ms),在 env 里填OPENAI_API_KEY、OPENAI_BASE_URL、VISION_MODELS。 - 创建后魔搭会自动部署,得到一个 HTTP 地址,填入手机 MCP 客户端即可。
Metadata
Release files for vision-mcp-ms 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vision_mcp_ms-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for vision_mcp_ms-0.1.1-py3-none-any.whl |
Release files / vision_mcp_ms-0.1.1-py3-none-any.whl
| Download URL | vision_mcp_ms-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd9987f41633526558973872d1ab01905d06b491b8f7ea8611c67f5aa4179693
|
|
BLAKE2b-256 checksum How to use checksums |
62eaa1bb4a1dff2cd9faf25bfb856fe594ee9aded6500004ed0c5fc77b1040f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Security for vision-mcp-ms 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.