Skip to main content
The BFL MCP server lets you generate and edit images using natural language in Claude Code, Claude Desktop, Claude.ai, or any MCP-compatible client. Authentication uses OAuth — you sign in with your BFL account when you first connect. No API key configuration is needed.

Available models

  • FLUX.2 [pro] — Best balance of quality, speed, and cost. Recommended default for all tasks. Supports text-to-image and image-to-image with up to 8 reference images.
  • FLUX.2 [max] — Highest quality output. Use for hero images and final deliverables. Up to 8 reference images.
  • FLUX.2 [flex] — Optimized for text and typography rendering. Up to 8 reference images.
  • FLUX.2 [klein] 9B — Fast and affordable with good quality. Up to 4 reference images.
  • FLUX.2 [klein] 4B — Fastest and cheapest. Great for rapid iterations. Up to 4 reference images.

Setup Instructions

Claude Code

1

Add the MCP server

Run the following command in your terminal:
claude mcp add --transport http bfl-flux https://bfl-mcp-production.up.railway.app
2

Sign in with your BFL account

On first use, a browser window opens for OAuth sign-in. Select which organization to use for billing and approve the connection.

Claude Desktop & Claude.ai

In Claude Desktop or on Claude.ai, go to Settings → Developer Settings → Edit Config to open claude_desktop_config.json, then add the BFL MCP server under Local MCP Servers.
1

Add MCP server configuration

Add the following to your claude_desktop_config.json file:
{
  "mcpServers": {
    "bfl-flux": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://bfl-mcp-production.up.railway.app"
      ]
    }
  }
}
2

Restart and sign in

Quit and restart Claude Desktop (or refresh Claude.ai). On first use, a browser window opens where you sign in with your BFL account and select which organization to use for billing. The FLUX tools then appear automatically in Claude’s tool list.

What You Can Do

Once connected, ask Claude to generate or edit images in natural language. You can specify which model to use, or let Claude pick one based on your prompt.
Describe what you want — portraits, illustrations, product shots, wildlife, and more.

Pricing

Usage is billed to the BFL organization you selected during the OAuth sign-in. See current pricing at bfl.ai/pricing. To switch organizations, disconnect and reconnect the MCP server — you will be prompted to select an organization again.

Troubleshooting

  1. Verify your claude_desktop_config.json is formatted correctly (valid JSON)
  2. Ensure you’ve fully restarted Claude Desktop (quit and reopen)
  3. Check that the OAuth sign-in completed successfully in your browser
  4. Look for error messages in Claude Desktop’s developer console
  • Make sure you have a BFL account at bfl.ai
  • Try disconnecting and reconnecting the MCP server to redo the OAuth flow
  • Check that your account has sufficient credits for generation
  • If the browser sign-in window did not appear, ensure pop-ups are not blocked
  • The default timeout is 300 seconds (5 minutes)
  • Check the BFL API status at status.bfl.ai
  • Try again with a simpler prompt or lower resolution
  • Verify your network connection is stable
  • Use more detailed and specific prompts
  • Try FLUX.2 [flex]
  • Refer to the Prompting Guide for best practices
  • Experiment with different aspect ratios and parameters
To bill a different organization, disconnect the BFL MCP server from your client and reconnect it. The OAuth flow will prompt you to select an organization again.

Best Practices

  • Use specific prompts: Include details about style, lighting, composition, and subject for best results
  • Start with FLUX.2 [pro]: Best balance of quality, speed, and cost for both generation and editing
  • Iterate on results: Refine your prompt if the first generation isn’t perfect
  • Monitor usage: Track API usage through the BFL dashboard