glm-vision-mcp
glm-vision MCP Server
任意の AI Agent に「画像を見る」機能を追加します。内部では智谱の完全無料の視覚推論モデルを呼び出し、MCP プロトコル経由で標準ツールとして公開します。MCP をサポートする任意のクライアントでそのまま利用でき、API 費用はゼロです。
💡 無料保証:すべて智谱の特典ゾーンの無料モデル(GLM-4.6V-Flash / GLM-4.1V-Thinking-Flash / GLM-4V-Flash)を使用し、有料モデルは一切含まれません。長期間使用しても費用は発生しません。
公開されるツール
analyze_image(image_input, question, thinking)
パラメータ | 型 | デフォルト値 | 説明 |
| string | 必須 | 画像の http/https URL またはローカルファイルの絶対パス |
| string |
| モデルに質問する内容 |
| bool |
| 思考モードを有効にし、複雑な図表/GUI/推論シーンでより正確 |
戻り値:モデルが出力したテキスト分析結果。
特徴
ローカル画像は自動的に生の base64 として読み込まれて転送されるため、画像ホストもパブリック URL も不要
1枚あたり5MBの上限チェック(智谱の制限)
429 レートリミット発生時は自動でバックオフしながら3回リトライ(1.5秒 / 3秒 / 4.5秒)
それでも失敗した場合は自動でフォールバック:
glm-4.6v-flash→glm-4.1v-thinking-flash→glm-4v-flash(すべて無料)。フォールバック時は回答の冒頭で使用されたモデルを明示します
Related MCP server: Kimi Vision MCP Server
デプロイ3ステップ
1. 依存関係のインストール
pip install -r requirements.txt⚠️ 重要な落とし穴:
mcpは 1.x をインストールする必要があります。最新のmcp 2.0.0では組み込みのmcp.server.fastmcpモジュールが削除され、インストールすると ImportError になります。そのためpip install "mcp<2"です。⚠️ もう一つの落とし穴:
zaiやzhipuaiをインストールしないでください —— PyPI 上ではこれらは無関係なプレースホルダーパッケージです(zaiは Zalando のもので、zhipuaiはインポート名が変わっています)。本サーバーは OpenAI 互換クライアント で智谱の API に直接接続します(base_url=https://open.bigmodel.cn/api/paas/v4)、必要なのはopenaiパッケージだけです。
2. API Key の設定
bigmodel.cn で携帯番号登録 → コンソールの「API Keys」から新規作成、無料です。
Key の指定方法は2つあり、環境変数の優先度が高くなります:
方法A(推奨):環境変数
ZHIPU_API_KEY=あなたのキーを設定方法B:
zhipu_key.txt.exampleをzhipu_key.txtにリネームし、中に Key を記入 (スクリプトは同じディレクトリのこのファイルを自動で読み込みます)
3. クライアントへの設定
クライアントの MCP 設定ファイルに追記します(パスはご自身のものに置き換えてください):
{
"mcpServers": {
"glm-vision": {
"command": "python",
"args": ["/绝对路径/到/glm_vision_mcp.py"],
"env": {
"ZHIPU_API_KEY": "你的key"
}
}
}
}各クライアントの設定ファイルの場所:
クライアント | 設定ファイルのパス |
WorkBuddy |
|
Claude Desktop (Win) |
|
Claude Desktop (Mac) |
|
Cursor | プロジェクト内の |
Cline / Roo (VSCode) | プラグイン設定内の |
Continue |
|
commandには Python インタープリターの絶対パス(例:D:/python/python.exe)を書くことをお勧めします。クライアント起動時に PATH からpythonが見つからなくなるのを防げます。
設定後は必ずクライアントを再起動してください —— MCP プロセスはクライアント起動時に一度だけ spawn されるため、設定やコードを変更してもホットリロードされません。
成功したかどうかの確認
クライアントを再起動したら、Agent に画像を1枚分析させてみてください:
D:\test.pngの画像に何が写っているか見てください
Agent がツールが見つからないと言う場合は、以下を確認してください:設定ファイルの JSON 構文、スクリプトの絶対パスが正しいか、クライアントを再起動したか、クライアントでこのサーバーを手動で「信頼/有効化」する必要があるか(WorkBuddy、Cursor にはこの手順があります)。
よくあるエラーと対処
症状 | 原因 |
| 無料モデルのレートリミットで、Key が無効なわけではありません。サーバーが自動でリトライ+フォールバック済みです。 |
| Key が本当に無効か、読み込まれていません |
| mcp 2.x をインストールしてしまったので、 |
| 環境変数と |
| 1枚が5MBを超えているので、圧縮してください |
ファイル一覧
ファイル | 必須 | 説明 |
| ✅ | サーバー本体で、唯一のコアファイル |
| 推奨 | 依存関係リスト |
| 任意 | 環境変数を使わない場合にのみ必要、内容は1行の Key |
| 任意 | このドキュメント |
This server cannot be installed
Maintenance
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
- AlicenseAqualityAmaintenanceA portable image-understanding MCP server that lets agents analyze local images, URLs, or base64 images via an OpenAI-compatible vision model.176865MIT
- AlicenseNot gradedqualityCmaintenanceEnables analysis of local images through Kimi (Moonshot AI) vision models via the MCP protocol, supporting features like OCR and long context understanding.65MIT
- AlicenseBqualityCmaintenanceMCP server that provides image analysis, OCR text extraction, and image description using the GLM-4V Flash model from Zhipu AI.36MIT
- AlicenseAqualityCmaintenanceProvides image recognition capabilities to MCP clients by integrating with OpenAI-compatible vision models, supporting local images, URLs, multi-image comparison, and model listing.4MIT
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.
Generate images and video on Google Flow (Veo, Nano Banana) from any MCP client
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/Chu-Nian/glm-vision-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server