Skip to main content
Glama
ganyu123456

mcp-multivision-server

by ganyu123456

MCP Multivision Server

为大模型提供图片与视频分析能力的 MCP 服务器,纯云端:所有视觉理解都交给 OpenAI 兼容的云端视觉大模型完成,视频原生交给模型处理(如 Qwen3.5,通过 DashScope video_url)—— 本地不做任何抽帧/转码,镜像轻量、无 ffmpeg / OpenCV 依赖。

设计:视频的抽帧与时序对齐由模型服务端完成。一份 base_url + api_key + model 配置即可切换 通义千问3.5 / Qwen-VL / GLM-4V / GPT-4o(GPT-4o 仅图片,不支持 video_url)。

功能

  • 图片理解问答:描述、问答、OCR、图表解读、UI 分析、示意图理解、报错诊断(vision_analyze_image,含任务预设)

  • 视频理解(原生):把视频直接交给云端多模态大模型,按时间顺序分析场景/对象/动作/事件(vision_analyze_video)

  • 图片元信息(本地):EXIF/尺寸/格式,Pillow 解析(vision_image_metadata)

  • 支持 stdio 与 SSE 两种传输

  • 输入支持:本地绝对路径 / file:// / http(s):// / base64(data URI);视频推荐传 http(s) URL

Related MCP server: mcp-ffmpeg

快速开始

1. 配置云端视觉模型(OpenAI 兼容)

视频需选支持原生视频的模型:

平台

MCP_VISION_BASE_URL

示例 MCP_VISION_MODEL

视频

通义千问3.5

https://dashscope.aliyuncs.com/compatible-mode/v1

qwen3.5-plus

通义千问VL

https://dashscope.aliyuncs.com/compatible-mode/v1

qwen-vl-max

智谱 GLM-4V

https://open.bigmodel.cn/api/paas/v4

glm-4v

视模型

OpenAI

https://api.openai.com/v1

gpt-4o

✗(仅图片)

video_url 是 DashScope 对 OpenAI 协议的扩展,因此原生视频当前主要在通义千问系列可用; OpenAI 官方 GPT-4o 不支持 video_url,只能做图片。

2. 本地开发运行

无需 ffmpeg,纯 Python 依赖:

python -m venv .venv && source .venv/bin/activate
pip install -e ".[sse]"

# stdio(本地 MCP 客户端)
mcp-multivision-server

# SSE(远程 MCP 客户端)
MCP_TRANSPORT=sse MCP_PORT=8093 mcp-multivision-server

部署

cp .env.example .env       # 填入 MCP_VISION_BASE_URL / API_KEY / MODEL
docker compose up -d

镜像基于 python:3.11-slim,无 ffmpeg / OpenCV / 系统库依赖,体积约 200MB。

推送 v* tag 触发 GitHub Actions:原生 amd64 + arm64 构建、推送 Harbor、多架构 manifest、GitHub Release。 需配置仓库 secrets HARBOR_USERNAME / HARBOR_PASSWORD

MCP 客户端配置

SSE:

{ "mcpServers": { "multivision": { "url": "http://<your-server>:8093/sse" } } }

stdio:

{
  "mcpServers": {
    "multivision": {
      "command": "mcp-multivision-server",
      "env": {
        "MCP_VISION_BASE_URL": "https://dashscope.aliyuncs.com/compatible-mode/v1",
        "MCP_VISION_API_KEY": "your_api_key",
        "MCP_VISION_MODEL": "qwen3.5-plus"
      }
    }
  }
}

环境变量

变量

默认值

说明

MCP_TRANSPORT

stdio

stdiosse

MCP_HOST / MCP_PORT

0.0.0.0 / 8093

SSE 监听地址

MCP_VISION_PROVIDER

openai

provider 名(当前支持 openai 兼容)

MCP_VISION_BASE_URL

视觉模型 API 基址

MCP_VISION_API_KEY

视觉模型 API Key

MCP_VISION_MODEL

模型名(视频需支持原生视频,如 qwen3.5-plus)

MCP_VISION_MAX_TOKENS

1024

生成上限

MCP_VISION_TEMPERATURE

0.2

采样温度

MCP_VISION_TIMEOUT

120

请求超时(秒),视频较慢

MCP_VISION_MAX_RETRIES

3

失败重试次数

MCP_VISION_MAX_IMAGE_SIZE

20971520

单图 base64 字节上限(20MB)

MCP_VISION_MAX_VIDEO_SIZE

104857600

本地视频转 base64 上限(100MB),更大请传 URL

MCP_VISION_ALLOWED_IMAGE_FORMATS

jpeg,png,webp,gif,bmp,tiff

允许的图片格式

MCP_VISION_CACHE_ENABLED

false

是否缓存分析结果

MCP_VISION_CACHE_DIR

/tmp/mcp-vision-cache

缓存目录

MCP 工具列表

工具

说明

是否需云端 key

vision_analyze_image

图片描述/问答/OCR/图表/UI/报错(含 preset)

vision_analyze_video

视频原生交给云端模型理解(video_url)

vision_image_metadata

尺寸/格式/EXIF/GPS(本地 Pillow)

