capability-bridge
Adds vision capabilities to text-only coding models via MCP, enabling image analysis, OCR, and visual reasoning without switching the main model.
README
capability-bridge
Love your coding model, but it can't see? Give it eyes.
Keep DeepSeek — or any coding model — as your coding brain. capability-bridge adds vision through MCP, without switching your main model.
A transport-agnostic model capability bridge. MCP is the first transport; Vision is the first capability.
Features
- Give a text-only coding model vision —
vision_analyze(image, prompt)andvision_ocr(image)hand an image to a vision model and return text to your main model, without switching it. - Pluggable providers — one
OpenAICompatProviderspeaks OpenAI-compatible multimodal endpoints that acceptimage_urlcontent parts (Qwen, GLM, MiniMax-M3, ...); a nativeGeminiProvidercovers Google's protocol. Ordered fallback with retry and timeout. - Intent-driven visual reasoning — the
promptis a task-scoped Visual Brief. UI critique, aesthetic review, error-screenshot reading, and art interpretation are all the same primitive, not just captioning. - One-shot installer —
capability-bridge setupmerges into.mcp.jsonwithout clobbering other servers, reports missing API keys by name, and--testverifies the first provider live. - Transport-agnostic Core — stateless, no Context Manager; the host owns context and distills a brief. Architecture red lines are enforced by tests.
Quickstart (30 seconds)
From a cloned repository. (Once published to PyPI, this becomes
uv tool install capability-bridge.)
# 1. install the CLI once
uv tool install .
# 2a. Claude Code: one-shot setup (config + key check + MCP wiring + trigger) + live self-test
capability-bridge setup --target claude-code --test
# 2b. Codex: prints the ~/.codex/config.toml snippet and the `codex mcp add` alternative
capability-bridge setup --target codex --test
# 3. send a screenshot and ask "what's wrong here?"
setup merges only the capability-bridge entry into .mcp.json — it never overwrites other
servers (Claude Code target; the Codex target prints a config.toml snippet instead). Missing API
keys are reported by name; --test makes one real call to verify the first provider.
Running from the source repo during development? Start the server with uv run capability-bridge
instead of the installed CLI.
Examples
vision_analyze is visual reasoning, not just image description — the prompt is a task-scoped
Visual Brief. One primitive, three levels of use. All results below are real qwen3.6-flash output.
1. Basic — image understanding

image: docs/sample/sample.png
prompt: What does this mini dashboard show? Answer in one short sentence.
{
"content": "This mini dashboard presents a sales overview comparing performance across January, February, and March with a grand total of 3,200.",
"structured_data": null,
"provider": "qwen",
"model": "qwen3.6-flash",
"latency_ms": 3845,
"warnings": []
}
2. Visual reasoning — UI design critique
Give it a design brief and it becomes a design specialist, not a camera:

image: docs/sample/sample-ui.png
prompt: Analyze this dashboard UI as a senior product designer. This SaaS admin is being visually
redesigned to look modern, restrained, and professional, reducing the cheap template feel.
Another coding agent will implement your recommendations. Evaluate: information hierarchy,
density, whitespace/rhythm, color system, typography, card design, radius/shadows,
navigation-vs-content, what makes it look templated, and which changes give the most visual
improvement for the least effort. Do not just describe. Do not write code.
Output: 1) overall judgment 2) the 5 most important problems 3) a concrete improvement
direction per problem 4) implementation priority.
Real result (abridged):
The dashboard is currently shouting; a premium dashboard should whisper. It relies on color-based contrast (bright blocks) instead of structural contrast (space, size, weight).
Problems: aggressive rainbow KPI cards (the "chart library" trap) · insufficient whitespace & rhythm · visual noise in the charts · weak table hierarchy (2005-Excel borders) · inconsistent card styling + a jarring promo banner in the nav.
Priorities: strip the KPI card backgrounds → remove the sidebar promo banner → turn status pills into dot+text → open up spacing.
3. Aesthetic analysis — artwork interpretation

image: docs/sample/sample-art.png
prompt: Appreciate this artwork as a senior art critic and curator. Analyze: composition and visual
focus, light and shadow, color relationships and palette, brushwork/texture/material, space
and depth, style and genre, emotion and atmosphere, aesthetic character and artistic value.
Be specific and insightful.
Real result (abridged):
A self-referential tableau of digital whimsy and narrative recursion. Strict central composition; the open book — not the creature's face — is the true focal point. Warm golden-hour light, no harsh chiaroscuro. Monochromatic buttery-yellow harmony, broken only by the lime-green eyes. Shallow depth of field isolates a private moment of study. Pop Surrealism × digital character art; the book title "How many tears must a calm dragon shed?" turns the image into a dialogue about identity and emotion.
How it works
vision_analyze(image, prompt?) and vision_ocr(image) hand your image to a vision model
(Qwen, GLM, MiniMax-M3, Gemini, ...) and return the text to your main model. Providers are
tried in the order in config.yaml; if one times out, is rate-limited, or is unavailable, the
next one is tried automatically.
Configuration
config.yaml holds three objective sections: providers (endpoint type + api key env var),
models (provider/model/capabilities), and routing (ordered fallback list per capability).
Only objective facts live here — no subjective model scoring. A broken config (unknown model,
missing key) fails fast at startup with the exact field named.
Default model
The shipped config defaults to qwen3.6-flash (DashScope). qwen3-vl-flash is now a legacy
model family — its legacy snapshots are scheduled for deprecation, and Alibaba recommends
qwen3.6-flash as the official recommended replacement for the relevant Qwen3-VL Flash models
(same OpenAI-compatible interface, just change the model id). qwen3.6-flash is a hybrid-thinking
model with thinking enabled by default, which adds latency — the default timeout is 120s (complex
UI runs take ~40s).
To use a different model, change the model: line of the vision model entry in config.yaml
(e.g. qwen3.7-plus, MiniMax/MiniMax-M3, glm-4.6v) — a documented optional profile.
Note: the F1–F4 benchmark (
docs/benchmarks/2026-08-13-qwen-vision-ab.md) was run on the now-legacyqwen3-vl-flash.qwen3.6-flashis the official recommended replacement and should be re-validated for the same workloads (its complex-UI output was spot-checked on 2026-08-14 and is on par).
Tested providers
OpenAICompatProvider speaks any endpoint that accepts OpenAI-style multimodal
/chat/completions with image_url content parts.
Live tested (v0.1): Qwen (DashScope), GLM (Zhipu native, glm-4.6v), MiniMax-M3 (hosted
on DashScope — needs the model activated in the Bailian console).
Implemented, automated-tested only: Gemini native (GeminiProvider) — its contract is covered
by tests but it is not in the v0.1 live-provider acceptance matrix.
Compatibility with an OpenAI-compatible endpoint depends on that endpoint actually supporting
multimodal image_url inputs (e.g. MiniMax's own API is OpenAI-compatible for text but not for
vision).
Architecture
Agent (Claude Code / Codex)
│ MCP stdio
▼
Transport: MCP <- only place that imports mcp
▼
Capability Core <- transport-agnostic, stateless
Capabilities -> Routing -> Providers(interface) <- adapters
Concrete provider adapters live outside core/ and implement the ModelProvider interface.
The composition root (bootstrap.py) wires config → providers → routing → capability.
Development
uv run pytest
tests/test_architecture.py enforces the red lines (core never imports MCP / clients / concrete providers).
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。