ollama-vision-mcp
Provides tools to describe images, extract text (OCR), answer questions about images, and process images from the macOS clipboard by delegating to local vision models running on Ollama.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ollama-vision-mcpDescribe the clipboard image"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Vision MCP Server
MCP server for image processing via Ollama vision models (Gemma 4, Gemma 3, LLaVA...).
Enables LLM clients without vision capability (DeepSeek, Qwen, etc.) to process images by delegating to a local vision model through Ollama.
Features
Tool | Description |
| Describe image content (brief / detailed / exhaustive) |
| Extract text from image with language hints (vi, en, ja, zh, ko) |
| Ask any question about an image with a custom prompt |
| Read image directly from macOS clipboard — no file path needed |
Related MCP server: mcp-vision
Requirements
macOS (clipboard tool uses
osascript)Python 3.12+
uv — Python package manager
Ollama — local LLM runtime
Installation
1. Clone the repo
git clone https://github.com/nguyenduc/vision-mcp-server.git
cd vision-mcp-server2. Install dependencies
uv sync
uv synccreates.venv/and installs all packages fromuv.lock. No need forpip installoruv init.
3. Pull a vision model
ollama pull gemma4Other compatible vision models: gemma3, llava, llava-llama3, moondream.
4. Make sure Ollama is running
ollama serveVerify:
curl http://127.0.0.1:11434/api/tags5. Test the server
uv run server.pyThe server runs over stdio — press Ctrl+C to stop.
MCP Client Configuration
OpenCode
Add to .opencode.json (project-level or ~/.opencode.json):
{
"mcpServers": {
"vision": {
"enabled": true,
"type": "local",
"command": ["uv", "run", "server.py"],
"cwd": "/absolute/path/to/vision-mcp-server",
"env": ["OLLAMA_BASE_URL=http://127.0.0.1:11434", "VISION_MODEL=gemma4"]
}
}
}Note: In OpenCode,
commandis an array andenvis an array of"KEY=VALUE"strings, not an object.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"vision": {
"command": "uv",
"args": ["run", "server.py"],
"cwd": "/absolute/path/to/vision-mcp-server"
}
}
}Cursor / Windsurf / Cline
{
"mcpServers": {
"vision": {
"command": "uv",
"args": ["run", "server.py"],
"cwd": "/absolute/path/to/vision-mcp-server",
"env": {
"OLLAMA_BASE_URL": "http://127.0.0.1:11434",
"VISION_MODEL": "gemma4"
}
}
}
}Environment Variables
Variable | Default | Description |
|
| Ollama API endpoint |
|
| Model name in Ollama (must have vision capability) |
How It Works
┌─────────────┐ ┌───────────────────┐ ┌─────────────┐
│ LLM Client │────▶│ Vision MCP Server │────▶│ Ollama │
│ (DeepSeek) │◀────│ (stdio/MCP) │◀────│ (Gemma 4) │
└─────────────┘ └───────────────────┘ └─────────────┘
│ │
│ [Image 1] + prompt │ osascript: clipboard → PNG
│ │ base64 → /v1/chat/completions
▼ ▼
Receives text Returns vision
description/OCR analysis resultClipboard flow: User pastes image → LLM calls process_clipboard_image → server grabs image from macOS clipboard via osascript → encodes to base64 → sends to Ollama → returns text.
File path flow: User provides path → LLM calls describe_image / ocr_image / ask_image with path → server reads file → encodes → sends to Ollama → returns text.
Troubleshooting
Error | Cause | Fix |
| Model doesn't exist in Ollama |
|
| Ollama is not running |
|
| Clipboard is empty or not an image | Copy an image to clipboard first |
Timeout | Model too large for hardware | Switch to a smaller model: |
License
MIT
Available Tools
4 toolsask_imageB
Ask any question about an image.
Args: image_path: Absolute path to the image file question: Your question or prompt about the image
Inputs: question (required), image_path (required). Returns: result
describe_imageA
Describe the content of an image file.
Args: image_path: Absolute path to the image file (png, jpg, webp, gif) detail_level: Level of detail - "brief", "detailed", or "exhaustive"
Inputs: image_path (required), detail_level. Returns: result
ocr_imageA
Extract all visible text from an image (OCR).
Args: image_path: Absolute path to the image file language: Primary language hint - "auto", "vi", "en", "ja", "zh", "ko"
Inputs: image_path (required), language. Returns: result
process_clipboard_imageA
Process an image from the macOS clipboard. Call this when user pastes an image or sends [Image] without a file path.
IMPORTANT: Call this tool whenever you see [Image 1], [Image 2], or the user pastes an image from clipboard. The primary model has no vision capability — this tool reads the image from clipboard and analyzes it.
Args: task: Processing type - "describe" (describe image), "ocr" (extract text), or any custom question about the image
Inputs: task. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
TDQS
Scored across 4 tools
describe_image and ask_image both handle arbitrary image analysis, and process_clipboard_image explicitly supports describe/ocr/custom-question tasks, creating overlap. However, the input-source distinction (file vs clipboard) reduces ambiguity, and ocr_image is clearly distinct.
Three tools follow a consistent verb_noun pattern (describe_image, ocr_image, ask_image), and process_clipboard_image also uses verb_noun but adds a modifier. The naming is mostly consistent and predictable.
4 tools is a reasonable size for a vision-focused server, covering core operations without being bloated. It could have been higher if not for the redundancy between clipboard and file-based tools.
The toolset covers the main vision tasks (description, OCR, custom Q&A) and handles both file and clipboard inputs. Minor gaps like batch processing or image comparison are not essential for the stated purpose.
Maintenance
Related MCP Connectors
MCP server exposing the YourImageShare upload API (upload/list/delete) as tools for AI agents.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP server for Qwen Image 3 AI image generation
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables any LLM to describe images from file paths, URLs, or base64 data by forwarding them to a supported vision provider such as OpenAI, Anthropic, or local Ollama models.224 npm10MIT
- AlicenseAqualityDmaintenanceMCP server for vision capabilities, enabling screenshot, camera, and image analysis using Ollama vision models.41MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that provides a 'borrowed eye' for text-only LLMs, enabling them to identify and describe local images via the Qwen VL vision model, including face recognition, scene description, OCR, and targeted visual questioning.7 npmApache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server for local Ollama vision analysis, enabling text-only agents like Claude Code to inspect images via a single tool. Processes images locally with Ollama, keeping image bytes on the machine and returning text reports.2MIT