Flux Cloudflare MCP logo

Flux Cloudflare MCP

by Hzzy2O

A Model Context Protocol (MCP) server that enables AI assistants to generate images using Black Forest Labs' Flux model via a Cloudflare Worker API. It integrates seamlessly with MCP clients like Cursor and Claude.

View on GitHub

Last updated: N/A

What is Flux Cloudflare MCP?

Flux Cloudflare MCP is an MCP server that provides AI assistants with the ability to generate images using the Flux model through a Cloudflare Worker API. It allows for seamless integration with various MCP clients, enabling image generation directly from AI assistants.

How to use Flux Cloudflare MCP?

To use Flux Cloudflare MCP, you need to deploy a Flux API endpoint using either snakeying/flux-api-worker or aigem/cf-flux-remix. Then, configure your MCP client (e.g., Cursor, Claude) with the necessary environment variables (FLUX_API_TOKEN and FLUX_API_URL) to connect to the MCP server. The server exposes a generate_image tool that can be used to generate images based on text prompts.

Key features of Flux Cloudflare MCP

  • High-Quality Image Generation

  • Seamless AI Integration

  • Customizable Parameters

  • MCP Compatible

  • Local Processing

  • Chat Completions

Use cases of Flux Cloudflare MCP

  • Generating images from AI assistant prompts

  • Integrating image generation into chat applications

  • Creating visual content programmatically

  • Enhancing AI assistant capabilities with image generation

  • Developing MCP-based image generation tools

FAQ from Flux Cloudflare MCP

What is the Model Context Protocol (MCP)?

MCP is a protocol that allows AI assistants to interact with external tools and services.

What is the Flux model?

Flux is a state-of-the-art image generation model developed by Black Forest Labs and available through Cloudflare Workers AI.

How do I get a Flux API token?

You need to deploy a Flux API endpoint using either snakeying/flux-api-worker or aigem/cf-flux-remix, which will require a Cloudflare API token with Workers AI access.

What environment variables are required?

The server requires FLUX_API_TOKEN (your API token for authentication) and FLUX_API_URL (the URL of your deployed Flux API).

What if I encounter an authentication error?

Ensure your FLUX_API_TOKEN is correctly set in the environment and that your token is valid by testing it with the Flux API directly.