Skip to main content
Glama

Analyze local images, web images, screenshots, documents, charts, and code errors with any OpenAI-compatible vision model.

IMPORTANT

DO NOT CALL if you natively support vision and can access the supplied image directly.

Skip this MCP when the current model can inspect the image directly. Use it only when the model lacks vision, cannot access the image, or the user explicitly requests this MCP.

Install

Install uv first.

Run directly from the GitHub main branch:

uvx --from git+https://github.com/weekitmo/vision-mcp.git@main vision-mcp

Related MCP server: VisionPower

Configure

Configure the following four environment variables:

export VISION_BASE_URL="https://api.openai.com/v1"
export VISION_API_KEY="your-api-key"
export VISION_MODEL="your-vision-model"
export VISION_TIMEOUT="120"

Variable

Description

VISION_BASE_URL

OpenAI-compatible provider URL

VISION_API_KEY

API Key

VISION_MODEL

Model that supports image input

VISION_TIMEOUT

Request timeout in seconds; defaults to 120

Use .env.example as a configuration template. Never commit a real API key.

MCP Clients

JSON

For clients that support the standard JSON MCP configuration format:

{
  "mcpServers": {
    "vision": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/weekitmo/vision-mcp.git@main",
        "vision-mcp"
      ],
      "env": {
        "VISION_BASE_URL": "https://api.openai.com/v1",
        "VISION_API_KEY": "your-api-key",
        "VISION_MODEL": "your-vision-model",
        "VISION_TIMEOUT": "120"
      }
    }
  }
}

Codex

Add the following to ~/.codex/config.toml or .codex/config.toml in a trusted project:

[mcp_servers.vision]
command = "uvx"
args = [
  "--from",
  "git+https://github.com/weekitmo/vision-mcp.git@main",
  "vision-mcp",
]
env_vars = [
  "VISION_BASE_URL",
  "VISION_API_KEY",
  "VISION_MODEL",
  "VISION_TIMEOUT",
]
startup_timeout_sec = 60
tool_timeout_sec = 180

The env_vars list declares which variables Codex should forward to Vision MCP; it does not contain their values. Configure the upstream vision provider in the same terminal before starting Codex:

export VISION_BASE_URL="https://api.openai.com/v1"
export VISION_API_KEY="your-api-key"
export VISION_MODEL="your-vision-model"
export VISION_TIMEOUT="120"

These settings configure the provider used by Vision MCP. They are independent of the account or API key used by Codex itself. After exporting the variables, start Codex or verify that the MCP server is registered:

codex mcp list

See config/codex.toml.example for the complete example.

DeepSeek Harness

Add the following patch entry to $HOME/.dsh/profiles/web/cordis.patch.yml:

# Your patch layer for this dsh profile, applied after every bundle layer:
# a top-level YAML array of loader patch entries (id-targeted config
# overrides, disables, and insert lists; `!!js` expressions allowed).

# Vision MCP server (stdio). Exposes tools as mcp__vision__*.
# Image understanding / OCR via an OpenAI-compatible vision Chat Completions API.
# docs: https://github.com/weekitmo/vision-mcp
- insert:
    - id: mcp-vision
      name: '@deepseek-ai/dsh-mcp-client'
      config:
        serverName: vision
        transport: stdio
        command: uvx
        args:
          - '--from'
          - 'git+https://github.com/weekitmo/vision-mcp.git@main'
          - vision-mcp
        env:
          VISION_BASE_URL: 'https://api.openai.com/v1'
          VISION_API_KEY: !!js process.env.VISION_API_KEY
          VISION_MODEL: !!js process.env.VISION_MODEL
          VISION_TIMEOUT: '120'

Export VISION_API_KEY and VISION_MODEL before starting DeepSeek Harness. Change VISION_BASE_URL if the vision model is hosted by another OpenAI-compatible provider.

Grok

Add the following to ~/.grok/config.toml or the project's .grok/config.toml:

[mcp_servers.vision]
command = "uvx"
args = [
  "--from",
  "git+https://github.com/weekitmo/vision-mcp.git@main",
  "vision-mcp",
]
enabled = true
startup_timeout_sec = 60
tool_timeout_sec = 180

