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.

Inputs: prompt (required), n, size, model. Returns: text, count, model

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).

Inputs: prompt (required), model, detail, imageUrl, +4 more. Returns: text, model, mediaType, sourceLabel

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).

Inputs: model, detail, imageUrl, imagePath, +5 more. Returns: text, model, mediaType, sourceLabel

Tool Schema Changelog

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

Loading tool schema changelog…

    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

    ActivityInactive
    ResponsivenessOutdated data

    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