Overview
What is Image-Gen-Server?
Image-Gen-Server is an image generation service based on Jimeng AI (Jianying), designed for integration with Cursor IDE. It receives text descriptions from Cursor, generates images, and provides download and save functionality.
How to use Image-Gen-Server?
Install dependencies (Python 3.10+, Node.js v20, uv), clone the repository, configure JIMENG_API_TOKEN and IMG_SAVA_FOLDER in server.py, then add a new MCP server in Cursor settings with the command uv run --with fastmcp fastmcp run <path>/server.py. In Cursor agent mode, ask it to learn the image tool and then request image generation with your prompt and save location.
Key features of Image-Gen-Server
- Cursor IDE integration for image generation
- Text-to-image generation from prompts
- Automatic saving of generated images
- Custom save path support
- Generates four images per request for more choices
Use cases of Image-Gen-Server
- Generate product logos based on project requirements
- Create website banners and homepage images
- Produce custom illustrations for development projects
- Generate multiple image options from a single description
FAQ from Image-Gen-Server
How do I get the Jimeng API token?
Visit jimeng.jianying.com, log in, open developer tools (F12), find the sessionid in Application > Cookies, and set it as the JIMENG_API_TOKEN in server.py.
Why does the tool show "No tools found" after configuration?
The server failed to start. Common causes include an incorrect server.py path (containing Chinese characters or wrong slashes), missing dependencies, or using the wrong terminal environment (try cmd, PowerShell, or WSL on Windows).
How can I debug or view call logs?
Change run to dev in the command to start in development mode, or run fastmcp dev <path>/server.py in a terminal then open the provided debug URL (http://localhost:5173/) in a browser for MCP Inspector debugging.
What parameters does the generate_image tool support?
It accepts prompt (text description), file_name (output filename), save_folder (optional custom path), sample_strength (0-1, default 0.5), width and height (default 1024 each).
What are the runtime dependencies?
Python 3.10+, npm, Node.js (v20 verified), the uv package manager, and the packages listed in requirements.txt. FastMCP is used to implement the MCP server.