agent-vision-mcp logo

agent-vision-mcp

Community
kitlau86

An MCP server that gives non-vision LLMs the ability to "see" images. Plug in any OpenAI-compatible vision API (Gemini, Qwen-VL, OpenAI, or self-hosted) and your text-only model — like DeepSeek in Claude Code — can analyze screenshots, OCR text, read charts, and more.

Publisherkitlau86
Repositoryagent-vision-mcp
LanguageTypeScript
Forks
3
Stars
10
Available tools
9
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    agent-vision-mcp exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 9 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    10 stars and 3 forks from the linked repository.

agent-vision-mcp

English | 中文

🖼️ An MCP server that gives non-vision AI models the ability to analyze images

npm version license

What is this?

Many users connect coding assistants like Claude Code to text-only models such as DeepSeek v4 that have no vision capability. As a result, when you send an image in a conversation, the main model can't understand its content.

agent-vision-mcp solves this: it's an MCP (Model Context Protocol) server that lets you configure any OpenAI-compatible vision API (e.g. Gemini Flash, Alibaba Qwen-VL, OpenAI, or your own self-hosted vision model). When the main model encounters an image, it automatically calls this tool to get a text analysis of the image.

In short: give your text model eyes.

How it works

You: Please analyze the error in this screenshot [uploads screenshot.png]
    ↓
Claude Code (DeepSeek v4) sees an image but can't understand it
    ↓
Claude Code calls the MCP tool: analyze_image(image="screenshot.png", prompt="Read the error in the screenshot")
    ↓
agent-vision-mcp sends the image to your configured vision API (e.g. Gemini Flash)
    ↓
The vision model returns: "The screenshot shows terminal output with a TypeError: Cannot read property 'map' of undefined error at src/app.ts line 42..."
    ↓
Claude Code receives the text description and replies: "Your code has a TypeError at src/app.ts:42..."

Quick start

1. Install

bash
npm install -g @kitlau/agent-vision-mcp

2. Prepare a vision API

You need an OpenAI-compatible vision API. Here are some common options:

ProviderCostConfiguration
Gemini FlashCheap (free tier available)Get an API key, use the OpenAI-compatible endpoint
Alibaba Qwen-VLPay-as-you-goGet an API key from the DashScope platform
OpenAIMore expensiveUse https://api.openai.com/v1 directly
Self-hosted vLLM/LiteLLMDepends on hardwareRuns locally, no external cost

3. Configure the MCP client

Transport: stdio — This MCP server runs as a child process and communicates with the client via standard input/output (stdin/stdout) using JSON-RPC.

Add the following to your Claude Code / Claude Desktop MCP configuration:

json
{
  "mcpServers": {
    "agent-vision": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@kitlau/agent-vision-mcp"],
      "env": {
        "VISION_API_KEY": "your-api-key",
        "VISION_BASE_URL": "https://api.openai.com/v1",
        "VISION_MODEL_NAME": "gpt-4o"
      }
    }
  }
}

4. Use it

Once configured, just send an image in the conversation. The main model will automatically call the analyze_image tool to analyze it.

Configuration reference

Environment variables

VariableRequiredDefaultDescription
VISION_API_KEY✅ Yes-The vision API key
VISION_BASE_URLNohttps://api.openai.com/v1OpenAI-compatible API endpoint
VISION_MODEL_NAMENogpt-4oModel name
VISION_MAX_TOKENSNo1024Max output tokens
VISION_MAX_IMAGE_SIZENo20971520 (20MB)Max image size in bytes
VISION_CACHE_ENABLEDNofalseEnable caching (avoid re-analyzing the same image)
VISION_CACHE_DIRNoSystem temp dirDirectory for cache files

Per-provider configuration examples

OpenAI

json
{
  "env": {
    "VISION_API_KEY": "sk-proj-...",
    "VISION_BASE_URL": "https://api.openai.com/v1",
    "VISION_MODEL_NAME": "gpt-4o"
  }
}

Gemini (via OpenAI-compatible layer)

json
{
  "env": {
    "VISION_API_KEY": "AIza...",
    "VISION_BASE_URL": "https://generativelanguage.googleapis.com/v1beta/openai",
    "VISION_MODEL_NAME": "gemini-2.0-flash"
  }
}

Alibaba Qwen-VL (DashScope)

json
{
  "env": {
    "VISION_API_KEY": "sk-...",
    "VISION_BASE_URL": "https://dashscope.aliyuncs.com/compatible-mode/v1",
    "VISION_MODEL_NAME": "qwen-vl-max"
  }
}

Self-hosted vLLM

json
{
  "env": {
    "VISION_API_KEY": "not-needed",
    "VISION_BASE_URL": "http://localhost:8000/v1",
    "VISION_MODEL_NAME": "Qwen2-VL-7B-Instruct"
  }
}

Self-hosted LiteLLM (aggregating proxy)

