Skip to main content

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):

  1. VISION_MCP_CONFIG env var (absolute path)
  2. ~/.config/vision-mcp/config.toml
  3. 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)

Metadata

Release files for mcp-recognize-image 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-recognize-image 0.3.0
File Size Uploaded
mcp_recognize_image-0.3.0.tar.gz 16.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-recognize-image 0.3.0
File Interpreter ABI Platform
mcp_recognize_image-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / mcp_recognize_image-0.3.0.tar.gz

Download URL mcp_recognize_image-0.3.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
201cfbfcdb302beea5748760df2cdb877f266375b663fcb85a9369918bec81de
BLAKE2b-256 checksum
How to use checksums
cc7f35b411108daa3313a142506b5f1311f0c2b898c41b3df23c57cbda13dcc0
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / mcp_recognize_image-0.3.0-py3-none-any.whl

Download URL mcp_recognize_image-0.3.0-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
065fd856e1675a9c7bebe2ab6989eed969a04b60ce8cc4a862def60cb714a8bf
BLAKE2b-256 checksum
How to use checksums
ef7d28c3b72f1573f04184cfa5cbc0b409deb344f92de7eb079de282aa31965a
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page