The friction in every image-generation integration is the same: get an API key, store it somewhere safe, wire up an async polling loop, handle the expiry of the result URL. Half a day before your first image.
Black Forest Labs now ships an official MCP server that removes all of it. You add one URL to your MCP client, sign in with OAuth, and the model can generate and edit images as a tool call. No API key to manage at all.
Sourcing note: the server URL, setup steps, per-client config keys and capability list below come from Black Forest Labs' own MCP documentation. Client-side steps reflect what BFL publishes for each client. Last verified July 30, 2026.
What this guide solves
The pain point: agent-based image workflows are usually glued together with an API key in an env var, which means key rotation, per-developer setup, and a proxy so it never reaches the client. For "let the assistant make an image during a task," that is a lot of scaffolding.
The differentiator: this is the official route, including the two things that decide whether it fits your setup — the OAuth-per-user billing model, and the config-key difference that makes Windsurf setups fail silently.
What it does
BFL describes the server as a way to generate, edit, vary, browse, and reuse FLUX.2 images from any MCP-compatible client, with OAuth sign-in, all FLUX.2 models, and no API keys to manage.
Two of those verbs are easy to miss and are the interesting part:
- Browse — the client can look through images you have already generated.
- Reuse — previous outputs can feed back in as references, which is what makes multi-turn work coherent instead of starting over each time.
Combined with FLUX.2's multi-reference editing, that means an assistant can hold a visual thread across a conversation rather than producing a pile of unrelated images.
Setup
The server URL is the same everywhere: https://mcp.bfl.ai
Claude (desktop or claude.ai)
- Settings → Connectors
- Add custom connector — Name:
FLUX, URL:https://mcp.bfl.ai - Click Connect, sign in with your BFL account, and choose the organization to bill
Claude Code
claude mcp add --transport http FLUX https://mcp.bfl.aiA browser opens on first use for sign-in and organization selection.
Cursor
BFL provides a one-click deeplink that opens Cursor with the server pre-filled; you approve Add server and the entry is saved to your global ~/.cursor/mcp.json.
Windsurf
Edit ~/.codeium/windsurf/mcp_config.json (or Cascade → Plugins → Manage plugins → View raw config), add the FLUX server, then reload plugins.
The gotcha BFL calls out explicitly: Windsurf uses serverUrl, not url. Copy a config from another client and it will quietly fail to connect. OAuth is still handled automatically.
The billing model is the real design decision
At sign-in you pick which organization gets billed. That is worth thinking about before you roll this out:
- Each user signs in as themselves. No shared key sitting in a repo, no rotation drill when someone leaves.
- Usage lands on the organization they select, so a developer who belongs to several orgs can bill the wrong one by accident.
- There is no key to leak, which for many teams is the whole argument.
If you need hard spend attribution per project, BFL's organizations-and-projects structure is where that gets enforced — the MCP server inherits it rather than replacing it.
Prefer a place to actually work on images? Flux 3 AI is a browser workspace with generation, editing, reference workflows and upscaling — no client config, no OAuth dance. Open the image generator.
MCP vs the REST API
| MCP server | REST API | |
|---|---|---|
| Auth | OAuth sign-in, per user | API key you store |
| Setup | One URL in a client config | Key handling, async polling loop |
| Best for | Assistants and agents making images during a task | Products that generate images for end users |
| Result handling | Client-side, handled for you | You poll, download inside 10 minutes, re-serve |
| Models | FLUX.2 family | Full endpoint list including legacy tiers |
The dividing line is simple: MCP is for you and your tools; the REST API is for your users. If images are a feature of your product, the API is still the right layer — MCP does not change the 24-active-task ceiling or the ten-minute signed URL that shape a production pipeline.
FAQ
What is the FLUX MCP server URL?
https://mcp.bfl.ai
Do I need an API key? No. Authentication is OAuth at sign-in.
Which clients are supported? BFL documents Claude, Claude Code, Cursor and Windsurf, and describes the server as working with any MCP-compatible client.
Which models can it use? The FLUX.2 family.
Who pays for the images? The organization you select when signing in.
Why is my Windsurf config not connecting?
Windsurf expects serverUrl rather than url — that one key breaks configs copied from other clients.
Can it edit images, not just generate them? Yes — generate, edit, vary, browse and reuse are all documented capabilities.
Bottom line
If your image work happens inside an assistant — drafting a mockup mid-conversation, iterating on a concept while you write — the MCP server is a strictly better path than wiring the REST API. One URL, OAuth, no key management.
If images are a feature your users touch, stay on the API. And if what you want is simply a place to make images without configuring anything, use a browser workspace instead.
Sources
- FLUX MCP server (BFL documentation) — server URL, capability list, per-client setup, Windsurf
serverUrlcaveat, OAuth billing - BFL documentation overview — MCP positioned alongside API and playground routes
- Image generation quick start (BFL docs) — the REST behaviour MCP abstracts away
- FLUX API integration guide (BFL docs) — production integration guidance
- Organizations & Projects (BFL docs) — the billing structure MCP sign-in inherits
- Credits & Billing (BFL docs) — how usage is charged
- BFL API pricing — per-megapixel rates behind any MCP generation
- FLUX.2 model page — the model family exposed through MCP
- Official FLUX.2 prompting guide — prompt rules that still apply in an MCP call
- FLUX.2: Frontier Visual Intelligence (BFL, November 25, 2025) — multi-reference editing that makes reuse worthwhile
Scope note: setup details as of July 30, 2026. Flux 3 AI is an independent creator workspace, not affiliated with Black Forest Labs.