json
{
  "env": {
    "VISION_API_KEY": "sk-your-lite-llm-key",
    "VISION_BASE_URL": "http://localhost:4000/v1",
    "VISION_MODEL_NAME": "gemini-2.0-flash"
  }
}

Tip: LiteLLM is a great option — it converts various vision APIs into the OpenAI-compatible format, so you can use it to aggregate multiple providers.

Tool: analyze_image

Parameters

ParameterTypeRequiredDescription
imagestringYesThe image. Accepts: base64 data URL, HTTP/HTTPS link, local file path. Formats: JPEG, PNG, WebP, GIF, BMP
promptstringYesThe analysis instruction. Tells the vision model what information you want

prompt examples

  • "Describe everything in this image in detail"
  • "Extract all visible text in the image (OCR)"
  • "What UI elements and interactive components are in this design mockup?"
  • "Analyze the trends and key data points in this chart"
  • "Read the error message in this terminal output screenshot"
  • "What objects are in this photo, and how are they positioned relative to each other?"

Caching

When caching is enabled, the same image + prompt combination won't be re-sent to the vision API; the previously cached result is returned directly.

json
{
  "env": {
    "VISION_CACHE_ENABLED": "true",
    "VISION_CACHE_DIR": "/tmp/my-vision-cache"
  }
}
  • Cache TTL: 1 hour
  • Cache key: SHA256(image data + "::" + prompt)
  • Storage: one JSON file per cache entry

Development

bash
# Clone the project
git clone https://github.com/kitlau86/agent-vision-mcp.git
cd agent-vision-mcp

# Install dependencies
npm install

# Dev mode (run TypeScript directly with tsx)
npm run dev

# Build
npm run build

# Run the build output
npm start

Tech stack

  • TypeScript (strict mode)
  • @modelcontextprotocol/sdk v1.x (MCP framework)
  • openai v4.x (OpenAI-compatible API client)
  • zod v3.x (parameter validation)

Troubleshooting

Startup error "VISION_API_KEY 未设置"

Make sure the VISION_API_KEY environment variable is set in your MCP client configuration.

Tool call returns "API 密钥无效(401)"

Check that the API key is correct and has permission to access the specified model. Make sure there are no extra spaces or quotes in the key.

Tool call returns "API 端点或模型不存在(404)"

Check that VISION_BASE_URL and VISION_MODEL_NAME are correct. Note that VISION_BASE_URL usually ends with /v1.

Tool call returns "请求被限流(429)"

Free-tier APIs usually have rate limits. Wait a moment and retry, or consider enabling caching to reduce duplicate requests.

Returns "不支持的图片格式"

Currently JPEG, PNG, WebP, GIF, and BMP are supported. Convert the image to one of these formats and try again.

License

MIT

Installation

TypingMind
{
  "mcpServers": {
    "agent-vision-mcp": {
      "command": "npx",
      "args": [
        "agent-vision-mcp"
      ]
    }
  }
}

Available Tools

  • getBrowserCdpStatus

    Use this when you need to verify that the MCP can reach a Chrome DevTools Protocol endpoint.

  • discoverBrowserTabsViaCdp

    Use this when you need the raw list of browser tabs currently exposed by Chrome DevTools Protocol.

  • refreshLiveBrowserTabs

    Use this when you want to refresh the normalized live browser-tab cache from Chrome DevTools Protocol.

  • listLiveBrowserTabs

    Use this when you want the current cached live browser-tab model without re-querying Chrome.

  • pruneStaleLiveBrowserTabs

    Use this when you want to remove stale cached browser tabs that have not been refreshed recently.

  • resolveLiveBrowserTab

    Use this when you want to resolve the active or best matching browser tab for a /see-style query.

  • captureResolvedBrowserTabScreenshot

    Use this when you need a real PNG screenshot from the resolved live browser tab through CDP.

  • getResolvedBrowserTabContext

    Use this when you need structured page metadata and visible text from the resolved live browser tab.

  • seeBrowserTabViaCdp

    Use this for the high-level browser-first /see flow: resolve a live tab, capture it, and return structured page context.

Use agent-vision-mcp MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once agent-vision-mcp is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add agent-vision-mcp as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the agent-vision-mcp MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "agent-vision-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "agent-vision-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the agent-vision-mcp MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the agent-vision-mcp MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use agent-vision-mcp to help me with this task?
agent-vision-mcp
Sure. I read it.
Here is what I found using agent-vision-mcp.

Frequently asked questions

What is the agent-vision-mcp MCP server used for?

agent-vision-mcp is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use agent-vision-mcp MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use agent-vision-mcp with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use agent-vision-mcp MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With agent-vision-mcp connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect agent-vision-mcp MCP to TypingMind?

agent-vision-mcp runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does agent-vision-mcp MCP provide in TypingMind?

agent-vision-mcp exposes 9 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use agent-vision-mcp MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If agent-vision-mcp requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