1.1w 查看 · 2026-07-07 更新
Jimeng AI Full Capability Generation MCP Service
Jimeng AI Full Capability Generation MCP Service is an AI image and video generation tool based on the Model Context Protocol (MCP), integrating the powerful generation capabilities of ByteDance's Jimeng AI.
github: https://github.com/ARSENE2630/jimenggen-mcp
✨ Core Features
🎨 Image Generation
- Text-to-Image 3.1: Generate high-quality images based on text descriptions.
- Image-to-Image 3.0: Generate new images based on reference images.
- Image Generation 4.0: The latest version of the image generation model (planned).
🎬 Video Generation
- Video Generation 3.0 Pro: Generate high-quality videos based on text descriptions.
👗 Image Dressing
- Image Dressing V2: Intelligent clothing replacement function.
🚀 Quick Start
Environment Requirements
- Node.js 18+
- TypeScript 5.7.2+
Install Dependencies
bash npm install
Configure Environment Variables
Create a .env file and configure the ByteDance API keys:
env
JIMENG_ACCESS_KEY=your_access_key_here
JIMENG_SECRET_KEY=your_secret_key_here
Build the Project
bash npm run build
Run Tests
bash npm test
Quick Start (quick start)
Client Configuration (IDE)
Add the following configuration to the MCP configuration files in MCP clients such as Claude, Trae, and cursor:
json { "mcpServers": { "jimenggen": { "command": "npx", "args": [ "jimenggen-mcp@1.0.5" ], "env": { "JIMENG_ACCESS_KEY": "your_access_key_here", "JIMENG_SECRET_KEY": "your_secret_key_here==" } } } }
Local Run Configuration
json { "mcpServers": { "jimenggen": { "command": "node", "args": [ "/path/to/jimenggen-mcp/build/index.js" ], "env": { "JIMENG_ACCESS_KEY": "your_access_key_here", "JIMENG_SECRET_KEY": "your_secret_key_here" } } } }
📋 Available Tools
Text-to-Image
Generate images based on text prompts, supporting custom aspect ratios and multiple artistic styles.
Parameters:
prompt: Image generation promptratio: Image aspect ratio, supports customizationstyle: Image style (realistic, guochao, cyberpunk, etc.)
Image-to-Image
Generate new images based on reference images, supporting style transfer and content editing.
Text-to-Video
Generate high-quality video content based on text descriptions.
Image Dressing
Intelligent clothing replacement function, supporting multiple clothing types and retention options.
🔧 Technical Architecture
Core Technology Stack
- Runtime: Node.js + TypeScript
- Protocol: Model Context Protocol (MCP)
- HTTP Client: node-fetch
- Image Processing: sharp
- Data Validation: zod
Project Structure
plaintext jimenggen-mcp/ ├── src/ │ ├── index.ts # Main entry file │ └── test.ts # Test file ├── build/ # Compilation output directory ├── package.json # Project configuration ├── tsconfig.json # TypeScript configuration └── README.md # Project documentation
🔑 API Configuration
ByteDance Jimeng AI
This project uses the ByteDance Jimeng AI service, which requires the following parameters:
- Endpoint:
https://visual.volcengineapi.com - Region:
cn-north-1 - Service:
cv
Supported Models
jimeng_t2i_v31- Text-to-Image 3.1jimeng_i2i_v30- Image-to-Image 3.0jimeng_ti2v_v30_pro- Video Generation 3.0 Prodressing_diffusionV2- Image Dressing V2jimeng_t2i_v40- Image Generation 4.0
🎯 Usage Examples
Text-to-Image Example
javascript // Generate a cyberpunk-style future city image await textToImage({ prompt: "Future city night scene, neon lights, cyberpunk style", ratio: { width: 1024, height: 768 }, style: "cyberpunk" });
Image-to-Image Example
javascript // Generate a new style image based on an existing image await imageToImage({ prompt: "Convert this photo to oil painting style", imageUrl: "https://example.com/original.jpg", style: "oil painting" });## 🔍 Debugging Information
When the service starts, it will display the results of the environment variable check:
🔍 MCP Server Startup - Environment Variable Check: 📋 Current Environment Variable Status: JIMENG_ACCESS_KEY: ✅ Set (Length:20) JIMENG_SECRET_KEY: ✅ Set (Length:40)
📝 Development Guide
Adding New Tools
- Register new MCP tools in
src/index.ts - Implement the corresponding API call functions
- Update type definitions and parameter validation
- Add test cases
Extending Model Support
- Add new model mappings in
MODEL_MAPPING - Configure API parameters in
API_CONFIG_MAPPING - Implement the corresponding invocation logic
🐛 Troubleshooting
Common Issues
- API Call Failure: Check if the environment variable configuration is correct
- Image Generation Timeout: Adjust the polling interval and maximum number of attempts
- Insufficient Memory: Optimize image processing logic, use streaming processing
Debug Mode
Set the DEBUG=true environment variable to enable detailed log output.
🤝 Contribution Guidelines
Feel free to submit Issues and Pull Requests to improve the project!
Development Workflow
- Fork the project
- Create a feature branch
- Commit changes
- Push to the branch
- Create a Pull Request
📄 License
This project is open-sourced under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Thanks to Volcano Engine for providing the powerful Jimeng AI service
- Thanks to the Model Context Protocol community
- Thanks to all contributors and users
📞 Contact
If you have any questions or suggestions, please contact us through the following methods:
- Submit a GitHub Issue
- Send an email to the project maintainers
Version History
- v1.0.0: Initial version, supporting basic text-to-image, image-to-image, video generation, and image transformation features
Appreciation
If this project has been helpful to you, feel free to show your support with a donation!
Note: Use of this service requires compliance with the terms of service and usage guidelines of Volcano Engine's Jimeng AI.
服务配置
[{'mcpServers': {'jimenggen': {'args': ['jimenggen-mcp@1.0.5'], 'command': 'npx', 'env': {'JIMENG_ACCESS_KEY': 'JIMENG_ACCESS_KEY', 'JIMENG_SECRET_KEY': 'JIMENG_SECRET_KEY'}}}}]
来源
- 来源:ModelScope
- 链接:https://github.com/ARSENE2630/jimenggen-mcp