Skip to main content
Glama

MCP Vision Server · 视觉识别服务

License: MIT

语言 / Language: 中文 | English

基于 Kimi/Moonshot 视觉 API 的 MCP 服务器,作为 Claude Code 全局插件使用。传入本地图片路径,返回 AI 对图片内容的详细描述、文字提取等。

MCP server for image recognition via Kimi/Moonshot vision API. Works as a global Claude Code plugin.


中文

功能

  • describe_image — 识别图片内容,返回文字描述

  • describe_image_to_file — 识别并保存为 UTF-8 文件(解决 Windows 终端中文乱码)

  • 支持 PNG / JPG / GIF / WebP / BMP,最大 20MB

  • 支持自定义提示词(如"提取所有文字""描述图表结构")

安装

pip install mcp-vision-server

或从源码安装:

git clone https://github.com/coffe-d/MCP-Vision-Server.git
cd mcp-vision-server
pip install -e .

获取 API Key

Moonshot 开放平台 注册并创建 API Key。

注册到 Claude Code

claude mcp add vision-server \
  --env KIMI_API_KEY="sk-你的密钥" \
  -- mcp-vision-server

注册后 Claude Code 即可使用 describe_imagedescribe_image_to_file 两个工具。

配置

环境变量

必填

默认值

说明

KIMI_API_KEY

Moonshot API 密钥

KIMI_BASE_URL

https://api.moonshot.cn/v1

API 地址

KIMI_MODEL

moonshot-v1-8k-vision-preview

模型名称

工具说明

describe_image — 识别图片,返回文本描述。

参数

类型

必填

默认值

说明

image_path

string

图片绝对路径

prompt

string

自定义提示词

max_tokens

int

4096

最大输出长度

describe_image_to_file — 识别图片,结果保存为 UTF-8 文件。适合中文环境避免终端乱码。

参数

类型

必填

默认值

说明

image_path

string

图片绝对路径

output_path

string

自动(同名 .md)

输出文件路径

常见问题

"KIMI_API_KEY environment variable is not set"

未设置环境变量。注册时确保使用了 --env KIMI_API_KEY="sk-..."

终端中文乱码

使用 describe_image_to_file 代替 describe_image,结果直接写入 UTF-8 文件。

"不支持的图片格式"

仅支持 PNG、JPG、JPEG、GIF、WebP、BMP 格式。

许可

MIT — 详见 LICENSE


Related MCP server: glm-vision-mcp-server

English

Features

  • describe_image — Recognize image content and return text description

  • describe_image_to_file — Recognize and save result to a UTF-8 file

  • Supports PNG / JPG / GIF / WebP / BMP up to 20MB

  • Customizable prompt for targeted extraction

Install

pip install mcp-vision-server

Or from source:

git clone https://github.com/coffe-d/MCP-Vision-Server.git
cd mcp-vision-server
pip install -e .

Get an API key

Sign up at Moonshot Platform and create an API key.

Register with Claude Code

claude mcp add vision-server \
  --env KIMI_API_KEY="sk-your-key-here" \
  -- mcp-vision-server

Configuration

Variable

Required

Default

Description

KIMI_API_KEY

Yes

Moonshot API key

KIMI_BASE_URL

No

https://api.moonshot.cn/v1

API base URL

KIMI_MODEL

No

moonshot-v1-8k-vision-preview

Model name

API Reference

describe_image — Return image description as text.

Parameter

Type

Required

Default

Description

image_path

string

Yes

Absolute path to image

prompt

string

No

Custom prompt

max_tokens

int

No

4096

Max output tokens

describe_image_to_file — Save result to a UTF-8 file.

Parameter

Type

Required

Default

Description

image_path

string

Yes

Absolute path to image

output_path

string

No

auto (.md)

Output file path

Troubleshooting

"KIMI_API_KEY environment variable is not set" — Make sure you passed --env KIMI_API_KEY="sk-..." when running claude mcp add.