vision_get_server_status

配置与可用性自检

vision_analyze_imagepreset 可选:describe / ocr / chart / ui / diagram / error;提供 prompt 时覆盖 preset。

项目结构

03-mcp-multivision-server/
├── Dockerfile / docker-compose.yaml / .env.example
├── pyproject.toml / requirements.txt
├── .github/workflows/build-release.yaml
└── src/mcp_multivision_server/
    ├── server.py                 # 入口 + 4 个工具
    ├── providers/                # 云端 VLM
    │   ├── base.py               # BaseVisionProvider / VisionResult / ProviderError
    │   └── openai_compat.py      # OpenAI 兼容 provider(含 video_url)
    └── media/
        ├── inputs.py             # 输入解析:图片/视频 → image_url / video_url
        └── imageinfo.py          # 本地 EXIF/尺寸(Pillow)

许可

MIT

Available Tools

4 tools
vision_analyze_imageA

图片理解问答:调用云端视觉大模型对图片进行描述、问答、OCR、图表/UI/报错分析等。可用 prompt 自由提问,或用 preset 选择任务类型。

ParametersJSON Schema
NameRequiredDescriptionDefault
imageYes图片输入,支持:本地绝对路径 / file:// URL / http(s) URL / base64(data URI)
presetNo任务预设:describe 描述 / ocr 文字识别 / chart 图表 / ui 界面 / diagram 示意图 / error 报错诊断describe
promptNo自由指令/问题;提供后覆盖 preset
max_tokensNo可选,本次生成上限
temperatureNo可选,采样温度

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 full burden. It indicates the tool calls a cloud visual large model, implying latency and cost, but does not disclose rate limits, authentication needs, or error handling for invalid inputs. The description adds some context but is not comprehensive.

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?

Two sentences efficiently convey the tool's purpose and usage options without waste. The most important information (image analysis, cloud model, flexible input) is front-loaded.

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?

Given the tool's moderate complexity (5 params, no nested objects, no output schema), the description covers the key aspects: what it does, how to use it (prompt/preset), and input formats. It does not describe the return format, but that is a minor omission for a text-generation tool.

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

Parameters4/5

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

Schema coverage is 100% with all parameters described. The description adds value by explaining that prompt overrides preset, providing a list of preset options, and clarifying the flexible input formats for the image parameter. This goes beyond the schema's individual 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 description clearly states the tool's function as image understanding using a cloud vision model for tasks like description, OCR, chart/UI/error analysis. The verb 'analyze' and resource 'image' are explicit, and it distinguishes from siblings by focusing on static images rather than video or face detection.

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

Usage Guidelines3/5

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

The description mentions using prompt or preset, but does not explicitly state when to use this tool versus alternatives like vision_analyze_video. It implies usage for static images but lacks explicit when-not or alternative guidance.

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

vision_analyze_videoA

视频理解:将视频原生交给云端多模态大模型(如 Qwen3.5,通过 DashScope video_url)进行理解——抽帧与时序对齐由模型服务端完成,本地不做任何处理。推荐传视频的 http(s) URL;本地文件会转 base64(受大小限制)。

ParametersJSON Schema
NameRequiredDescriptionDefault
videoYes视频输入,支持:http(s) URL(推荐) / 本地绝对路径 / file:// URL / base64(data URI)
promptNo自由指令/问题,如'这段视频里发生了什么?按时间顺序描述'
max_tokensNo可选,本次生成上限
temperatureNo可选,采样温度

TDQS

A3.6/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 behavior. It mentions server-side processing and local file size limits but fails to describe the return value format, error handling, authentication, or rate limits, leaving significant gaps.

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 extremely concise, using two sentences to convey the core purpose, process, and recommendations. Every sentence provides essential information without redundancy.

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 video analysis, missing annotations, and no output schema, the description should cover return values, error states, and limitations. It only partially addresses input handling and omits output and behavioral details, making it incomplete.

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

Parameters4/5

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

With 100% schema description coverage, baseline is 3. The description adds value by recommending http(s) URLs and explaining that local files are base64-encoded with size limits, going beyond the schema's parameter 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 description clearly states the tool performs video understanding by sending video to a cloud multimodal model. It specifies that frame extraction and temporal alignment are handled server-side, distinguishing it from sibling tools like vision_analyze_image which targets images.

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

Usage Guidelines3/5

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

The description recommends using http(s) URLs and notes that local files are base64-encoded with size limits. However, it does not explicitly state when to use this tool versus alternatives (e.g., vision_analyze_image) or when not to use it, providing only partial usage guidance.

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

vision_get_server_statusA

查询服务状态:云端视觉模型是否已配置、当前模型与配置项。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/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 full burden. It indicates a read-only query operation, but lacks details on network calls, caching, or potential impacts. Adequate for a simple check, but not rich.

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?

Single sentence with clear, front-loaded information. No wasted words, every part adds value.

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?

For a tool with no parameters and no output schema, the description covers the basic purpose and what it returns. Could specify output format, but it's fairly complete for a simple query.

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

Parameters4/5

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

