
GLM-4.5V MCP Server
Enables multimodal AI capabilities through GLM-4.5V API for image processing, visual querying with OCR/QA/detection modes, and file content extraction from various formats including PDFs, documents, and images.
README
GLM-4.5V MCP Server
GLM-4.5V 多模态能力的 MCP 服务器,提供图像处理、视觉查询和文件处理功能。
功能
- read_image: 读取本地/URL图片并返回 dataURL 与尺寸信息
- vision_query: 调用 GLM-4.5V 对图片进行 OCR/问答/检测
- process_file: 使用 GLM-4.5V 处理文件(上传并提取内容)
安装
npm install
配置
复制环境变量文件:
cp .env.example .env
编辑 .env
文件,填入你的 GLM API Key:
GLM_API_KEY=your_api_key_here
GLM_BASE_URL=https://open.bigmodel.cn/api/paas/v4/chat/completions
构建
npm run build
运行
npm start
或使用启动脚本:
./start-mcp.sh
开发模式
npm run dev
测试功能
创建测试文件并验证功能:
node scripts/test-file-processing.js
工具说明
read_image
读取图片并返回 base64 编码的 dataURL。
参数:
path
(必需): 图片路径或URLmaxSide
(可选): 最大边长,用于缩放
vision_query
使用 GLM-4.5V 分析图片。
参数:
path
(必需): 图片路径或URLprompt
(必需): 查询提示词mode
(可选): 查询模式 ("describe", "ocr", "qa", "detect")returnJson
(可选): 是否返回JSON格式结果
process_file
使用 GLM-4.5V 处理文件,支持多种格式的文件上传和内容提取。
支持的文件格式:
- 文档:PDF、DOCX、DOC、XLS、XLSX、PPT、PPTX、CSV、TXT
- 图片:PNG、JPG、JPEG
文件大小限制:
- 图片文件:最大 5MB
- 其他文件:最大 50MB
参数:
filePath
(必需): 本地文件路径extractPrompt
(可选): 内容提取提示词,用于指导如何提取文件内容
返回结果:
{
"ok": true,
"fileId": "file-xxx",
"content": "提取的文件内容...",
"fileType": "PDF文档",
"filename": "document.pdf",
"metadata": {
"uploadTime": 1234567890,
"fileSize": 1024000,
"processingTime": 5000
}
}
使用示例
处理 PDF 文档
# 通过 MCP 调用
{
"tool": "process_file",
"arguments": {
"filePath": "./documents/report.pdf",
"extractPrompt": "请提取文档中的主要内容和关键信息"
}
}
处理 Excel 表格
{
"tool": "process_file",
"arguments": {
"filePath": "./data/sales.xlsx",
"extractPrompt": "请分析表格数据并总结销售趋势"
}
}
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.