glm-vision-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@glm-vision-mcpAnalyze this receipt image and extract the total amount and date"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
glm-vision-mcp
自建的 MCP(Model Context Protocol)服务器,底层调用智谱免费视觉模型 GLM-4.6V-Flash(glm-4.6v-flash,OpenAI 兼容接口)。任何支持 MCP 的客户端(Codex、Claude Desktop 等)都可以直接调用图片/视频/文件理解能力。
⚠️ 隐私与安全:调用本服务器时,图片、视频、PDF/Word 等文件的完整内容会发送到智谱云端处理。请勿上传身份证、银行卡、合同、内部办公文件等涉密资料;普通截图、公开文档可正常使用。API Key 只放在本地
.env(已被.gitignore排除),切勿提交到仓库。
详细安装、配置、注册与使用示例见 USAGE.md。
功能
工具 | 用途 |
| 单张或多张图片理解:OCR、复杂表格解析、内容理解、缺陷检测、Image2Prompt 等 |
| 视频内容理解、关键帧描述、时间线生成 |
| PDF / TXT / Word 等文档问答、对比、关键信息抽取 |
| 检查 API Key、模型、接口地址是否就绪 |
支持本地文件路径(自动转成 data URI)、http(s) URL、data URI;支持思考模式开关(enabled / disabled / auto)。
调用前会自动做本地校验:文件大小(图片 20 MB / 视频 500 MB / 文件 50 MB)、图片分辨率(上限 5000 万像素)、加密 PDF、视频时长(30 分钟,需本机有 ffprobe)。超限会在上传前直接给出中文提示,不浪费请求。
Related MCP server: image-mcp
快速开始
到 智谱开放平台 注册并创建 API Key(GLM-4.6V-Flash 免费)。
复制
.env.example为.env,填入你的 Key:ZHIPU_API_KEY=你的_API_KEY安装依赖并启动:
python -m venv .venv .venv\Scripts\python.exe -m pip install -r requirements.txt .venv\Scripts\python.exe server.py也可以直接双击
run.bat(自动建虚拟环境、装依赖、启动)。自检(不需要 Key):
.venv\Scripts\python.exe tests\smoke_test.py正常会输出可用工具列表。
注册到 MCP 客户端
核心就是让客户端用以下命令拉起本服务器:
command: <项目绝对路径>\.venv\Scripts\python.exe
args: ["<项目绝对路径>\\server.py"]Codex CLI(~/.codex/config.toml)
[mcp_servers.glm-vision]
command = "C:\\path\\to\\glm-vision-mcp\\.venv\\Scripts\\python.exe"
args = ["C:\\path\\to\\glm-vision-mcp\\server.py"]
cwd = "C:\\path\\to\\glm-vision-mcp"Codex 桌面版
在「设置 → MCP 服务器」中新增一条,command 填 .venv\Scripts\python.exe 的绝对路径,args 填 server.py 的绝对路径。
Claude Desktop(claude_desktop_config.json)
{
"mcpServers": {
"glm-vision": {
"command": "C:\\path\\to\\glm-vision-mcp\\.venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\glm-vision-mcp\\server.py"]
}
}
}API Key 放在项目 .env 里即可,客户端进程会自动读取,不需要写进客户端配置。
可选配置
通过环境变量或 .env 覆盖:
GLM_BASE_URL=https://open.bigmodel.cn/api/paas/v4
GLM_MODEL=glm-4.6v-flash常用问题
API Key 无效或已过期(401/403):检查
ZHIPU_API_KEY配置,去智谱平台重新生成。余额或免费额度不足(402):到智谱开放平台查看账户额度。
限流/访问量过大(429/1305):免费模型高峰期常见,服务器会自动重试,仍失败请稍后再试。
内容过大(413):本地前置校验已拦截大部分超限文件;仍出现请进一步压缩。
服务端故障(5xx):智谱服务暂时不可用,稍后重试。
“未配置 API Key”:
.env没创建,或变量名不是ZHIPU_API_KEY。不支持同时输入:GLM-4.6V-Flash 不允许图片、视频、文件混用,一次调用只传一种类型。
启动后无输出:stdio 模式下服务器静默等待客户端连接,属正常现象。
测试
rem 单元测试(请求构造、图片编码、响应解析,mock 方式,不需要 Key)
.venv\Scripts\python.exe -m unittest discover -s tests -v
rem MCP 握手测试(启动 stdio 服务器并列出工具,不需要 Key)
.venv\Scripts\python.exe tests\smoke_test.py
rem 真实调用测试(需要 .env 里有 Key,会自动重试限流)
.venv\Scripts\python.exe tests\live_test.py <你的图片路径>This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceMulti-model vision understanding MCP server that provides unified image analysis for AI assistants without native vision, supporting models like GLM-4.6V, DeepSeek-OCR, Qwen3-VL-Flash, and more.Last updated11,29693MIT
- AlicenseAqualityBmaintenanceMCP server for image recognition, supporting multiple vision backends (Anthropic, Zhipu, Ollama) to describe, answer questions, and analyze images.Last updated3471MIT
- Flicense-qualityCmaintenanceMCP server that adds Qwen3-VL vision capabilities to Claude Code or any MCP client, enabling OCR, UI/screenshot recognition, and chart understanding. It provides tools for analyzing single or batch images via DashScope's OpenAI-compatible API, with caching and fast mode.Last updated
- Flicense-qualityCmaintenanceMCP server that gives text-only models vision capabilities via free GLM vision models, supporting image description, OCR, chart/document analysis, and grounding with automatic model fallback.Last updated1
Related MCP Connectors
MCP server for GLM chat completions using Zhipu AI models via AceDataCloud
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP server for Google Veo AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/qy564/glm-vision-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server