[mcp_servers.vision.env]
VISION_BASE_URL = "https://api.openai.com/v1"
VISION_API_KEY = "your-api-key"
VISION_MODEL = "your-vision-model"
VISION_TIMEOUT = "120"

Grok does not use Codex's env_vars list. It uses [mcp_servers.vision.env] to configure the MCP process environment directly. The expected variable name is VISION_BASE_URL, not VISION_API_BASE_URL.

To avoid storing the API key directly in TOML, reference environment variables that are available when Grok starts:

[mcp_servers.vision.env]
VISION_BASE_URL = "${VISION_BASE_URL}"
VISION_API_KEY = "${VISION_API_KEY}"
VISION_MODEL = "${VISION_MODEL}"
VISION_TIMEOUT = "${VISION_TIMEOUT:-120}"

These settings configure the provider used by Vision MCP. They are independent of the account or API key used by Grok itself. Do not commit a project-level .grok/config.toml that contains a real API key. Verify the configuration with:

grok mcp list

See config/grok.toml.example for the complete example.

Inspector

Start MCP Inspector with:

./scripts/test-ui.sh

The script pins @modelcontextprotocol/inspector@2.1.0.

In Inspector:

  1. Open vision-local.

  2. Enter the four VISION_* settings under Environment Variables.

  3. Connect to the server.

  4. Open Tools.

  5. Select analyze_image or understand_image.

  6. Enter the image path and prompt, then run the tool.

Inspector stores its local configuration in .inspector/mcp.json, which is excluded from Git.

mcporter

Initialize the project configuration:

./scripts/setup-mcporter.sh

Inspect the available tools:

mcporter list vision --schema --all-parameters

Analyze one image:

mcporter call vision.analyze_image \
  image=/absolute/path/to/screenshot.png \
  prompt="Extract all text from this image" \
  mode=ocr \
  detail=high \
  --timeout 120000

Compare multiple images:

mcporter call vision.understand_image \
  --args '{
    "images": [
      "/absolute/path/before.png",
      "/absolute/path/after.png"
    ],
    "prompt": "Compare the differences between these images",
    "mode": "compare"
  }' \
  --timeout 120000 \
  --output json

Read the built-in documentation resources:

mcporter resource vision
mcporter resource vision vision://docs/quickstart
mcporter resource vision vision://docs/tools

Tools

analyze_image

Analyze a single image. This tool is suitable for Inspector, mcporter, and command-line calls.

image       Local path, HTTP(S) URL, or data URL
prompt      Question or instruction for the model
mode        Analysis mode
ascii_mode  Whether to represent layouts with ASCII
detail      Image input detail level
max_tokens  Maximum output length

understand_image

Analyze or compare multiple images. This tool also supports clients that use different image argument formats.

images      List of images
prompt      Question or instruction for the model
mode        Analysis mode
ascii_mode  Whether to represent layouts with ASCII
detail      Image input detail level
max_tokens  Maximum output length

Available modes:

auto · describe · ocr · document · ui · chart · compare · spatial · code

PNG, JPEG, WEBP, and GIF are supported. Each call accepts up to 10 images.

From Source

For development or debugging:

git clone https://github.com/weekitmo/vision-mcp.git
cd vision-mcp
uv sync --frozen
uv run vision-mcp

Run from source in an MCP client:

{
  "mcpServers": {
    "vision": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/vision-mcp",
        "run",
        "--frozen",
        "vision-mcp"
      ],
      "env": {
        "VISION_BASE_URL": "https://api.openai.com/v1",
        "VISION_API_KEY": "your-api-key",
        "VISION_MODEL": "your-vision-model",
        "VISION_TIMEOUT": "120"
      }
    }
  }
}

License

MIT

Available Tools

2 tools
analyze_imageA

DO NOT CALL if you natively support vision and can access the supplied image directly. Call this MCP only when native vision is unavailable, the image source is inaccessible to your native vision capability, or the user explicitly requests this MCP or its configured provider.

