👁️ mcp-local-vision (Local Vision MCP Tool)
Give your local agent eyes. Close the autonomous loop.
mcp-local-vision is the missing link for autonomous local AI. It allows standard MCP agents (Your local agent running on LMStudio/Ollama/vLLM, Claude Desktop, Goose, etc.) to "see" images, screenshots, and visual assets by routing them back through an call to the same inference engine and same model (in case the initial model was a VLM model of course so that it can see and reason about the image thus enhancing your workflows. Most current MCP servers like Playwright, File Access and Screenshot tools are missing the ability to allow the Agentic AI mode to actually see and reason about images and just returning responses that the end user at the GUI level can see but the Agentic Model is blind to, thus hindering the agentic flowIt also supports cloud providers like Anthropic, Gemini, OpenAI, Openrouter etc...
🚫 The Problem: The "Blind Agent" Paradox
You have a cutting-edge local agent. You ask it to "Debug my UI."
- Agent launches the app.
- Agent takes a screenshot to check for errors.
- Agent stops. 🛑
Why? Because standard MCP tools only save screenshots to disk. The agent knows the file exists, but it cannot see the pixels. It is blind to its own actions.
✅ The Solution: The Visual Loop
mcp-local-vision bridges the file system and your inference engine.
- Agent takes a screenshot via Playwright/Puppeteer.
- Agent calls
analyze_image(path). - mcp-local-vision instantly pipes the raw pixels to your already hosted model (no extra host, VRAM/RAM usag, just efficient routing/loop in case the initial model supports Vision, or choose any other endpoint where a VLM is hosted and it works too.
- Agent receives a detailed description (from it-self sometimes! for a full descroption on the image which can allow it to proceed further ("I see a 404 error on the dashboard").
- Agent takes the next action to fix it. The loop continues.
🚀 Features
- 100% Local Privacy: Your screenshots never leave your machine if you want to! (when using `local hosted models such as LMStudio, llama.cpp, vllm, Ollama or others.)
- Multi-Provider Support: Plug in Anthropic (Claude), Google Gemini, OpenRouter, or OpenAI if you need cloud power.
- Smart Fallbacks: Automatically handles "Reasoning" models (like DeepSeek-R1) and connection errors.
- Robust Validation: Checks for valid image files before analysis.
- Zero-Config Install: Run instantly with
uvx.
⚡ Quick Start
1. Minimal Setup (Local)
No cloning required. If you use uv, you can run this instantly:
uvx mcp-local-vision
Alpha quick start for LM Studio (local loop)
- Start LM Studio local inference server on
http://localhost:1234/v1with a vision model (e.g.,llava,llama-3.2-vision, or whichever you loaded). - Set
LOCAL_MODEL(optional; defaults tollava), plus anyLOCAL_INFERENCE_URL/LOCAL_INFERENCE_KEYoverrides. - Run from source:
python src/mcp_local_vision/server.py(ensurePYTHONPATH=src) or use the installed entrypoint:uvx mcp-local-vision. - Point your MCP client to the command above; call
analyze_local_image("/abs/path/to/image.png").
2. Configuration (Claude Desktop / Agent Config)
Add this to your claude_desktop_config.json or mcp_server_config.json.
Method 1: Using uvx (Recommended)
This is the Python equivalent of npx. It automatically downloads and runs the latest version of the package in an isolated environment.
{
"mcpServers": {
"local-vision": {
"command": "uvx",
"args": ["mcp-local-vision"],
"env": {
"LOCAL_INFERENCE_URL": "http://localhost:1234/v1"
}
}
}
}
Note: You can also use the explicit uv command if uvx is not in your PATH:
"local-vision": {
"command": "uv",
"args": ["tool", "run", "mcp-local-vision"],
...
}
Method 2: Manual / Development (Using local venv)
If you have cloned the repo and want to run it from source (like the example you provided):
{
"mcpServers": {
"local-vision-dev": {
"command": "/absolute/path/to/your/custom/venv/bin/python",
"args": [
"/absolute/path/to/mcp-local-vision/src/mcp_local_vision/server.py"
],
"env": {
"PYTHONPATH": "/absolute/path/to/mcp-local-vision/src",
"LOCAL_INFERENCE_URL": "http://localhost:1234/v1"
}
}
}
}
Note: Replace /absolute/path/to/... with your actual paths.
3. Backend Configuration
Option A: Local (LM Studio / vLLM) - Default
Set LOCAL_INFERENCE_URL in the env section (see above).
Option B: Ollama
"env": {
"OLLAMA_URL": "http://localhost:11434/v1",
"OLLAMA_MODEL": "llava"
}
*And pass `provider='ollama'` when calling the tool.*
*Tip: If your agent is already using a Vision Logic Model (VLM) like `llama3.2-vision` or `qwen2.5-vl`, set `OLLAMA_MODEL` to that same model name to create an efficient self-loop without loading a second model.*
#### Option C: Cloud Providers (Anthropic / Google / OpenRouter)
```json
"env": {
"ANTHROPIC_API_KEY": "sk-ant-...",
"GOOGLE_API_KEY": "AIza...",
"OPENROUTER_API_KEY": "sk-or-..."
}
🛠️ Usage
The server exposes one tool: analyze_local_image.
Arguments:
file_path(string): Absolute path to the image file.question(string): What to ask the model (Default: "Describe this image in detail").timeout(int): Timeout in seconds (Default: 30).provider(string): One oflocal(default),ollama,openai,anthropic,google,openrouter.
Example User Query:
"Look at the screenshot at /tmp/screen.png using the anthropic provider and tell me if the tests passed."
❓ Troubleshooting
The "Self-Call" Architecture
If you are using an agent (like a VLM in LM Studio) to use this tool, remember:
- The Agent sends a request to MCP.
- MCP reads the file.
- MCP sends the image BACK to LM Studio (or Ollama) for analysis.
- LM Studio returns the description.
- MCP returns the description to the Agent.
Critical: If you are using the LM Studio GUI to chat, you must ensure the Local Inference Server is also turned ON and running on port 1234 (or your configured port). The GUI itself does not expose the API unless the server is started.
Common Errors
- "Connection Refused": Check that your local server (LM Studio/Ollama) is actually running.
- "Model returned empty response": You might be using a text-only model (like Llama 3) instead of a Vision model (like Qwen2-VL or LLaVA).
Metadata
Release files for mcp-local-vision 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_local_vision-0.1.0.tar.gz | 110.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_local_vision-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 117.4 kB
Release files / mcp_local_vision-0.1.0.tar.gz
| Download URL | mcp_local_vision-0.1.0.tar.gz |
|---|---|
| Size | 110.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7796342b13654805cdd975f27073b5b0a8721c6ee112bd5636e153b88e6f687c
|
|
BLAKE2b-256 checksum How to use checksums |
a0559214b1aaf195b21f8c962ac1c15e0a4a92693008fe3a2cd50083fd38f6f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / mcp_local_vision-0.1.0-py3-none-any.whl
| Download URL | mcp_local_vision-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b05daf905e3eb140d608902cbaa361115f85f782adf51ff7f5bd54046ab47d2c
|
|
BLAKE2b-256 checksum How to use checksums |
02727f3ec5ff1098debec1ebd4b7cf15b8bef7fd826fa31b7ca3deafef80d164
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for mcp-local-vision 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.