Skip to main content

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

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 tool

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.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_recognize_image-0.1.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_recognize_image-0.1.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_recognize_image-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_recognize_image-0.1.0.tar.gz
  • Upload date:
  • Size: 12.6 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

Hashes for mcp_recognize_image-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0a90b1b06d9670154556a2dd55712750c0cf8b4aacf79e617bb58c0f95723bf6
MD5 425dc36f6e9aacd726a499eeb5ae5363
BLAKE2b-256 505a0f1e5bb00fc00210046d9d1019a336a2498b670c69465e270c4ad8029bdf

See more details on using hashes here.

File details

Details for the file mcp_recognize_image-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_recognize_image-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 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

Hashes for mcp_recognize_image-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43747db209b696e2369bb837cf06fc5f7617c94111f9c94c7f3854f22f81755e
MD5 6bb1d939859476cfe33746f104ce3d6a
BLAKE2b-256 10954d4b3ed74b3fdaa6f69387d38e80d3d359fc0eab8c0bf5cbafd5f278db28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page