Analyze one local image path, HTTP(S) image URL, or image data URL. This CLI-friendly single-image tool is the simplest entry point for mcporter and shell automation. Use understand_image for multiple images.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNoauto
imageYes
detailNoauto
promptNoAnalyze the supplied image.
ascii_modeNoauto
max_tokensNo
system_promptNo

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does add context about supported image source types and the single-image limitation. However, it does not disclose return format, how modes affect processing, or potential errors, leaving behavioral expectations partially unclear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured, front-loading the critical DO NOT CALL warning, followed by a concise function statement and sibling distinction. Every sentence serves a purpose with no unnecessary verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description needs to explain return values and parameter behaviors. It provides essential usage guidelines but omits output semantics and details for six of seven parameters, making it incomplete for a complex tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the description only explains the image parameter (path, URL, data URL). The other six parameters (mode, detail, prompt, ascii_mode, max_tokens, system_prompt) receive no explanation, creating significant ambiguity for correct use.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool analyzes a single image from a path, URL, or data URL. It clearly distinguishes from the sibling tool by noting 'Use understand_image for multiple images,' making the purpose specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description opens with explicit DO NOT CALL conditions, then provides clear criteria for when to call (native vision unavailable, source inaccessible, or user requests the MCP/provider). It also names the alternative for multiple images, giving comprehensive when/when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

understand_imageA

DO NOT CALL if you natively support vision and can access the supplied image directly. Call this MCP only when native vision is unavailable, the image source is inaccessible to your native vision capability, or the user explicitly requests this MCP or its configured provider.

Understand one or more images for description, OCR, document extraction, UI inspection, chart reading, comparison, spatial reasoning, or code/error screenshot analysis. Inputs may be local paths, HTTP(S) URLs, or image data URLs. Built-in prompt modes and optional ASCII rendering are available.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNoauto
detailNoauto
imagesNo
promptNo
image_urlNo
ascii_modeNoauto
image_pathNo
image_urlsNo
max_tokensNo
image_pathsNo
system_promptNo

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since no annotations are provided, the description carries the full burden. It discloses supported input types (local paths, HTTP(S) URLs, image data URLs), built-in prompt modes, and optional ASCII rendering. It also communicates that this is a fallback for native vision, providing valuable behavioral context beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the critical usage warning, and the second paragraph efficiently lists capabilities and input types. While the first paragraph is slightly verbose, every sentence contributes meaning, and the structure is clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 11 parameters, no output schema, and no annotations, the description is insufficiently complete. It does not explain what the tool returns, how the modes differ, or how to combine parameters. The broad capability list is helpful but leaves many operational details unaddressed for such a complex tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It only hints at two parameters ('Built-in prompt modes' and 'optional ASCII rendering') but does not explain the modes, detail levels, image input parameters, or other fields. The description does not provide enough information to know how to populate the 11 parameters effectively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'Understand one or more images' with a specific list of use cases (description, OCR, document extraction, UI inspection, chart reading, code screenshots). However, it does not differentiate from the sibling tool 'analyze_image', so it lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit instructions: 'DO NOT CALL if you natively support vision and can access the supplied image directly' and 'Call this MCP only when native vision is unavailable, the image source is inaccessible... or the user explicitly requests this MCP.' This clearly specifies when to use and when not to use, including an alternative (native vision).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.8/5.0
Disambiguation3/5

Both tools analyze images, but analyze_image is for a single image while understand_image supports multiple images and more modes. The descriptions include cross-references, which helps, but the strong overlap in purpose could still confuse an agent.

Naming Consistency5/5

Both tool names follow the same verb_noun pattern (analyze_image, understand_image) and are grammatically consistent, making the naming predictable.

Tool Count3/5

With only two tools, the server feels thin for a vision MCP, though it covers both single-image and multi-image analysis. It is borderline but not severely under-scoped.

Completeness4/5

The two tools cover a broad range of vision tasks (description, OCR, document extraction, UI inspection, chart reading, etc.), leaving only minor gaps such as direct image metadata retrieval or manipulation.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to analyze images using any OpenAI-compatible vision API, providing tools for image analysis, OCR, error diagnosis, diagram understanding, and chart analysis.
    MIT

Latest Blog Posts

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/weekitmo/vision-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server