Skip to main content
Glama

Jimeng MCP Server

Model Context Protocol (MCP) server for Jimeng AI - providing powerful image and video generation capabilities through Claude and other LLM applications

License Python MCP Version


Project Introduction

Jimeng MCP Server is a professional AI image and video generation MCP server, built on the open-source project jimeng-free-api-all, providing powerful AI creation capabilities through MCP clients such as Claude Desktop, Cherry Studio, and Claude Code.

Core Dependencies

This project is built on the open-source project jimeng-free-api-all, which provides the reverse-engineered API implementation for Jimeng AI, supporting various AI generation capabilities such as text-to-image and image-to-video.

Core Features

  • Text-to-Image: Generate high-quality images from text descriptions using Jimeng 4.5

  • Image Composition: Intelligently blend multiple images based on text instructions

  • Text-to-Video: Generate short video clips from text descriptions using Jimeng Video 3.0

  • Image-to-Video: Add animation effects to static images

  • MCP Protocol Support: Standard MCP protocol, supporting multiple communication modes

  • Multi-Client Compatibility: Supports Claude Desktop, Cherry Studio, Claude Code, etc.


Related MCP server: Jimeng MCP Server

Changelog

v0.2.0 (2024-12-14) - Parameter Format Synchronization Update

  • Sync with upstream v4.7 update: Adapted to the latest API parameter format of jimeng-free-api-all

  • Image API parameter changes:

    • Removed width and height parameters

    • Added ratio parameter: supports 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9

    • Added resolution parameter: supports 1k, 2k (default), 4k

  • Video API parameter changes:

    • Removed width and height parameters

    • Added ratio parameter: supports 1:1 (default), 4:3, 3:4, 16:9, 9:16

    • resolution parameter: supports 480p, 720p (default), 1080p

    • Added duration parameter: video length, supports 5 or 10 seconds

  • Default model upgrade: Default image model upgraded from jimeng-4.0 to jimeng-4.5


Feature List

Feature Name

Description

Tech Stack

Status

Text-to-Image

Create high-quality images from detailed text prompts

jimeng-4.5

✅ Stable

Image Composition

Compose 1-10 images, style transfer and blending

jimeng-4.5

✅ Stable

Text-to-Video

Create animated videos from text

jimeng-video-3.0

✅ Stable

Image-to-Video

Bring static images to life

jimeng-video-3.0

✅ Stable

stdio Mode

Standard input/output communication

MCP Protocol

✅ Stable

SSE Mode

Server-Sent Events event stream

Starlette

✅ Stable

HTTP Mode

RESTful API interface

FastAPI

✅ Stable

Multi-Image Generation

jimeng-4.x supports intelligent multi-image generation

Jimeng AI

✅ Stable


Technical Architecture

Technology

Version

Purpose

Python

3.10+

Primary development language

MCP

1.0+

Model Context Protocol

httpx

0.27+

HTTP client

Starlette

0.37+

ASGI framework

Uvicorn

0.27+

ASGI server

sse-starlette

1.6+

SSE support

Architecture Description

┌─────────────────────────────────────────────────┐
│            Claude Desktop / MCP Client           │
└────────────────────┬────────────────────────────┘
                     │ MCP Protocol
                     ↓
┌─────────────────────────────────────────────────┐
│          jimengmcp (本 MCP 服务器)               │
│    ┌──────────────────────────────────────┐     │
│    │  MCP Protocol Handler (stdio/sse)   │     │
│    └───────────────┬──────────────────────┘     │
│                    ↓                             │
│    ┌──────────────────────────────────────┐     │
│    │     Tool Implementations             │     │
│    │  - text_to_image                     │     │
│    │  - image_composition                 │     │
│    │  - text_to_video                     │     │
│    │  - image_to_video                    │     │
│    └───────────────┬──────────────────────┘     │
└────────────────────┼────────────────────────────┘
                     │ HTTP API Calls
                     ↓
┌─────────────────────────────────────────────────┐
│       jimeng-free-api-all 逆向接口服务            │
│  (https://github.com/wwwzhouhui/                │
│         jimeng-free-api-all)                    │
│    ┌──────────────────────────────────────┐     │
│    │    OpenAI Compatible API Endpoints   │     │
│    │  - POST /v1/images/generations       │     │
│    │  - POST /v1/images/compositions      │     │
│    │  - POST /v1/videos/generations       │     │
│    └───────────────┬──────────────────────┘     │
└────────────────────┼────────────────────────────┘
                     │ 逆向调用
                     ↓
