Zhipu Image

Provides MCP access to Zhipu AI CogView image generation with model and size options for local clients.
  • python

1

GitHub Stars

python

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "nanguangchou-zhipu_image_mcp": {
      "command": "python",
      "args": [
        "/path/to/zhipu-image-mcp/jimeng_image_server.py"
      ],
      "env": {
        "ZHIPU_API_KEY": "your_api_key_here"
      }
    }
  }
}

You can run a local MCP server that exposes Zhipu AI CogView image generation through a simple, standardized interface. This lets you connect clients like Claude Desktop to generate high‑quality images using configurable models and sizes with built‑in validation and error handling.

How to use

You will run the MCP server locally and connect a client that supports MCP. Start the server, then configure your client to reach the local process. You can generate images by calling the provided tools, choose from supported models, adjust image size and quality, and handle results directly in your client workflow.

How to install

Prerequisites you need before installing: Python 3.8 or newer.

  1. Clone or download the MCP server package.
git clone <project-address>
cd zhipu_image_mcp
  1. Install dependencies from the requirements file.
pip install -r requirements.txt
  1. Set up your API key for Zhipu AI. You can export it as an environment variable or pass it when calling tools.
export ZHIPU_API_KEY="your_api_key_here"
  1. Start the MCP server. This runs the Python script that listens for MCP connections over stdio.
python zhipu_mcp_server.py

Additional configuration and usage notes

Configure your client to locate the MCP server using the stdio path you start the server from. If you are using Claude Desktop or a similar client, provide the command and arguments to launch the server as shown below.

Troubleshooting and tips

If you encounter API key or network issues, verify that ZHIPU_API_KEY is set correctly in the environment or provided to the tool calls. Ensure Python 3.8+ is installed and that required dependencies are installed. Check for parameter validation errors and review any API error messages for guidance.

Connecting Claude Desktop

Add a configuration entry that points Claude Desktop to the local MCP server. Use the provided path to your server script and include your API key in the environment settings.

Using the available tools

You can access the following image generation tools from the MCP server to perform typical tasks: generate_image, get_supported_models, get_supported_sizes, generate_image_with_url_download, test_api_connection. Each tool accepts a set of parameters described in their sections and returns results that you can consume in your client.

Available tools

generate_image

Generates an image from a textual prompt using a specified model, quality, and size. You can select the model (default cogview-4-250304), set quality to hd or standard, and choose image size.

get_supported_models

Returns all supported image generation models and their descriptions so you can pick the right model for your use case.

get_supported_sizes

Returns recommended image sizes with descriptions of their typical use cases to help you choose the right dimensions.

generate_image_with_url_download

Generates an image like generate_image but also returns a downloadable data payload (base64) for easy local storage or embedding.

test_api_connection

Tests the connection to Zhipu API to verify that your API key and network access are working before attempting image generation.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Zhipu Image MCP Server - nanguangchou/zhipu_image_mcp | VeilStrat