Image Generation

v1.0.0Data Science & MLstable

A MCP server that integrates with Cursor IDE to generate images based on text descriptions using JiMeng AI, allowing users to create and save custom images directly within their development environment.

image-gen-servermcpai-integration
Share:
219
Stars
0
Downloads
0
Weekly
0/5

What is Image Generation?

Image Generation is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server that integrates with cursor ide to generate images based on text descriptions using jimeng ai, allowing users to create and save custom images directly within their development environment....

A MCP server that integrates with Cursor IDE to generate images based on text descriptions using JiMeng AI, allowing users to create and save custom images directly within their development environment.

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A MCP server that integrates with Cursor IDE to generate ima

Use Cases

Generate custom images within Cursor IDE using JiMeng AI.
fengin

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx image-gen-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Image Generation

Image-Gen-Server is an MCP server that integrates with the JiMeng AI image generation platform (jimeng.jianying.com) to let developers generate custom images directly within Cursor IDE or other MCP-compatible clients using natural language prompts. Each generation request produces four images simultaneously at configurable dimensions and precision levels, and the images are saved to a specified local folder. It is built in Python using FastMCP and is particularly suited for developers who need to create assets, mockups, or illustrations without leaving their coding environment.

Prerequisites

  • Python 3.10+ installed
  • Node.js v20 installed (other versions may not work with the npx/uv bridge)
  • uv package manager installed (`pip install uv`)
  • A JiMeng AI session token obtained from jimeng.jianying.com cookies (requires a JiMeng account)
  • Cursor IDE or another MCP-compatible client
1

Clone the repository

Clone the image-gen-server repository to your local machine.

git clone https://github.com/fengin/image-gen-server.git
cd image-gen-server
2

Install Python dependencies

Install the required Python packages.

pip install -r requirements.txt
pip install uv
3

Obtain your JiMeng session token

Log in to jimeng.jianying.com in your browser, open DevTools (F12), go to Application > Cookies, find the cookie named `sessionid`, and copy its value.

4

Configure server.py

Open server.py and set the two required variables: your JiMeng session ID and the local folder where generated images will be saved.

# In server.py:
JIMENG_API_TOKEN = "your_sessionid_cookie_value"
IMG_SAVA_FOLDER = "/absolute/path/to/your/images/folder"
5

Configure your MCP client

Add the server to your MCP client configuration. Use the absolute path to server.py.

{
  "mcpServers": {
    "image-gen-server": {
      "command": "uv",
      "args": ["run", "--with", "fastmcp", "fastmcp", "run", "/absolute/path/to/image-gen-server/server.py"]
    }
  }
}
6

Test image generation

Ask your AI client to generate an image. The server will call JiMeng AI and save four images to the configured folder.

Image Generation Examples

Client configuration

Cursor IDE MCP configuration for the image-gen-server using uv and FastMCP.

{
  "mcpServers": {
    "image-gen-server": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "fastmcp",
        "fastmcp",
        "run",
        "/Users/yourname/image-gen-server/server.py"
      ]
    }
  }
}

Prompts to try

Example prompts to use with the image generation MCP server in Cursor or Claude.

- "Generate a product logo for a fintech app called 'NovaPay' and save it in the images folder."
- "Create a hero banner illustration showing a developer working at night, 1920x1080."
- "Generate four variations of an app icon for a meditation app using a calm color palette."

Troubleshooting Image Generation

Image generation fails with an authentication error

Your JiMeng sessionid cookie may have expired. Log in to jimeng.jianying.com again, copy the fresh sessionid value from your browser's DevTools (Application > Cookies), and update JIMENG_API_TOKEN in server.py.

The uv command is not found when the MCP client starts the server

Install uv with `pip install uv` and ensure it is on your system PATH. Use the full absolute path to the uv binary in your MCP config command if the PATH is not available to the MCP client process.

Node.js version incompatibility errors

The project has been tested specifically with Node.js v20. Install Node.js v20 via nvm (`nvm install 20 && nvm use 20`) and ensure your MCP client uses the correct version.

Frequently Asked Questions about Image Generation

What is Image Generation?

Image Generation is a Model Context Protocol (MCP) server that mcp server that integrates with cursor ide to generate images based on text descriptions using jimeng ai, allowing users to create and save custom images directly within their development environment. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Image Generation?

Follow the installation instructions on the Image Generation GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Image Generation?

Image Generation works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Image Generation free to use?

Yes, Image Generation is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "image-gen-server": { "command": "npx", "args": ["-y", "image-gen-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Image Generation?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides