generate_imageLABSCO SUMMARY
Model choice lives in config, not in the call.
The README is explicit that MODEL is set in the environment and not passed per request, which means the advanced arguments — steps, seed, guidance — only do anything when the server was started on flux.1-schnell. Decide which model you want before you wire it in; switching means editing the config and restarting, not asking differently.
What it is
A Node server that exposes Baidu's iRAG image generation as a single tool. You describe the image, it calls Baidu, downloads the result and hands back base64 plus, if you want, a file on disk. Which model is used is a configuration decision rather than a per-call argument, so the client cannot switch models mid-conversation.
What you get
generate_imagetakes apromptand returns the image- Optional
refer_imageto condition on a reference image URL ngenerates 1 to 4 images per call;sizeaccepts 512x512, 768x768, 1024x768 or 1024x1024- Two models chosen through the
MODELsetting:irag-1.0, Baidu's own, andflux.1-schnell, which additionally acceptssteps,seedandguidance RESOURCE_MODE=localsaves files to disk and returns base64 and the path;RESOURCE_MODE=urlreturns only the URL and base64- Automatic retries and logging, with the retry count set by
MAX_RETRIESand the request timeout byAPI_TIMEOUT
Requirements
A Baidu API key from the Baidu Cloud console with Qianfan ModelBuilder selected, shaped bce-v3/ALTAK-**/**, passed as BAIDU_API_KEY. Node.js 18.0.0 or newer. Clone, npm install, npm run build, then point your client at node with dist/index.js. Package irag-mcp-server, version 1.0.0. BASE_PATH sets where images land in local mode; leave it empty and they go to a folder on your desktop.
Setup effort
Build from source — git clone https://github.com/kuai0901/irag-mcp-server.git
USE CASES
Generating an illustration inside a conversation
Describe it and get the image back without opening a separate tool.
Producing several options at once
Ask for up to four images in one call and pick from them.
Keeping generated images on disk
Run in local mode with a chosen base path so every result is saved as well as returned.
Reproducing a specific result
On the flux model, fix the seed and step count so the same prompt renders the same way.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
- Node.js >= 18.0.0
- BAIDU_API_KEY in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/kuai0901/irag-mcp-server.git
cd irag-mcp-server
npm install
npm run buildMCP Clients
Claude Desktop
{
"mcpServers": {
"irag-image-generator": {
"command": "node",
"args": [
"<YOUR_PATH_TO_IRAG_MCP_SERVER>/dist/index.js"
],
"env": {
"BAIDU_API_KEY": "bce-v3/<YOUR_ACCESS_KEY>/<YOUR_SECRET_KEY>"
}
}
}
}