From bfec852c9272a85c020c0f677b986537278451fb Mon Sep 17 00:00:00 2001 From: NickRivers1983 Date: Thu, 14 May 2026 23:47:19 -0500 Subject: [PATCH] docs: add opencode-vision MCP server example --- packages/web/src/content/docs/mcp-servers.mdx | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/packages/web/src/content/docs/mcp-servers.mdx b/packages/web/src/content/docs/mcp-servers.mdx index 1b3006b1cbf2..34d875d7b935 100644 --- a/packages/web/src/content/docs/mcp-servers.mdx +++ b/packages/web/src/content/docs/mcp-servers.mdx @@ -509,3 +509,49 @@ Alternatively, you can add something like this to your [AGENTS.md](/docs/rules/) ```md title="AGENTS.md" If you are unsure how to do something, use `gh_grep` to search code examples from GitHub. ``` + +--- + +### opencode-vision + +Add vision capabilities to **any** text-only model. When your model can't process images natively (e.g., big-pickle, DeepSeek, MiMo), this MCP server handles image analysis via **Google Gemini Vision API** (FREE tier) and **local tesseract OCR**, returning text descriptions that any model can understand. + +**Requirements:** +- Python >= 3.10 +- Google Gemini API key (get one free at [aistudio.google.com](https://aistudio.google.com/)) + +```json title="opencode.json" +{ + "$schema": "https://opencode.ai/config.json", + "mcp": { + "vision": { + "type": "local", + "command": ["python3", "-m", "opencode_vision.server"], + "enabled": true, + "timeout": 30000 + } + } +} +``` + +**Setup:** + +1. Install the server: + ```bash + pip install opencode-vision + ``` +2. Set your Gemini API key in `~/.config/opencode/.env`: + ```bash + echo 'GOOGLE_API_KEY=your_key_here' >> ~/.config/opencode/.env + ``` +3. Restart OpenCode. + +**Available tools:** + +| Tool | Description | +|------|-------------| +| `vision_describe(path, prompt?)` | Describe an image's composition, colors, text, and context | +| `vision_ocr(path)` | Extract text from images via tesseract + Gemini fallback | +| `vision_analyze(path)` | Full analysis: metadata + description + OCR | + +Learn more at [github.com/NickRivers1983/opencode-vision](https://github.com/NickRivers1983/opencode-vision) or `pip install opencode-vision`.