MCP server that lets text-only models 'see' images via configurable vision LLM providers with priority fallback
Project description
mcp-recognize-image
An MCP (Model Context Protocol) server that gives text-only models the ability to "see" images. It routes image-recognition requests through configurable multimodal (vision) LLM providers, with priority-ordered automatic fallback: if the top provider fails (auth / rate-limit / error / timeout), the next is tried.
Install (end users)
uvx mcp-recognize-image
Install uv first if needed:
curl -LsSf https://astral.sh/uv/install.sh | sh
Or with pip:
pip install mcp-recognize-image
Configure
Works out of the box with the bundled default providers (free vision endpoints pre-filled). You only need to set API keys for the providers you have:
export GEMINI_API_KEY=... # free tier: https://aistudio.google.com
export SILICONFLOW_API_KEY=... # free tier: https://cloud.siliconflow.cn
export OPENROUTER_API_KEY=... # free models: https://openrouter.ai
Custom endpoint (zero config file)
Point it at any OpenAI-compatible endpoint (OpenAI, Azure OpenAI, Ollama, LM Studio, DeepSeek, Moonshot, …) with three env vars — no config file needed. The API key lives in the env (never on disk):
export VISION_BASE_URL="https://api.openai.com/v1"
export VISION_API_KEY="sk-..."
export VISION_MODEL="gpt-4o"
# optional: VISION_ADAPTER (openai_compat|gemini|anthropic, default openai_compat)
# optional: VISION_PRIORITY (default 0 = tried first)
With these set and no config file, only this custom provider is used. In an MCP
client config, put the same vars in the env block.
Config path resolution (only if you customize the provider list):
VISION_MCP_CONFIGenv var (absolute path)~/.config/vision-mcp/config.toml- bundled
config.example.toml(fallback — used by default)
To customize the provider list, copy the bundled example and edit (from a source checkout):
mkdir -p ~/.config/vision-mcp
cp src/vision_mcp/config.example.toml ~/.config/vision-mcp/config.toml
Free vision models rotate. Re-verify with (from a source checkout):
python scripts/verify_free_models.py # OpenRouter list is public
SILICONFLOW_API_KEY=... python scripts/verify_free_models.py
GEMINI_API_KEY=... python scripts/verify_free_models.py
Use with Claude Desktop / Cursor / Cline
Add to your MCP client config (Claude Desktop: claude_desktop_config.json).
With uvx (recommended, zero install):
{
"mcpServers": {
"vision": {
"command": "uvx",
"args": ["mcp-recognize-image"],
"env": { "GEMINI_API_KEY": "..." }
}
}
}
With a local install:
{
"mcpServers": {
"vision": {
"command": "mcp-recognize-image",
"env": { "GEMINI_API_KEY": "..." }
}
}
}
The tools
recognize_image(image, prompt="Describe this image in detail.") — image is a
local file path, an http(s) URL, or a data: URI. Returns the model's text
answer, or an Error: ... string if every provider failed.
recognize_images(images: list[str], prompt="Describe these images in order.") —
recognize/compare multiple images in one call (parsed in list order). Each
entry is a file path, URL, or data: URI. Good for "describe each in order" or
"compare these".
recognize_clipboard_image(prompt="Describe this image in detail.") — reads the
image currently on the system clipboard. Use this when the user pastes/copies an
image into the chat and there is no file path. (macOS/Windows; on Linux it
returns a "not supported" error.) Requires Pillow (included).
Adapters
| adapter | providers |
|---|---|
openai_compat |
OpenAI, SiliconFlow, OpenRouter, any OpenAI-compatible endpoint |
gemini |
Google Gemini (native API) |
anthropic |
Anthropic Claude (native API) |
Develop
git clone <repo>
cd mcp-recognize-image
uv venv --python 3.13 .venv
uv pip install -e ".[dev]"
pytest -q
Publish (maintainer)
uv build # builds wheel + sdist into dist/
uv publish # uploads to PyPI (set PYPI_TOKEN env or pass --token)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_recognize_image-0.3.0.tar.gz.
File metadata
- Download URL: mcp_recognize_image-0.3.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
201cfbfcdb302beea5748760df2cdb877f266375b663fcb85a9369918bec81de
|
|
| MD5 |
261e1af161526ff8e98dec12f335aaba
|
|
| BLAKE2b-256 |
cc7f35b411108daa3313a142506b5f1311f0c2b898c41b3df23c57cbda13dcc0
|
File details
Details for the file mcp_recognize_image-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mcp_recognize_image-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
065fd856e1675a9c7bebe2ab6989eed969a04b60ce8cc4a862def60cb714a8bf
|
|
| MD5 |
51099307812c81f23aeb10cc5b2bf9a3
|
|
| BLAKE2b-256 |
ef7d28c3b72f1573f04184cfa5cbc0b409deb344f92de7eb079de282aa31965a
|