Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.bfl.ml/llms.txt

Use this file to discover all available pages before exploring further.

Bring FLUX into the tools you already use. Generate options in parallel, edit attached images through prompts, and branch into variations from any result you like — the full FLUX.2 toolkit, inside Claude, Cursor, Codex, Windsurf, and any MCP-compatible client. No API code, no keys pasted into the conversation.

Connect FLUX

Most modern MCP clients can connect to https://mcp.bfl.ai directly and handle the OAuth flow on their own — pick your client from the tabs below. For stdio-only or OAuth-incompatible clients (for example Hermes), use the mcp-remote fallback tab. It runs locally, handles the browser OAuth flow, refreshes tokens for you, and exposes FLUX as a normal stdio server.

Pricing

You pay BFL directly. The organization selected during OAuth sign-in is billed for generated images. No shared quotas, no middleman. To change organizations, disconnect the connector and reconnect it. Current rates are listed at bfl.ai/pricing.

Tool reference

The MCP server exposes a small set of tools. Your client decides which to call based on your prompt — you do not need to invoke them by name. The reference is here for developers who want to know exactly what is available.
ToolPurposeNotes
generate_imageGenerate one or up to 8 images in parallel. Covers text-to-image, edits, multi-reference composition, style transfer, inpainting-style edits, and outpainting through prompts.Each entry in requests carries its own prompt, model, dimensions, seed, and up to 8 input_image slots. Outpainting uses width/height larger than the source.
generate_variationsProduce N more images “in the same direction” as a previous generation, identified by request_id.Reuses the original prompt, model, dimensions, and any input image slots. Defaults to 4 variations, max 8.
get_historyList recent generations as a thumbnail grid with per-tile actions (Variations, Edit, copy, download).Keyset pagination on created_at via cursor; supports before / after date filters and a status filter.
get_creditsReturn the calling user’s remaining BFL credit balance.Useful when a generation fails for billing reasons.
Available models on generate_image: flux2_pro_preview (default), flux2_max (highest quality), flux2_klein_9b_preview (faster, up to 4 input images), flux2_flex (best for typography), flux2_klein_4b. The full catalog and per-model reference-image limits are also exposed as the bfl://models MCP resource.

Troubleshooting

  • In Claude Desktop or Claude.ai, open Settings → Connectors and confirm the FLUX connector shows as Connected.
  • If the connection failed silently, remove the connector and add it again. Make sure pop-ups are not blocked so the OAuth window can open.
  • In Claude Code, run claude mcp list to confirm the server is registered.
  • In Codex, run codex mcp list to confirm the FLUX server is registered, then start a new Codex session.
If the FLUX tools are not responding, or you just installed or updated the connector, refreshing the connection can help.
  • Claude.ai / Claude Desktop: open Settings → Connectors, toggle the FLUX connector off and on, or click Reconnect. Restarting Claude Desktop is another way to pick up a fresh tool list.
  • Claude Code: run /mcp to view server status and reauthenticate. To rebuild the registration entirely, run claude mcp remove FLUX followed by claude mcp add --transport http FLUX https://mcp.bfl.ai.
  • Codex: run codex mcp login FLUX to reauthenticate. To rebuild the registration entirely, run codex mcp remove FLUX followed by codex mcp add FLUX --url https://mcp.bfl.ai — the OAuth browser flow runs automatically on add.
  • mcp-remote clients: clearing the cached OAuth tokens with rm -rf ~/.mcp-auth and restarting the client triggers a fresh browser sign-in.
  • To confirm the tools are live, ask your MCP client something simple like “check my BFL credits”.
  • Make sure you have a BFL account at bfl.ai.
  • Disconnect and reconnect the MCP server to redo the OAuth flow.
  • Check that the selected organization has sufficient credits.
  • Ask your MCP client to check your BFL credits if you want to verify the current balance.
Large sets of images, FLUX.2 [max], or complex edits can take longer than smaller generations. In Claude and other visual MCP clients, the image view keeps updating automatically.
Your MCP client needs permission to upload attached images to BFL. If your client blocks outbound HTTPS from its sandbox, allow the *.bfl.ai domain or use a public image URL instead.
  • Use detailed prompts. Describe subject, style, composition, and lighting.
  • For typography or readable text, ask for FLUX.2 [flex].
  • For hero shots or final assets, ask for FLUX.2 [max].
  • For edits, say what should stay unchanged as well as what should change.
Disconnect the FLUX connector in your client and reconnect it. The OAuth flow will prompt you to select an organization again.

Prompt Tips

  • Front-load the subject. Put the most important object, person, or scene first.
  • Describe lighting. “Soft golden hour light” or “overcast diffused studio light” gives the model useful direction.
  • Use hex colors. #FF6B6B (coral pink) is more precise than “pinkish red”.
  • Quote rendered text. Use exact quoted strings for typography, labels, posters, and signs.
  • Avoid negative prompts. FLUX responds to what you describe, not a list of what to avoid.
  • Iterate from results. Use Variations for alternatives or Edit to keep refining a generated image.

Agent Skills

MCP and Agent Skills solve different problems:
MCPAgent Skills
What it doesGenerates, edits, varies, and browses images directly in chatTeaches your coding agent how to write FLUX API code
Best forCreative work inside Claude or another MCP clientBuilding applications that call the FLUX API
Install onClaude Desktop, Claude.ai, Claude Code, and MCP-compatible clientsClaude Code, Cursor, Windsurf, and other skill-compatible tools

Installation

/plugin marketplace add black-forest-labs/skills
/plugin install flux-best-practices@bfl-skills

What Your Agent Learns

flux-best-practices teaches prompting patterns: prompt structure, lighting vocabulary, hex colors, typography, model selection, and why FLUX does not use negative prompts. bfl-api teaches production API patterns: async generation, rate-limit handling, URL expiration, regional endpoints, webhook verification, and error handling.

Updating

npx skills update black-forest-labs/skills

Resources