┌─────────────────────────────────────────────────┐
│           即梦 AI 官方服务                        │
│       (https://jimeng.duckcloud.fun)            │
└─────────────────────────────────────────────────┘

Installation Instructions

Environment Requirements

Step 1: Deploy the jimeng-free-api-all Service

This MCP server requires the underlying API service to be deployed first.

Method 1: Docker Deployment (Recommended)

# 拉取镜像
docker pull wwwzhouhui569/jimeng-free-api-all:latest

# 运行容器
docker run -it -d --init --name jimeng-free-api-all \
  -p 8001:8000 \
  -e TZ=Asia/Shanghai \
  wwwzhouhui569/jimeng-free-api-all:latest

Method 2: Source Code Deployment

# 克隆 jimeng-free-api-all 项目
git clone https://github.com/wwwzhouhui/jimeng-free-api-all.git
cd jimeng-free-api-all

# 使用 Docker Compose 启动
docker-compose up -d

Obtaining the SessionID:

  1. Visit the Jimeng official website and log in

  2. Press F12 to open the browser developer tools

  3. Go to Application > Cookies

  4. Find and copy the value of sessionid

  5. Use it in subsequent configuration: Authorization: Bearer [your_sessionid]

Verifying the Deployment:

# 测试 API 是否正常运行
curl http://localhost:8001/v1/models

Step 2: Install the jimengmcp MCP Server

# 克隆此仓库
git clone https://github.com/wwwzhouhui/jimeng-mcp-server
cd jimeng-mcp-server

Basic Installation (stdio Mode)

pip install -e .

SSE Mode

pip install -e ".[sse]"

HTTP Mode

pip install -e ".[http]"

Full Installation (All Modes)

pip install -e ".[all]"

Configure Environment Variables

cp .env.example .env

Edit the .env file:

# 必需: 您的即梦 SessionID (从浏览器 Cookie 中获取)
JIMENG_API_KEY=your_sessionid_here

# 必需: jimeng-free-api-all 服务地址
JIMENG_API_URL=http://localhost:8001

# 可选: 默认使用的模型
JIMENG_MODEL=jimeng-4.5

Usage Instructions

Claude Code Configuration

Configure using cc-switch:

Configuration Step 1

Configuration Step 2

After configuration is complete, click Save.

Configuration Step 3

Use mcp list to view:

Configuration Step 4

Using in Claude Code

Text-to-Image Example:

请使用jimeng-mcp-server 生成一张图像:小猪和小狗踢球

Text-to-Image

Image Composition Example:

请使用jimeng-mcp-server 将这两张图像合成在一起:
- 图像1: https://p3-dreamina-sign.byteimg.com/tos-cn-i-tb4s082cfz/bab623359bd9410da0c1f07897b16fec~tplv-tb4s082cfz-resize:0:0.image
- 图像2: https://p3-dreamina-sign.byteimg.com/tos-cn-i-tb4s082cfz/6acf16d07c47413898aea2bdd1ad339e~tplv-tb4s082cfz-resize:0:0.image
创建一个艺术风格的无缝融合

Image Composition

Text-to-Video Example:

请使用jimeng-mcp-server 创建一个视频:小马过河

Running Modes

This MCP server supports three communication modes:

1. stdio Mode (Default)

stdio mode communicates via standard input/output, suitable for integration with MCP clients such as Claude Desktop.

python -m jimeng_mcp.server
# 或
python -m jimeng_mcp.server --mode stdio

2. SSE Mode (Server-Sent Events)

SSE mode provides HTTP-based event streaming, suitable for web application integration.

python -m jimeng_mcp.server --mode sse --host 0.0.0.0 --port 8000

Connection endpoint: http://localhost:8000/sse

SSE Mode

3. HTTP REST API Mode

HTTP mode provides a standard RESTful API interface, suitable for calls from various programming languages.

python -m jimeng_mcp.server --mode http --host 0.0.0.0 --port 8000

Available Endpoints:

  • GET /health - Health check

  • GET /tools - Get the list of available tools

  • POST /text-to-image - Text-to-image generation

  • POST /image-composition - Image composition

  • POST /text-to-video - Text-to-video generation

  • POST /image-to-video - Image-to-video generation


Configuration Instructions

Environment Variable Configuration

Variable Name

Description

Default Value

JIMENG_API_KEY

Jimeng API SessionID (required)

None

JIMENG_API_URL

jimeng-free-api-all service address

https://jimeng1.duckcloud.fun

JIMENG_MODEL

Default model for image generation

jimeng-4.5

Cherry Studio Configuration

Add this server to the Cherry Studio configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "jimeng": {
      "command": "python",
      "args": ["-m", "jimeng_mcp.server"],
      "env": {
        "JIMENG_API_KEY": "您的API密钥"
      }
    }
  }
}

SSE configuration:

SSE Configuration 1

SSE Configuration 2


API Tool Parameters

text_to_image (Text-to-Image)

Parameter

Type

Required

Default Value

Description

prompt

string

Yes

-

Detailed description of the image, jimeng-4.x supports multi-image generation

negative_prompt

string

No

""

Content to avoid in the image