No parameters exist, so baseline is 4. Description doesn't add parameter info but is not necessary. Schema coverage is 100% (empty) so no deduction.

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?

Description clearly states it queries server status, including whether the cloud vision model is configured, current model, and configuration items. This differentiates from sibling tools like vision_analyze_image which are for content analysis.

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

Usage Guidelines3/5

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

Description implies usage for checking service status, but does not explicitly state when to use versus alternatives or provide exclusions. Sibling tool names suggest different purposes, but no direct guidance is given.

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

vision_image_metadataA

图片元信息:读取尺寸、格式、颜色模式与 EXIF(含拍摄时间、GPS 若有),本地 Pillow 解析,不调用云端。

ParametersJSON Schema
NameRequiredDescriptionDefault
imageYes图片输入,支持:本地绝对路径 / file:// URL / http(s) URL / base64(data URI)

TDQS

A4.1/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 full burden. It clearly discloses the tool is local, non-cloud, and reads specific metadata types. It lacks details on error handling or behavior with unsupported formats, but overall transparency is good for a read-only tool.

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 a single, well-formed sentence that front-loads the key action and results. Every word is necessary; there is no redundancy or verbosity.

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?

Given the tool's simplicity (one parameter, no output schema), the description fully covers the tool's purpose, what it reads, and its local nature. It provides sufficient context for an AI agent to understand the tool's capabilities and constraints.

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% for the single parameter 'image', which already details the supported input formats. The tool description adds no additional parameter-level meaning beyond what the schema provides, so baseline 3 is appropriate.

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 reads metadata (dimensions, format, color mode, EXIF), specifies local Pillow parsing with no cloud calls, and distinguishes itself from sibling tools like vision_analyze_image (likely more complex) and vision_analyze_video (video). The verb '读取' (read) and resource '元信息' (metadata) are specific.

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

Usage Guidelines3/5

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

The description implies usage when local metadata extraction is needed ('本地 Pillow 解析,不调用云端'), but does not explicitly state when to use this tool versus alternatives like vision_analyze_image, nor does it provide when-not-to-use guidance. Usage context is implied but not explicit.

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. 7 tool updatesv2.0.0
    • Changedvision_analyze_video5 fields changed
      • removedInput schema / properties / frame_mode
        Removed value: -{
        -  "default": "count",
        -  "description": "抽帧方式:count 均匀取N帧 / keyframe 关键帧 / interval 按秒间隔",
        -  "enum": [
        -    "count",
        -    "keyframe",
        -    "interval"
        -  ],
        -  "type": "string"
        -}
      • removedInput schema / properties / interval
        Removed value: -{
        -  "default": 5,
        -  "description": "frame_mode=interval 时的秒间隔",
        -  "type": "number"
        -}
      • removedInput schema / properties / max_frames
        Removed value: -{
        -  "default": 8,
        -  "description": "抽取并送入模型的最大帧数(默认 8,上限 32)",
        -  "type": "integer"
        -}
      • changedInput schema / properties / prompt / description
        Previous value: -"自由指令/问题,如'这段视频里发生了什么?'"New value: +"自由指令/问题,如'这段视频里发生了什么?按时间顺序描述'"
      • changedInput schema / properties / video / description
        Previous value: -"视频输入,支持:本地绝对路径 / file:// URL / http(s) URL"New value: +"视频输入,支持:http(s) URL(推荐) / 本地绝对路径 / file:// URL / base64(data URI)"
    • Removedvision_compare_images
    • Removedvision_detect_faces
    • Removedvision_extract_audio
    • Removedvision_extract_frames
    • Removedvision_scene_detect
    • Removedvision_video_info
  2. 10 tool updatesv1.0.0
    • First observedvision_analyze_image
    • First observedvision_analyze_video
    • First observedvision_compare_images
    • First observedvision_detect_faces
    • First observedvision_extract_audio
    • First observedvision_extract_frames
    • First observedvision_get_server_status
    • First observedvision_image_metadata
    • First observedvision_scene_detect
    • First observedvision_video_info

TDQS

A4.1/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a distinct function: image analysis, video analysis, server status, and metadata extraction. No overlap in purpose, and descriptions clearly differentiate them.

Naming Consistency4/5

Tools follow a consistent 'vision_<verb>_<target>' pattern for three tools, but 'vision_image_metadata' lacks a verb, though it remains readable.

Tool Count5/5

Four tools is well-scoped for a vision server, covering analysis, status, and metadata without unnecessary proliferation.

Completeness5/5

The tool surface covers core operations: image/video analysis, server status, and image metadata. No obvious gaps for the stated purpose.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables local media processing (video/audio) using FFmpeg and FFprobe, allowing frame extraction, audio conversion, and metadata retrieval through natural language.
    5
    -
  • A
    license
    A
    quality
    B
    maintenance
    Provides vision understanding capabilities such as image analysis, OCR, object localization, and video frame analysis, plus optional image generation and editing, to coding agents via OpenAI-compatible multimodal models. Runs as a local MCP server with HTTP and stdio transports, configurable for clients like Codex, Claude Code, Kimi, and Cursor.
    3
    10 npm
    MIT