Skip to main content
Glama

MCP-Vision

基于 goehou/Visual-Enhancement-mcp(MIT)魔改的 MCP 服务,接入 OpenAI 兼容 API,提供看图、识字、生图。

工具

工具

做什么

vision_analyze

通用图片理解

vision_ocr

逐字提取图片文字

image_generate

文本生成图片(多张/尺寸/模型覆盖)

图片传法三选一:imagePath(本地路径)/ imageUrl / imageBase64 + imageMediaType

Related MCP server: AI Image MCP Server

配置

模型优先级:调用时传 model > 工具专用 > 全局默认。

环境变量

说明

默认值

VISION_API_BASE_URL

视觉 API 根地址

必填

VISION_API_KEY

视觉 Key

必填

VISION_MODEL

默认视觉模型

必填

VISION_ANALYZE_MODEL

analyze 专用模型

回退 VISION_MODEL

VISION_BACKUP_API_BASE_URL

ocr 备用视觉平台地址

回退 VISION_API_BASE_URL

VISION_BACKUP_API_KEY

ocr 备用视觉 Key

回退 VISION_API_KEY

VISION_BACKUP_MODEL

ocr 备用视觉模型

回退 VISION_MODEL

IMAGE_API_BASE_URL

生图 API 根地址

回退 VISION_API_BASE_URL

IMAGE_API_KEY

生图 Key

回退 VISION_API_KEY

IMAGE_MODEL

生图模型

回退 VISION_MODEL

VISION_TIMEOUT_MS

视觉超时(毫秒)

60000

IMAGE_TIMEOUT_MS

生图超时(毫秒)

120000

OpenCode 配置:

{
  "mcp": {
    "vision": {
      "type": "local",
      "command": ["mcp-vision-server"],
      "environment": {
        "VISION_API_BASE_URL": "...",
        "VISION_API_KEY": "...",
        "VISION_MODEL": "...",
        "IMAGE_API_BASE_URL": "...",
        "IMAGE_API_KEY": "...",
        "IMAGE_MODEL": "..."
      },
      "enabled": true
    }
  }
}

相比原项目

  • 新增 image_generate 生图工具(多张/尺寸/模型覆盖,URL 下载加固)

  • 新增 VISION_BACKUP_* 备用视觉端点

  • 新增 VISION_ANALYZE_MODEL 工具级模型覆盖

  • 加固:仅允许 http/https 下载、base64 大小上限、错误信息截断、多图全返回、空配置可启动

安装

# 方式一:本地克隆后安装
git clone https://github.com/xiaoshengyvlin/MCP-Vision.git
cd MCP-Vision
npm install -g .

# 方式二:tarball 安装
npm pack && npm install -g mcp-vision-server-0.1.4.tgz

AI 安装(推荐)

帮我安装这个项目:https://github.com/xiaoshengyvlin/MCP-Vision

Available Tools

3 tools
image_generateGenerate imagesA

Generate one or more images from a text prompt through an OpenAI-compatible images/generations endpoint. Images are returned inline as base64 when available, otherwise as download URLs.

ParametersJSON Schema
NameRequiredDescriptionDefault
nNoOptional number of images to generate (1-4).
sizeNoOptional image size such as 1024x1024.
modelNoOptional model override.
promptYesText description of the image to generate.

Output Schema

ParametersJSON Schema
NameRequiredDescription
textYesDescription of the generated images.
countYesNumber of images generated.
modelYesModel used for the request.

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the behavioral burden. It adds useful context about output format (inline base64 or download URLs), but does not disclose prerequisites like API key requirements, cost, rate limits, or failure behavior, so its transparency is partial.

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 two focused sentences with the verb+resource front-loaded and zero redundancy. It efficiently communicates purpose, mechanism, and output format.

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

Completeness4/5

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

The description, combined with a fully described schema and an output schema, gives an agent enough to invoke and interpret results. It lacks explicit usage alternatives and deeper behavioral caveats, but for a simple generation tool it is sufficiently complete.

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 descriptions cover 100% of the parameters, so the baseline is 3. The description adds no additional parameter semantics beyond the schema's own details, though it does reinforce the 'one or more' notion via 'Generate one or more images'.

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 uses a specific verb 'generate' with a clear resource ('images') and source ('text prompt'), which precisely defines the tool's purpose. It also distinguishes itself from sibling tools like vision_analyze and vision_ocr, which analyze or OCR images rather than create them.

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

Usage Guidelines4/5

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

The context for when to use the tool is clear: generating one or more images from a text prompt. However, it does not explicitly state exclusions or mention alternatives such as vision_analyze/vision_ocr, stopping short of the highest level of guidance.

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

vision_analyzeAnalyze an image with a vision modelA

Understand, explain, or describe an image using a vision model. Use for interpreting screenshots, UI, diagrams, charts, or error messages that need reasoning. Not for verbatim text extraction (use vision_ocr).

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoOptional model override.
detailNoOptional detail level for providers that support it.
promptYesInstruction passed to the vision model.
imageUrlNoRemote URL, data URL, or file URL. Mutually exclusive with imagePath and imageBase64.
imagePathNoLocal absolute image path. Mutually exclusive with imageUrl and imageBase64.
maxTokensNoOptional max output tokens.
imageBase64NoBase64-encoded image payload. Use this for uploaded attachments when the client can pass file contents.
imageMediaTypeNoRequired with imageBase64, for example image/png or image/jpeg.

