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.
An MCP server that generates images through Replicate's FLUX model, uploads each result to your Cloudflare R2 bucket, and returns the public URL.
- 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
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.
One command plus a key — npx -y @smithery/cli install @andylee20014/mcp-replicate-flux --client claude, then supply credentials
