Skip to main content
Glama

Vision Bridge MCP

通用视觉 MCP 服务器,支持多种多模态 API 格式。当 Claude Code / Claude Desktop 使用的模型无法直接处理图片时,可通过该 MCP 工具将图片内容转换为文字描述,从而间接“看懂”图片。

功能

提供 3 个 MCP 工具:

  • describe_image:详细描述图片内容(对象、场景、文字、人物动作、颜色、布局等)。

  • extract_image_text:提取图片中的所有文字(OCR)。

  • ask_about_image:针对图片回答具体问题。

支持四种图片输入方式:

  • image_url:图片 URL

  • image_path:本地图片路径

  • image_base64:Base64 编码的图片数据

  • imageMessages API 格式的图片内容块,例如:

{
  "type": "image",
  "source": {
    "type": "base64",
    "media_type": "image/png",
    "data": "iVBORw0KGgo..."
  }
}

Related MCP server: sight-mcp

支持的 API 格式(Provider)

Provider

说明

默认 Endpoint

anthropic

Anthropic Messages API

/v1/messages

openai

OpenAI Chat Completions API

/chat/completions

gemini

Gemini Native generateContent API

/v1beta/models/{model}:generateContent

通过 PROVIDER 环境变量切换 API 格式。

快速开始

全局安装

npm install -g @shen866/vision-bridge-mcp

本地开发

git clone https://github.com/shen866/vision-bridge-mcp.git
cd vision-bridge-mcp
npm install
npm run build

配置 Claude Code

API_KEYBASE_URLMODEL 为必填项。

Anthropic Messages

{
  "mcpServers": {
    "vision_bridge": {
      "command": "npx",
      "args": ["-y", "@shen866/vision-bridge-mcp"],
      "env": {
        "API_KEY": "your-api-key",
        "BASE_URL": "https://api.anthropic.com",
        "MODEL": "claude-3-5-sonnet-20241022"
      }
    }
  }
}

如果使用本地构建版本,将 command 改为 node 并把 args 改为绝对路径:

{
  "mcpServers": {
    "vision_bridge": {
      "command": "node",
      "args": ["/Users/shen/workspace/kimi-vision-mcp/dist/index.js"],
      "env": {
        "API_KEY": "your-api-key",
        "BASE_URL": "https://api.anthropic.com",
        "MODEL": "claude-3-5-sonnet-20241022"
      }
    }
  }
}

OpenAI Chat Completions

{
  "mcpServers": {
    "vision_bridge": {
      "command": "npx",
      "args": ["-y", "@shen866/vision-bridge-mcp"],
      "env": {
        "PROVIDER": "openai",
        "API_KEY": "your-api-key",
        "BASE_URL": "https://api.openai.com/v1",
        "MODEL": "gpt-4o"
      }
    }
  }
}

Gemini Native generateContent

{
  "mcpServers": {
    "vision_bridge": {
      "command": "npx",
      "args": ["-y", "@shen866/vision-bridge-mcp"],
      "env": {
        "PROVIDER": "gemini",
        "API_KEY": "your-api-key",
        "BASE_URL": "https://generativelanguage.googleapis.com",
        "MODEL": "gemini-1.5-pro-latest"
      }
    }
  }
}

使用

在 Claude Code / Claude Desktop 中发送图片或引用图片路径后,Claude 会自动调用 describe_image 等工具获取多模态模型对图片的文字描述,然后将描述交给纯文本模型继续处理。

如果 Claude Code 经常直接把图片发给模型导致报错,可以在项目根目录创建 .claude/CLAUDE.md

当前模型不支持图片输入。当用户发送图片时,必须调用 vision_bridge MCP 工具处理,不要直接传给模型。

环境变量

变量

说明

默认值

PROVIDER

API 格式:anthropicopenaigemini

anthropic

API_KEY

API 密钥

必填

BASE_URL

API 基础地址

必填

ENDPOINT

API 端点路径

取决于 provider

MODEL

模型名称

必填

MAX_TOKENS

最大输出 token 数

4096

API_VERSION

Messages API 版本

2023-06-01

AUTH_HEADER

Messages API 认证方式:x-api-keybearer

x-api-key

协议

基于 MCP(Model Context Protocol)JSON-RPC 2.0,通过 stdio 进行通信。

401 排查

如果返回 401,通常是认证头不对。各 provider 默认认证方式如下:

  • anthropicx-api-key + anthropic-version

  • openaiAuthorization: Bearer

  • gemini:URL query parameter ?key=

如果 Messages API 网关需要 Bearer Token,可设置:

"AUTH_HEADER": "bearer"

Available Tools

3 tools
ask_about_imageB

使用多模态大模型回答关于图片的具体问题。

ParametersJSON Schema
NameRequiredDescriptionDefault
imageNoMessages API 格式的图片内容块
questionYes关于图片的具体问题
image_urlNo图片的 HTTP/HTTPS URL 地址
mime_typeNo当使用 image_base64 时,指定图片 MIME 类型,例如 image/png、image/jpeg
image_pathNo本地图片文件的绝对或相对路径
image_base64No图片的 base64 编码字符串(不包含 data URI 前缀)

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It only states the tool answers questions but omits crucial details such as supported image formats, input constraints, error behavior, or authentication requirements. This is insufficient for an agent to anticipate side effects or limitations.

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 a single, compact sentence with no fluff. It is appropriately sized for a simple tool, though it could benefit from additional context without becoming verbose. The structure is front-loaded with the core action and resource.

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?

