ollama-vision-mcp
Allows AI agents to analyze local images via Ollama vision models, providing tools to describe images, extract text, list available images, and check Ollama connectivity.
Click on "Install 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-mcpLook at the screenshot in the inbox and tell me what the error is."
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.
ollama-vision-mcp
English · 中文
A minimal bridging service that provides local vision capabilities for VS Code Copilot using text-only models (e.g., DeepSeek).
When Copilot uses a text-only model, it cannot directly "see" images. This MCP server fills that gap: you drop a screenshot into a folder; Copilot reads the image via this bridge → sends it to a local Ollama vision model → gets back a text description, which the text-only model can understand.
VS Code Copilot Chat (Agent mode, text-only model)
│ MCP stdio
▼
ollama-vision-mcp (this package)
│ Read local image → base64 → POST /v1/chat/completions
▼
Ollama (local vision model, e.g., qwen2.5vl:7b)Tools
Tool | Parameters | Description |
|
| Reads an image and generates a text description. |
|
| Lists image files available for reading. |
|
| Extracts text from the image via OCR. |
| — | Displays the current configuration, Ollama connection status, and list of available models. |
Related MCP server: image-vision-mcp
Scope of This Tool
This package is only a bridge layer. It communicates with Ollama purely over HTTP (OpenAI-compatible /v1/chat/completions and /v1/models).
It does not handle:
Installing Ollama, starting
ollama serve, pulling models, or managing model configuration;Accessing the clipboard, IDE internal mechanisms, or any network service other than your local Ollama.
You are fully responsible for installing Ollama and pulling models (see Prerequisites).
Prerequisites
You must set up the following on your own:
Python 3.10+
Ollama installed and running:
ollama serveAt least one vision model pulled; recommended:
bash
ollama pull qwen2.5vl:7bOther options:
qwen3-vl:8b,gemma3:12b,llama3.2-vision:11b,llava:7b. Choose a model suitable for your GPU; specify it later via theVISION_MCP_MODELenvironment variable.
🚀 Quick Install (Recommended)
Run a single command in the repository root to complete installation and configuration:
bash
cd ollama-vision-mcp
python setup_mcp.pyThe script will automatically:
Create a dedicated virtual environment (
.venv) and install this package (without polluting the global environment).Detect the local Ollama service and list the available vision models.
Interactively guide you to set
base_url,model,inbox,max_tokens, image compression, and an optional API Key.Write the configuration to the project’s
.vscode/mcp.jsonand/or the user‑level global MCP file (%APPDATA%\Code\User\mcp.json), merging with existing settings and not overwriting your other MCP servers.
Non-interactive usage (suitable for CI/scripts):
bash
python setup_mcp.py --yes --project --model qwen2.5vl:7b
python setup_mcp.py --print # Only prints the config JSON, does not write to fileAfter installation, reload the window in VS Code (Ctrl+Shift+P → “Developer: Reload Window”) for the configuration to take effect.
If you have run it before, you can also reconfigure by simply using the command
ollama-vision-setup.
Verify Installation
In VS Code Copilot Chat (Agent mode), enter:
text
Run vision_statusIf the returned JSON contains "ollama": { "ok": true, ... } and the model list, the connection is successful.
If ok is false, start Ollama (ollama serve) first and try again.
Usage
Put screenshots into the project’s inbox directory (default
.ai/inbox). The server will create this directory automatically when needed.Ask a question in Copilot Chat, for example:
“Look at the screenshots in the inbox and tell me what this error is about.”
The agent will automatically call
list_images→describe_imageand answer based on the text description.
Make the Agent Smarter (Optional): Copy the ready-made instruction file .github/instructions/ollama-vision/vision-tools.instructions.md into the same path in your project. It teaches the agent the full vision workflow — call order (list_images → describe_image → extract_text), mode selection, troubleshooting, and guiding you to drop screenshots into the inbox. As a VS Code file instruction it is discovered on-demand whenever the task involves images, so it works out of the box with no setup.
Environment Variables Reference
Variable | Default | Description |
|
| Ollama’s OpenAI-compatible base URL |
|
| Vision model to use |
| empty (actually uses | API Key (ignored by Ollama) |
|
| Default directory for |
|
| Maximum output tokens for the vision model |
|
| If image > 50KB, automatically resize to 768px JPEG |
Compatibility aliases: VISION_MODEL, VISION_BASE_URL, VISION_INBOX, VISION_API_KEY.
Manual Install (Alternative)
If you need full manual control over each step, refer to the process below.
1. Create an environment and install
bash
cd ollama-vision-mcp
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS / Linux
pip install -e .After installation, you get two commands:
ollama-vision-mcp— start the MCP serverollama-vision-setup— interactive configuration shortcut
2. Register with VS Code
Copy the following into your project’s .vscode/mcp.json (project only) or the user-level file %APPDATA%\Code\User\mcp.json (all projects). Make sure to change command to the absolute path of your virtual environment’s Python interpreter:
json
{
"servers": {
"ollama-vision": {
"type": "stdio",
"command": "D:/MyRepos/ollama-vision-mcp/.venv/Scripts/python.exe",
"args": ["-m", "ollama_vision_mcp"],
"env": {
"VISION_MCP_BASE_URL": "http://localhost:11434/v1",
"VISION_MCP_MODEL": "qwen2.5vl:7b",
"VISION_MCP_INBOX": ".ai/inbox"
}
}
}
}⚠️
commandmust be the absolute path to the Python interpreter inside the virtual environment. You can also runollama-vision-setup --projectto generate this file automatically. The server usesos.getcwd()when invoked, so relative paths (likepathand the inbox directory) will be resolved relative to the project root where the server is started.
Smoke Test
Run the following script to check Ollama connectivity, list the inbox contents, and perform a real vision call on the first image:
bash
python examples/smoke_test.pyLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceAn 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.Last updated2,0836MIT
- Alicense-qualityCmaintenanceA lightweight stdio MCP server that adds image understanding to AI coding assistants via a single tool that sends images to any OpenAI-compatible multimodal endpoint.Last updatedMIT
- Alicense-qualityBmaintenanceA local Ollama-backed MCP server that gives coding assistants a portable photo-understanding toolset including photo analysis, OCR, scene inspection, comparison, and metadata extraction.Last updatedMIT
- FlicenseAqualityCmaintenanceMCP server enabling LLM clients without vision capability to process images by delegating to local Ollama vision models. Supports describing images, OCR, asking questions, and processing clipboard images.Last updated4
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Local-first RAG engine with MCP server for AI agent integration.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/masterLazy/ollama-vision-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server