Garbled Chinese in terminal — Use describe_image_to_file to write directly to UTF-8 file.

License

MIT — see LICENSE.

Available Tools

2 tools
describe_imageA

识别图片内容。传入本地图片的绝对路径,返回AI对图片内容的详细描述。

参数:

  • image_path: 图片的绝对路径,支持 PNG/JPG/JPEG/GIF/WEBP/BMP

  • prompt: 自定义提示词,可指定需要提取的信息类型(如"提取所有文字"、"描述图表结构"等)

  • max_tokens: 最大输出长度,默认4096

ParametersJSON Schema
NameRequiredDescriptionDefault
image_pathYes
promptNo
max_tokensNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description is the sole source of behavioral info. It explains the tool returns AI description but does not disclose potential issues like file access errors, rate limits, or whether the operation is read-only (though reasonable to infer). Basic but adequate.

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?

Very concise: one sentence for purpose followed by a clear parameter list. No redundant information, and every sentence is necessary.

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 simple image description tool with an output schema (not shown), the description covers the main behavior and parameters. It lacks error handling info but is reasonably complete for basic usage.

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?

Despite 0% schema coverage, the description adds value by explaining each parameter: image_path requires absolute path and supported formats, prompt allows custom instruction, max_tokens sets output length with default. This compensates for lack of schema descriptions.

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 recognizes image content and returns a detailed description. It specifies input as local absolute path. However, it does not explicitly differentiate from sibling tool 'describe_image_to_file', though the return mechanism (direct vs file) is implied.

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 guidance on when to use this tool vs alternatives like 'describe_image_to_file', nor any prerequisites or constraints such as file accessibility or supported formats beyond the path.

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

describe_image_to_fileA

识别图片内容并保存到文件(解决 Windows 终端中文乱码问题)。

将AI识别结果直接写入UTF-8编码的文本文件,完全绕过终端编码问题。 如果未指定输出路径,默认在原图同目录下生成同名的 .md 文件。

参数:

  • image_path: 图片的绝对路径

  • output_path: 输出文件的路径(可选,默认与原图同名 .md)

  • prompt: 自定义提示词

  • max_tokens: 最大输出长度

ParametersJSON Schema
NameRequiredDescriptionDefault
image_pathYes
output_pathNo
promptNo
max_tokensNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/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 discloses writing UTF-8 files, default output path, and parameters. However, it does not mention overwrite behavior, error handling, or permission requirements, which are relevant for a file-writing tool.

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 concise, with a clear opening statement and a bullet list for parameters. It fronts the main purpose and encoding benefit. Minor improvement could be more structured, but it is efficient.

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 covers the tool's core function, default behavior, and parameter details. Given an output schema exists (not shown), it does not need to explain return values. It is complete for a file-writing tool with a sibling, though could add error conditions.

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 description coverage is 0%, so the description must compensate. It explains each parameter's purpose (image_path absolute, output_path optional default, prompt custom, max_tokens limit). While not exhaustive (e.g., missing image format constraints), it adds meaning beyond the schema titles.

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 recognizes image content and saves to a file, solving Windows terminal encoding issues. It explicitly distinguishes itself from the sibling tool 'describe_image' by focusing on file output.

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 description explains when to use this tool (to avoid encoding issues, for file output) and implies the alternative (describe_image) for terminal display. However, it does not explicitly state when not to use or provide exclusion criteria.

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

TDQS

A3.6/5.0
Disambiguation4/5

Both tools describe images, but one outputs to terminal and the other saves to file. Their purposes are clearly distinguished, though the core functionality overlaps.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern: 'describe_image' and 'describe_image_to_file'. The naming is predictable and clear.

Tool Count3/5

With only two tools, the server feels thin but covers the basic need of describing images and optionally saving results. It is borderline for the typical 3-15 tool range.

Completeness2/5

The tool surface is minimal and lacks features like batch processing, model selection, or other vision tasks. Agents have no way to adjust output formats beyond file writing, leaving notable gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/coffe-d/MCP-Vision-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server