Given the tool's complexity (6 parameters, nested objects, multiple image input methods, no output schema, and sibling tools), the description is far too sparse. It does not explain how to choose between the various image inputs, what the output format looks like, or any usage context. The schema covers parameter details, but the description fails to provide the overarching behavioral and contextual information an agent needs.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds no additional meaning beyond the schema; it simply restates the purpose. While the schema thoroughly documents each parameter, the description does not explain the semantic distinction between the multiple image input options (URL, path, base64, structured object), which would help the agent choose appropriately.

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 clearly states the tool uses a multimodal model to answer specific questions about images. This differentiates it from sibling tools like 'describe_image' (general description) and 'extract_image_text' (text extraction), making the purpose distinct and actionable.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus the siblings. It does not mention that it is suitable for specific, nuanced questions rather than general descriptions or text extraction, leaving the agent to infer usage from the name alone.

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

describe_imageC

使用多模态大模型描述图片内容,将图片转换为详细的文字说明,供纯文本模型理解。

ParametersJSON Schema
NameRequiredDescriptionDefault
imageNoMessages API 格式的图片内容块
promptNo可选的额外提示词,用于控制描述风格或指定需要关注的内容
languageNo输出语言,例如 zh(中文)、en(英文),默认中文
image_urlNo图片的 HTTP/HTTPS URL 地址
mime_typeNo当使用 image_base64 时,指定图片 MIME 类型,例如 image/png、image/jpeg
image_pathNo本地图片文件的绝对或相对路径
image_base64No图片的 base64 编码字符串(不包含 data URI 前缀)

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description must convey behavior. It mentions using a multimodal model and outputting text, but fails to disclose details like file size limits, accuracy, latency, or any destructive actions. The description is too vague for a tool with no other behavioral signals.

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

Conciseness3/5

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

The description is a single sentence in Chinese, which is concise but slightly long. It does not waste words, but the structure is minimal. It earns its place but could be more streamlined while adding missing details.

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?

Given the complexity of 7 parameters (including anyOf conditions and nested objects) and the absence of an output schema and annotations, the description is incomplete. It does not explain the return format, error handling, or valid input combinations, making it hard for an agent to use correctly.

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

Parameters3/5

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

The input schema has 100% description coverage for all 7 parameters (including nested objects), so the schema already explains parameter semantics. The tool description adds no additional information beyond what's in the schema. Baseline score of 3 is appropriate.

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's function: using a multimodal model to convert images into detailed text descriptions for understanding by pure text models. It implicitly distinguishes from siblings like 'ask_about_image' and 'extract_image_text' but does not explicitly differentiate.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention when not to use it or any prerequisites. The only hint is that output is for pure text models, but no explicit usage instructions.

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

extract_image_textB

使用多模态大模型 OCR 能力提取图片中的文字内容。

ParametersJSON Schema
NameRequiredDescriptionDefault
imageNoMessages API 格式的图片内容块
image_urlNo图片的 HTTP/HTTPS URL 地址
mime_typeNo当使用 image_base64 时,指定图片 MIME 类型,例如 image/png、image/jpeg
image_pathNo本地图片文件的绝对或相对路径
image_base64No图片的 base64 编码字符串(不包含 data URI 前缀)

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description must fully disclose behaviors. It mentions using multimodal OCR but does not explain what image formats are supported, whether there are size limits, how errors are handled, or what the return format is. The multiple image input methods in the schema are not acknowledged in the description.

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 a single concise sentence, front-loading the core purpose. However, it omits valuable context that would help the agent, so while efficient, it sacrifices completeness.

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?

The tool has 5 parameters with nested objects and multiple image input methods, and no output schema. The description fails to mention what the tool returns (extracted text) or any limitations. It is not sufficiently complete for an agent to use without additional guidance.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters. The description adds no extra meaning beyond 'extract text from images', meeting the baseline of 3. It does not elaborate on how to use the various image input methods.

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 clearly states the tool extracts text from images using OCR, which is a specific verb and resource. It distinguishes itself from siblings 'ask_about_image' and 'describe_image' by focusing on text content extraction rather than description or question answering.

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

Usage Guidelines2/5

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

No explicit usage guidelines are provided. The description does not specify when to use this tool over alternatives like 'ask_about_image' or 'describe_image'. The purpose is implied but not supported with contextual direction.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.5.0
    • First observedask_about_image
    • First observeddescribe_image
    • First observedextract_image_text

TDQS

A3.5/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a distinct purpose: ask_about_image answers specific questions, describe_image generates a detailed description, and extract_image_text performs OCR. There is no overlap or ambiguity.

Naming Consistency5/5

All tools follow the verb_noun pattern with underscores, using clear and distinct verbs (ask, describe, extract). The naming is consistent throughout.

Tool Count5/5

With three tools, the server is well-scoped for image understanding tasks. Each tool serves a clear function without being excessive or insufficient.

Completeness4/5

The tools cover key image understanding capabilities: description, OCR, and question answering. Minor gaps like image classification or segmentation exist, but the set is largely complete for its implied purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables any LLM to describe images from file paths, URLs, or base64 data by forwarding them to a supported vision provider such as OpenAI, Anthropic, or local Ollama models.
    770 npm
    10
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    A lightweight MCP server that provides vision capabilities to text-only models like Claude Code and Codex by forwarding images to an OpenAI-compatible multimodal model, offering tools for image analysis and OCR.
    -