generate-imageLABSCO SUMMARY
The picture is already hosted where you want it by the time you see it.
Generation and storage are one step: the model output goes straight into your R2 bucket and the response is the link, so there is no download-then-upload in the middle. Set CORS on the bucket for public access first, or the link will not open.
What it is
An MCP server that generates images through Replicate's FLUX model, uploads each result to your Cloudflare R2 bucket, and returns the public URL.
What you get
- One tool, generate-image, taking prompt and filename
- Generation on Replicate's black-forest-labs/flux-schnell model
- The finished image stored in your own Cloudflare R2 bucket
- A response carrying the accessible image URL, under the domain you configured
Requirements
Node.js v16 or higher, a Replicate API token in REPLICATE_API_TOKEN, and R2 credentials: STORAGE_ENDPOINT, STORAGE_ACCESS_KEY, STORAGE_SECRET_KEY, STORAGE_BUCKET and STORAGE_DOMAIN. Clone, npm install, then point your client at index.js.
Setup effort
One command plus a key — npx -y @smithery/cli install @andylee20014/mcp-replicate-flux --client claude, then supply credentials
USE CASES
Generating an image you can link to immediately
Give it a prompt and a filename; the reply is a URL that already works.
Keeping generated assets in your own storage
Everything lands in your R2 bucket rather than on someone else's CDN.
Naming files as you create them
Pass the filename on the call so the assets are organized from the start.
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 16 or later
- REPLICATE_API_TOKEN in your environment
- STORAGE_ACCESS_KEY in your environment
- STORAGE_SECRET_KEY in your environment
INSTALLATION
Connect your client
Server setup
Setup
git clone https://github.com/andylee20014/mcp-replicate-flux.git
cd mcp-replicate-flux
npm installnpx
Claude Desktop
npx -y @smithery/cli install @andylee20014/mcp-replicate-flux --client claudeMCP Clients
Cursor
{
"mcpServers": {
"replicate-flux": {
"command": "node",
"args": [
"C:\\Users\\<YOUR_USERNAME>\\<YOUR_PATH_TO_MCP_REPLICATE_FLUX>\\index.js"
],
"env": {
"REPLICATE_API_TOKEN": "<YOUR_REPLICATE_API_TOKEN>",
"STORAGE_ENDPOINT": "<YOUR_STORAGE_ENDPOINT>",
"STORAGE_ACCESS_KEY": "<YOUR_STORAGE_ACCESS_KEY>",
"STORAGE_SECRET_KEY": "<YOUR_STORAGE_SECRET_KEY>",
"STORAGE_BUCKET": "<YOUR_STORAGE_BUCKET>",
"STORAGE_DOMAIN": "<YOUR_STORAGE_DOMAIN>"
}
}
}
}The path in args is the full path to index.js in the mcp-replicate-flux folder the git clone step creates (the project's example is a Windows path; on macOS or Linux it is the equivalent absolute path). <YOUR_STORAGE_ENDPOINT>, <YOUR_STORAGE_ACCESS_KEY>, <YOUR_STORAGE_SECRET_KEY>, <YOUR_STORAGE_BUCKET> and <YOUR_STORAGE_DOMAIN> are your Cloudflare R2 endpoint, access key, secret key, bucket name and public domain.