Output Schema

ParametersJSON Schema
NameRequiredDescription
textYesText returned by the vision model.
modelYesModel used for the request.
mediaTypeYesResolved image media type.
sourceLabelYesResolved image source label.

TDQS

A4.5/5.0
Behavior4/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 clearly indicates non-mutating analysis behavior (understand/explain/describe) and clarifies the tool is for reasoning rather than exact extraction. It doesn't mention model defaults or fallibility, but given the output schema exists, the main behavioral traits are adequately conveyed.

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?

Three sentences: state purpose, give positive use cases, give negative use case with alternative. Front-loaded and every sentence serves a clear function with zero waste.

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

Completeness5/5

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

For an analysis tool with a rich schema and output schema present, the description covers purpose, usage, and exclusion. It doesn't need to explain return values because the output schema handles that. Complete for an AI agent to select and invoke 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?

Schema description coverage is 100%, so the baseline is 3. The description adds a small semantic hint about prompt framing ('understand, explain, or describe') but doesn't significantly enhance parameter understanding beyond the schema's existing descriptions.

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 first sentence uses a specific verb-resource combination ('Understand, explain, or describe an image') and explicitly distinguishes from the sibling tool vision_ocr by stating 'Not for verbatim text extraction (use vision_ocr)'. This makes the purpose crystal clear and differentiates it from alternatives.

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 states concrete use cases ('screenshots, UI, diagrams, charts, or error messages that need reasoning') and explicitly excludes OCR with a direct reference to vision_ocr. This is an ideal when/when-not/alternatives pattern.

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

vision_ocrExtract text from an imageA

Extract exact text from an image (OCR). Use when the user wants literal text copied verbatim from a screenshot, code image, terminal output, document, or receipt. Not for explaining or understanding images (use vision_analyze).

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoOptional model override.
detailNoOptional detail level for providers that support it.
imageUrlNoRemote URL, data URL, or file URL. Mutually exclusive with imagePath and imageBase64.
imagePathNoLocal absolute image path. Mutually exclusive with imageUrl and imageBase64.
maxTokensNoOptional max output tokens.
imageBase64NoBase64-encoded image payload. Use this for uploaded attachments when the client can pass file contents.
languageHintNoOptional language hint such as zh-CN or en.
outputFormatNoPreferred OCR output format. Defaults to plain.
imageMediaTypeNoRequired with imageBase64, for example image/png or image/jpeg.

Output Schema

ParametersJSON Schema
NameRequiredDescription
textYesText returned by the vision model.
modelYesModel used for the request.
mediaTypeYesResolved image media type.
sourceLabelYesResolved image source label.

TDQS

A4.4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full behavioral burden. It discloses the core behavior of extracting exact, verbatim text and implies a non-destructive operation. However, it does not mention potential limitations (e.g., language/accuracy) or explicitly state that it is read-only, though this is strongly implied.

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 concise and front-loaded with the purpose. It consists of two sentences: the first defines the tool, the second provides usage and an alternative. Every sentence contributes meaning without redundancy.

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

Completeness4/5

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

With 9 parameters, all covered by schema descriptions, and an output schema present, the description adds the essential context: when to use and when not, plus clear differentiation from a sibling. It does not explain return values because the output schema covers that. Slight gap is lack of mention of mutual exclusivity of image inputs, but that is covered in the schema.

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 useful context about image types but does not provide parameter-specific semantics beyond what the schema already contains. No additional value for the 9 parameters.

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's function: 'Extract exact text from an image (OCR).' It uses a specific verb and resource, provides concrete examples, and explicitly differentiates from vision_analyze by stating it is 'Not for explaining or understanding images (use vision_analyze).'

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?

Provides explicit when-to-use guidance: 'Use when the user wants literal text copied verbatim from a screenshot, code image, terminal output, document, or receipt.' It also gives a clear exclusion and alternative: 'Not for explaining or understanding images (use vision_analyze).'

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.1.4
    • First observedimage_generate
    • First observedvision_analyze
    • First observedvision_ocr

TDQS

A4.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: vision_analyze for understanding/explaining images, vision_ocr for verbatim text extraction, and image_generate for creating images. The descriptions explicitly cross-reference each other to prevent confusion, leaving no ambiguity.

Naming Consistency4/5

The naming is mostly consistent with a domain prefix and action (vision_analyze, vision_ocr), but image_generate deviates by using 'image_' instead of 'vision_'. This is a minor inconsistency that does not hinder readability, but it is a noticeable break from the established pattern.

Tool Count5/5

Three tools is a well-scoped count for a vision server, covering analysis, OCR, and generation. Each tool addresses a distinct core capability, and there are no redundant or missing tools that would suggest over- or under-engineering.

Completeness5/5

For the stated domain of vision tasks, the tool surface is complete: understanding (analyze), text extraction (OCR), and creation (generate). There are no obvious missing operations that would force an agent into a dead end; the tools cover the primary workflows one would expect from a vision server.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI-powered image analysis using OpenAI's Vision API and image generation with DALL-E models. Supports image description, content analysis, comparison, editing, and creating variations with intelligent caching.
    3
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Provides advanced image analysis capabilities including object recognition, OCR text extraction, and multi-turn visual dialogues using OpenAI-compatible APIs. It supports both local files and Base64 inputs with additional features for session persistence and web-based configuration management.
    3
    MIT