mcp-vision-server
MCP server that provides the describe_image tool, enabling AI clients to analyze local images by forwarding them to any OpenAI-compatible vision endpoint and returning a text description.
README
mcp-vision-server
A lightweight MCP server exposing a single tool — describe_image — that forwards a local image file to any OpenAI-compatible vision endpoint and returns the text description.
Most LLMs can't see an image you drop into a chat. This server bridges that gap: the host AI calls describe_image with a file path, your vision model does the actual seeing, and the description flows back into the conversation.
┌──────────┐ MCP (stdio) ┌─────────────────┐ HTTP POST ┌──────────────────┐
│ Client │ ─── describe_image ─▶│ mcp-vision-srv │ ── image+prompt ──▶│ Vision Endpoint │
│ (AI) │ ◀── text description │ (this repo) │ ◀──── JSON resp ───│ (vLLM/Ollama/…) │
└──────────┘ └─────────────────┘ └──────────────────┘
The server speaks MCP over stdio — it doesn't serve HTTP itself. It reads the file from disk, base64-encodes it, POSTs to your endpoint, and hands the response back as tool output.
Requirements
- Python ≥ 3.10
uvinstalled- A running vision endpoint that speaks the OpenAI chat-completions schema
That last one is not optional. This server has no model of its own — without something listening at VISION_ENDPOINT, every call fails. See Supported Endpoints.
Install
No clone needed — uvx can run it straight from the repo:
uvx --from git+https://github.com/joshsssn/mcp-vision-server mcp-vision-server
Your MCP client will run this for you once configured; the command above is mainly useful to check the server starts.
Claude Code, one line:
claude mcp add vision \
--env VISION_ENDPOINT=http://localhost:11434/v1/chat/completions \
--env VISION_MODEL=llama3.2-vision \
-- uvx --from git+https://github.com/joshsssn/mcp-vision-server mcp-vision-server
VS Code (Copilot Chat) — add to .vscode/mcp.json in your workspace, or to your user settings:
{
"servers": {
"mcp-vision-server": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/joshsssn/mcp-vision-server",
"mcp-vision-server"
],
"env": {
"VISION_ENDPOINT": "https://api.openai.com/v1/chat/completions",
"VISION_API_KEY": "sk-your-key-here",
"VISION_MODEL": "gpt-4o"
}
}
}
}
Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"mcp-vision-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/joshsssn/mcp-vision-server",
"mcp-vision-server"
],
"env": {
"VISION_ENDPOINT": "https://api.openai.com/v1/chat/completions",
"VISION_API_KEY": "sk-your-key-here",
"VISION_MODEL": "gpt-4o"
}
}
}
}
Working from a local clone instead? Replace the
git+https://…argument with the path to the repo root.
Local development
git clone https://github.com/joshsssn/mcp-vision-server.git
cd mcp-vision-server
cp .env.example .env # edit with your endpoint URL, API key, and model name
uvx --from . mcp-vision-server
Configuration
All settings come from environment variables, or a .env file in the project root:
| Variable | Default | Description |
|---|---|---|
VISION_ENDPOINT |
http://localhost:11434/v1/chat/completions |
OpenAI-compatible vision API URL |
VISION_API_KEY |
ollama |
Bearer token for the endpoint |
VISION_MODEL |
llama3.2-vision |
Model name the endpoint expects |
VISION_TIMEOUT |
60 |
Request timeout in seconds |
VISION_MAX_IMAGE_BYTES |
20971520 (20 MB) |
Reject images larger than this |
The defaults target a local Ollama install, so ollama run llama3.2-vision plus a zero-config client entry is enough to get going.
The env block in your client config overrides .env. Use .env for local dev, the client block for anything you share — no keys end up in the repo either way.
See .env.example for a ready-to-copy template.
Tool: describe_image
| Parameter | Type | Required | Default |
|---|---|---|---|
image |
string |
yes | — |
prompt |
string |
no | Describe this image in detail. |
image must be an absolute path to a file on disk — not a URL, not a pasted image. Supported formats: PNG, JPG, JPEG, GIF, WEBP.
C:\Users\photos\cat.jpg
/home/user/images/screenshot.png
prompt is any natural-language instruction for the vision model:
"Describe this image in detail.""Extract all text from this image.""What colors dominate this image?""Is there a person in this image? If so, describe them."
Example call:
{
"tool": "describe_image",
"arguments": {
"image": "/home/user/photos/sunset.jpg",
"prompt": "What colors dominate this image? Is there a person in it?"
}
}
Supported Endpoints
Anything implementing the OpenAI chat-completions schema with image_url content parts:
| Endpoint | Example URL | Notes |
|---|---|---|
| Ollama | http://localhost:11434/v1/chat/completions |
Easiest local setup |
| LM Studio | http://localhost:1234/v1/chat/completions |
GUI-friendly |
| vLLM | http://localhost:8000/v1/chat/completions |
Great for self-hosted |
| OpenAI | https://api.openai.com/v1/chat/completions |
Cloud, requires API key |
| Custom / self-hosted | https://your-box/v1/chat/completions |
Anything OpenAI-compatible |
Troubleshooting
invalid peer certificate: UnknownIssuer on startup. uv uses its own certificate store and doesn't know about TLS-inspecting antivirus software or corporate proxies. Add "UV_NATIVE_TLS": "1" to the env block to make it use the system store instead.
Connection refused / timeout on every call. Nothing is listening at VISION_ENDPOINT. Confirm the endpoint independently before blaming the server:
curl $VISION_ENDPOINT -H "Content-Type: application/json" \
-d '{"model":"llama3.2-vision","messages":[{"role":"user","content":"hi"}]}'
Tool doesn't appear in the client. Check the MCP logs — in VS Code, the Output panel has a channel per server. A failure to install the package shows up as a non-zero exit before initialize ever completes.
Image rejected for size. Raise VISION_MAX_IMAGE_BYTES, or downscale first. Base64 encoding inflates the payload by roughly a third, so the limit is deliberately conservative.
Project Structure
mcp-vision-server/
├── pyproject.toml
├── .env.example
├── .gitignore
├── README.md
├── LICENCE
└── src/
└── mcp_vision_server/
├── __init__.py
└── server.py
License
MIT — do whatever.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。