Skip to main content
Vision MCP Server is a Z.AI capability implementation based on the Model Context Protocol (MCP), providing powerful Z.AI GLM-4.5V capabilities for MCP-compatible clients such as Claude Code and Cline, including image analysis, video understanding, and other features.
NPM Package: @z_ai/mcp-server
Prerequisites: Node.js >= v22.0.0

Product Overview

This Local MCP Server is an exclusive server developed by Z.AI for GLM Coding Plan Pro or higher tiers users, empowering your Code Agent with eyes and limitless visual understanding.
Except in Claude Code, pasting an image directly into the client cannot call this MCP Server, as the client will by default transcode the image and call the model interface directly.
The best practice is to place the image in a local directory and invoke the MCP Server by specifying the image name or path in the conversation.
For example: What does demo.png describe?

Features

Image Analysis

Supports intelligent analysis and content understanding of multiple image formats, giving your AI Agent visual capabilities

Video Understanding

Supports visual understanding of both local and remote videos

Easy Integration

One-click installation, quick integration with Claude Code and other MCP-compatible clients

Supported Tools

This server implements the Model Context Protocol and can be used with any MCP-compatible client. Currently provides the following tools:
  • image_analysis - Analyze images and provide detailed descriptions, supports multiple image formats
  • video_analysis - Analyze videos and provide detailed descriptions, supports multiple video formats

Environment Variable Configuration

Detailed Configuration

Environment VariableDescriptionDefault ValueOptional Values
Z_AI_API_KEYZ.AI API KEYRequiredYour API key
Z_AI_MODEService platform selectionRequiredZAI

Platform Configuration

  • Z.AI Platform (Z.AI)
Get API Key: Z.AI Console \
Z_AI_MODE=ZAI
Z_AI_API_KEY=your_zai_api_key

Installation and Usage

Quick Start

1

Get API Key

Visit Z.AI Open Platform to get your API Key
2

Install MCP Server

Prerequisites: Node.js >= v22.0.0
Choose the appropriate installation method based on your client
3

Configure Environment Variables

Set necessary environment variables, including API Key and platform selection

Supported Clients

  • Claude Desktop
  • Cline (VS Code)
  • OpenCode
  • Crush
  • Roo Code, Kilo Code and Other MCP Clients
Method A: One-click Installation CommandBe sure to replace your_api_key with the API Key you obtained.
claude mcp add -s user zai-mcp-server --env Z_AI_API_KEY=your_api_key Z_AI_MODE=ZAI -- npx -y "@z_ai/mcp-server"
If you forgot to replace the API Key, you need to uninstall the old MCP Server before re-executing the installation command:
claude mcp list
claude mcp remove zai-mcp-server
Method B: Manual ConfigurationEdit Claude Desktop’s configuration file .claude.json mcpServers content:
Be sure to replace your_api_key with the API Key you obtained.
{
  "mcpServers": {
    "zai-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@z_ai/mcp-server"
      ],
      "env": {
        "Z_AI_API_KEY": "your_api_key",
        "Z_AI_MODE": "ZAI"
      }
    }
  }
}

Usage Example

Except in Claude Code, pasting an image directly into the client cannot call this MCP Server, as the client will by default transcode the image and call the model interface directly.
The best practice is to place the image in a local directory and invoke the MCP Server by specifying the image name or path in the conversation.
For example: What does demo.png describe?
Through the previous step of installing the Vision MCP server to the client, you can directly use MCP in your Coding client.
For example, in Claude Code, inputting hi describe this xx.png in the conversation, the MCP Server will process the image and return the description result. (The prerequisite is that you have the image in your current directory)
Description code

Troubleshooting

Run the following command in your local terminal to verify if it can be installed locally, to troubleshoot environment, permission, and other issues:
Z_AI_API_KEY=your_api_key npx -y @z_ai/mcp-server
  • If installed successfully, it indicates that the environment is correct, and the issue may be with the client configuration. Please check the client’s MCP configuration.
  • If installation fails, please troubleshoot based on the error message. It is recommended to paste the error message to a large model for analysis and resolution.
Other common issues:
Issue: Mcp server connection closedSolutions:
  1. Check whether Node.js 22 or a newer version is installed locally.
  2. Run node -v and npx -v to verify that the execution environment is available.
  3. Check the environment variable Z_AI_API_KEY is configured correctly.
Issue: Receiving invalid API Key errorSolutions:
  1. Confirm the API Key is correctly copied
  2. Check if the API Key is activated
  3. Confirm the selected platform (Z_AI_MODE) matches the API Key
  4. Check if the API Key has sufficient balance
Issue: MCP server connection timeoutSolutions:
  1. Check network connection
  2. Confirm firewall settings
  3. Increase timeout settings