llm-vision
A local MCP server that gives vision to vision-less LLMs by describing images and extracting text via Alibaba DashScope vision models.
README
<div align="center">
llm-vision
Give vision to vision-less LLMs — a local MCP server powered by Alibaba DashScope.
English | 简体中文
</div>
Vision-less models (e.g. DeepSeek) can't see images — but they don't have to. llm-vision is a local MCP server that acts as their eyes: hand it a local image path, and it returns a text description generated by Alibaba Cloud's vision models (qwen3-vl-plus / qwen3.5-ocr).
✨ Features
- Two tools, one pipeline —
describe_imagefor general image understanding,extract_textfor OCR & document parsing (ID cards, invoices, receipts) - Bring your own model — model IDs configurable via environment variables, no code changes
- Zero-cost test suite — 22 tests, most run offline against mocked HTTP
- Portable setup — ship
.mcp.jsonwith your repo; works anywhere afteruv sync - Model-consumable errors — every tool returns a readable error string, never an exception
🚀 Quick Start
Prerequisites
1. Install
git clone https://github.com/1710782766/llm_vision.git && cd llm-vision
uv sync
export DASHSCOPE_API_KEY=sk-xxx # or add to your shell profile
2. Register with Claude Code
The repo ships with a portable .mcp.json — just open Claude Code in the project directory and ask:
"Use
describe_imageto look atpath/to/your/image.jpgand tell me what's in it."
Approve the server connection once, and every future session has vision.
Prefer the CLI? Register manually:
claude mcp add llm-vision --env DASHSCOPE_API_KEY=sk-xxx -- uv run python main.py
🛠 Tools
| Tool | Arguments | Description |
|---|---|---|
describe_image |
image_path (required) · prompt (optional) |
Describe an image, or answer questions about it |
extract_text |
image_path (required) · prompt (optional) |
OCR & text localization — documents, ID cards, invoices; ask for structured output (e.g. "extract the name and ID number as JSON") |
Supported formats: jpg · jpeg · png · webp · gif · bmp — single file < 10 MB.
⚙️ Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
DASHSCOPE_API_KEY |
✅ | — | DashScope API key (sk- prefix) |
LLM_VISION_MODEL |
— | qwen3-vl-plus |
Vision model used by describe_image |
LLM_VISION_OCR_MODEL |
— | qwen3.5-ocr |
OCR model used by extract_text |
LLM_VISION_TIMEOUT |
— | 60 |
Request timeout (seconds) |
🧠 Model Selection
qwen3-vl-plus(default vision) — benchmarked as the only hallucination-free option in our model evaluation;qwen3.7-plusis a promising upgrade candidateqwen3.5-ocr(default OCR) — cheap, and notably strong at document & card-key-value extraction- ⚠️ The
qwen3-vl-plus-latestalias has been retired (returns404) — use stable model IDs
🏗 Architecture
main.py (MCP server)
├── describe_image(path, prompt?) → LLM_VISION_MODEL
├── extract_text(path, prompt?) → LLM_VISION_OCR_MODEL
└── _analyze_image pipeline
→ image_loader path/extension/10MB validation, base64 + MIME
→ dashscope_client httpx → DashScope OpenAI-compatible endpoint
Tools always return a string: the model's answer on success, a readable Chinese error message on failure — never an exception to the client.
🔒 Security & Privacy
DASHSCOPE_API_KEYlives only in your environment — never in.mcp.jsonor in git- When a tool is invoked, the image is sent as base64 to Alibaba DashScope — only hand the model images you're comfortable leaving your machine
🧪 Development
uv run pytest tests/ -q # full suite (22 tests, mostly offline)
uv run python scripts/smoke_test.py [image_path ...] # real-API smoke test (billed, ~¥0.01/call); pass paths or provide your own under images/
uv run python scripts/compare_models.py qwen3-vl-plus qwen3.7-plus # model bake-off (billed)
Developer notes for Claude Code: see CLAUDE.md.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.