ratio

string

No

1:1

Aspect ratio (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9)

resolution

string

No

2k

Resolution (1k, 2k, 4k)

sample_strength

float

No

0.5

Fine-tuning level (0.0-1.0)

model

string

No

jimeng-4.5

Model to use

image_composition (Image Composition)

Parameter

Type

Required

Default Value

Description

prompt

string

Yes

-

How to compose the images

images

array

Yes

-

Array of image URLs (1-10 images)

ratio

string

No

1:1

Output aspect ratio

resolution

string

No

2k

Output resolution (1k, 2k, 4k)

sample_strength

float

No

0.5

Fine-tuning level (0.0-1.0)

model

string

No

jimeng-4.5

Model to use

text_to_video (Text-to-Video)

Parameter

Type

Required

Default Value

Description

prompt

string

Yes

-

Video description

ratio

string

No

1:1

Aspect ratio (1:1, 4:3, 3:4, 16:9, 9:16)

resolution

string

No

720p

Resolution (480p, 720p, 1080p)

duration

integer

No

5

Video length (5 or 10 seconds)

model

string

No

jimeng-video-3.0

Model to use

image_to_video (Image-to-Video)

Parameter

Type

Required

Default Value

Description

prompt

string

Yes

-

Animation description

file_paths

array

Yes

-

Array of first-frame/last-frame image URLs

ratio

string

No

1:1

Aspect ratio (1:1, 4:3, 3:4, 16:9, 9:16)

resolution

string

No

720p

Resolution (480p, 720p, 1080p)

duration

integer

No

5

Video length (5 or 10 seconds)

model

string

No

jimeng-video-3.0

Model to use


Development Guide

Running Tests

pytest

Running the Server Directly

python -m jimeng_mcp.server

Frequently Asked Questions

A: Make sure JIMENG_API_KEY in the .env file is set correctly, and verify that your API key is valid and has sufficient quota.

A: Check your network connection, verify that the API base URL is accessible, and check for firewall restrictions.

A: Video generation may take a few minutes. The server automatically sets a longer timeout (10 minutes) for video operations. Consider generating shorter videos or using lower resolutions.

A: Make sure Docker is installed and running, check whether port 8001 is occupied, and inspect the container logs to troubleshoot the issue.

A: Make sure the .env file is configured correctly, use the mcp list command to check the MCP server status, and confirm that the environment variables are loaded properly.


Technical Community Group

Welcome to join the technical community group to share your usage experience and feedback:

Technical Community Group


Author Contact

WeChat QR Code


Donations

If this project has been helpful to you, feel free to buy me a coffee ☕

WeChat Pay

WeChat Pay


Star History

If you like this project, feel free to give it a Star ⭐

Star History Chart


License

MIT License


Disclaimer

This project is for learning and research purposes only, built on the jimeng-free-api-all project.

Important Notes:

  • ⚠️ This project uses reverse-engineered APIs, for personal learning and research only

  • ⚠️ Commercial use or providing this as a service to others is prohibited

  • ⚠️ Reverse-engineered APIs may become invalid with official updates, please follow project updates

  • ⚠️ Please comply with the official terms of service and usage restrictions of Jimeng AI

  • ⚠️ It is recommended to use the official API for production deployment


This project depends on and thanks the following open-source projects:

Core Dependencies

  • jimeng-free-api-all - Jimeng AI reverse-engineered API implementation

    • Provides complete image and video generation APIs

    • OpenAI-compatible interface design

    • Supports one-click Docker deployment

    • Open-source license: GPL-3.0

Technical Frameworks

Special Thanks

  • wwwzhouhui - Author of the jimeng-free-api-all project, providing a stable and reliable Jimeng AI reverse-engineered API

  • Anthropic - Developed the powerful Claude AI and MCP protocol

  • Jimeng AI Team - Providing excellent image and video generation capabilities

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

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

  • A
    license
    C
    quality
    D
    maintenance
    A Model Context Protocol server that enables generating AI images using Volcengine's Jimeng service, supporting features like prompt enhancement, super-resolution, and watermarking.
    1
    45
    1
    MIT
  • A
    license
    D
    quality
    D
    maintenance
    Integrates Jimeng AI image and video generation services through MCP protocol, enabling users to generate high-quality images and videos from text prompts with support for image mixing, reference images, and multiple AI models.
    3
    45
    53
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server providing multi-modal generation tools based on Volcengine's Jimeng AI, supporting high-quality 4K image creation, intelligent image editing, and video generation. It enables users to perform complex visual tasks directly within clients like Cursor and Claude Desktop.
    12
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for Wan AI video generation

  • MCP server for Hailuo (MiniMax) AI video generation

  • MCP server for Google Veo AI video generation

View all MCP Connectors

Latest Blog Posts

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/wwwzhouhui/jimeng-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server