- Home
- MCP servers
- Hunyuan Image Replicate
Hunyuan Image Replicate
- javascript
1
GitHub Stars
javascript
Language
6 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": {
"pierrunoyt-hunyuan-image-replicate-mcp-server": {
"command": "npx",
"args": [
"-y",
"https://github.com/PierrunoYT/hunyuan-image-replicate-mcp-server.git"
],
"env": {
"REPLICATE_API_TOKEN": "your_replicate_api_token_here"
}
}
}
}This MCP server lets you generate high-quality images from text prompts using the Hunyuan Image model via Replicate. It exposes a single tool, generate_image, and is designed to be run locally or via MCP clients so you can automate image creation with precise controls and reproducibility.
How to use
To generate images, configure an MCP client to connect to the Hunyuan Image Replicate MCP Server. You provide a text prompt and optional parameters such as image size, number of outputs, and guidance settings. You can generate multiple images at once, reproduce results with a seed, and tailor output via inference steps and guidance scale. Use the client’s standard request flow to invoke the server’s generate_image tool and receive structured results with image files.
Practical patterns you can follow:
- Create a serene landscape by supplying a detailed prompt and choose a 1024x1024 size for a balanced result.
- Generate a multi-panel scene by requesting 4 outputs in a single call to get variations from the same prompt.
- Ensure reproducibility by setting a fixed seed when you need identical results across runs.
How to install
Prerequisites you need before starting:
- Replicate API token: Create and retrieve a token from Replicate and keep it secure.
- Node.js: Install Node.js version 18 or higher.
Install and run using the recommended npx approach:
- Use the MCP client configuration that points to the host MCP server via npx, which automatically downloads and runs the latest version.
If you prefer a local installation, clone the server repository, install dependencies, build the project, and run the built index:
- Clone the repository
- Install dependencies
- Build the server
- Use the absolute path to the built index in your MCP client configuration
Additional configuration and notes
Environment variable you must set:
- REPLICATE_API_TOKEN: Your Replicate API token (required for image generation) Note: The server will provide clear error messages if the token is missing or invalid.
Two common ways to run the server are shown below. Use the one that matches your setup. The npx approach works on any machine with Node.js, and the local approach runs the server directly from your filesystem.
Troubleshooting
If you encounter a missing API token error, ensure your token is correctly set in your MCP client configuration. The server will continue running and guide you to the proper setup steps.
If the server does not appear in your MCP client, verify Node.js is installed (v18+), and that the MCP command or path is correct for your environment. Restart your MCP client after changes.
For failed generations, confirm your Replicate account has enough credits and the API token has the required permissions. Try a simple prompt to verify connectivity and parameter validity.
Available tools
generate_image
Generate high-quality images from text prompts using Hunyuan Image via Replicate. Supports options for image size, number of outputs, inference steps, guidance scale, and seed for reproducibility.