Skip to main content
Glama

GLM-Vision MCP & Skill Server (Node.js 版)

这是一个基于 Node.js 实现的 Model Context Protocol (MCP) 与 AI Custom Skill 双用视觉识别服务器。专为让不支持图像输入的主模型(如 DeepSeek 等)通过调用本工具结合智谱 GLM-4V,来读取和识别本地图片(截图/照片/UI等)中的信息。

🌟 为什么将它作为 Skill 部署?

为了实现**“截图后对 AI 说‘看我截图’,AI 自动抓取剪贴板并进行识别”的极致自动化体验,本项目被设计为直接作为系统 Skill 部署**。这样做可以让您同时获得:

  1. AI 助手的截图识别技能 (Skill):自动抓取剪贴板、存图、触发识别;

  2. 标准的 MCP 视觉工具 (MCP Tool):在 Cursor 或 Claude Desktop 聊天中读取任意本地路径的图片。


🤖 AI 助手自动安装说明 (For AI Agents)

如果您是正在帮助用户安装此项目的 AI Agent,请按照以下步骤自动完成安装与配置:

  1. 定位并创建技能目录

    • 在用户主目录下定位并创建文件夹:~/.agents/skills/glm-vision-js (Windows 上为 C:\Users\<用户名>\.agents\skills\glm-vision-js)。

  2. 下载与复制代码

    • 将本项目仓库中的所有文件(包括 index.js, package.json, SKILL.md 等)全部克隆/拷贝到上述的 ~/.agents/skills/glm-vision-js 文件夹中。

  3. 安装依赖

    • 进入到该技能目录下,运行终端命令 npm install

  4. 配置 MCP

    • 读取用户本机的 MCP 配置文件(如 Cursor 的 MCP 设置,或 Windows 上的 %APPDATA%\Claude\claude_desktop_config.json),将本项目的工具配置写入其中,指向技能目录下的 index.js(具体配置格式见下文)。


Related MCP server: Kimi Vision MCP Server

1. 手动安装与准备工作

系统要求

  • Node.js: 需要 v18.0.0 或更高版本。

配置 API Key (ZHIPU_API_KEY) 【安全推荐】

为了防止您的 API Key 泄露(例如随项目代码误提交至 Git 仓库),强烈不建议在任何项目目录中编写 .env 文件。我们仅推荐以下两种安全的配置方式:

  • 方式一(推荐):配置为系统环境变量 ZHIPU_API_KEY

  • 方式二(推荐):在 MCP 客户端配置(如 Cursor/Claude 的配置 JSON)的 env 字段中进行注入。


2. 客户端接入 JSON 模板

请在您的 MCP 客户端配置中加入以下内容。注意:请将命令参数中的 <您的用户名> 替换为实际的 Windows 用户名:

{
  "mcpServers": {
    "glm-vision": {
      "command": "node",
      "args": [
        "C:/Users/<您的用户名>/.agents/skills/glm-vision-js/index.js"
      ],
      "env": {
        "ZHIPU_API_KEY": "在此输入您的智谱API_KEY(若已配全局系统环境变量,此env对象可省略)"
      }
    }
  }
}

3. 使用方法与示例

服务启动后,您的 AI 助手或客户端即可自动调用本工具:

  • 通过 Skill(自动识别截图): 直接截个图,对支持 Skill 的 Agent 说:“帮我识别一下刚截的图”,AI 将自动执行抓图与识别,整个过程耗时仅需几秒。

  • 通过 MCP(描述本地文件): 在聊天中输入:“帮我提取 D:/workspace/chart.png 图表里的所有数据并整理为 Markdown 表格”

  • 多图识别(最多 5 张): 命令行直接执行:

    node index.js D:/workspace/a.png D:/workspace/b.png --prompt "对比这两张图的差异"

    或通过 MCP 调用 describe_imageimage_path 传入路径数组,如 ["D:/workspace/a.png", "D:/workspace/b.png"]

Available Tools

1 tool
describe_imageA

使用智谱 GLM-4V 识别并描述本地图片内容,或提取图片中的文字。

ParametersJSON Schema
NameRequiredDescriptionDefault
promptNo识别指令,可指示模型重点观察什么或者提取图中的文字。
image_pathYes本地图片的绝对路径或相对路径。

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 reveals that the tool relies on GLM-4V (an external model), implying a call to an AI service. It does not mention potential limitations, privacy implications of sending local images, or side effects. This is adequate but not highly transparent.

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, concise sentence that fully captures the tool's purpose without extraneous detail. It is well-structured and 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?

The tool is simple, has no output schema, and no sibling tools. The description covers the core functionality and parameters. While the return format is not explicitly stated, it is implied by 'describe' and 'extract text'. This is complete for the complexity level.

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 schema already covers both parameters with 100% coverage. The description adds minimal semantic value, only hinting that the prompt can direct attention or request text extraction. No additional behavior beyond schema is described.

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: using GLM-4V to recognize/describe local image content or extract text. The verb is specific and the resource (local image) is identified. No sibling tools exist, so no differentiation is needed.

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 implies the appropriate context: local images, with options for description or text extraction. It does not mention alternatives (none exist) or exclusions, but the scope is clear enough for an agent to decide when to invoke it.

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. 1 tool updatev1.0.0
    • First observeddescribe_image

TDQS

A3.9/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of selecting between overlapping tools. The tool's purpose is clearly described as image description and OCR, so no ambiguity exists.

Naming Consistency5/5

The single tool name 'describe_image' follows a clear verb_noun pattern, which is internally consistent. There are no other tools to create inconsistencies.

Tool Count2/5

The server offers only one tool, which feels too thin for a vision-focused server. Even though the domain is narrow, typical vision servers provide separate operations for description, OCR, and question answering, making a single catch-all tool insufficient.

Completeness3/5

The tool covers image description and text extraction, but lacks common vision capabilities such as answering questions about an image or analyzing multiple images. The combined single tool creates a limitation where specific tasks cannot be addressed independently.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables analysis of local images through Kimi (Moonshot AI) vision models via the MCP protocol, supporting features like OCR and long context understanding.
    17 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides image understanding and OCR via GLM-4.6V-Flash, supporting URL, base64, and local file inputs. Enables AI assistants to analyze images and extract text from screenshots, documents, and more.
    29 npm
    MIT