# Flux Mcp

> Official FLUX MCP server. Generate, edit, vary, and browse FLUX images from any MCP client.

- **Type:** MCP server
- **Install:** `agentstack add mcp-black-forest-labs-flux-mcp`
- **Verified:** Pending review
- **Seller:** [black-forest-labs](https://agentstack.voostack.com/s/black-forest-labs)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [black-forest-labs](https://github.com/black-forest-labs)
- **Source:** https://github.com/black-forest-labs/flux-mcp
- **Website:** https://docs.bfl.ai

## Install

```sh
agentstack add mcp-black-forest-labs-flux-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

FLUX MCP

  Bring FLUX into the tools you already use.
  Generate, edit, vary, and browse FLUX images from any MCP-compatible client.

  
  
  

  Install ·
  Showcase ·
  Tools ·
  Examples ·
  Troubleshooting

  

---

The **FLUX MCP server** exposes the full FLUX.2 toolkit — text-to-image, image editing, multi-reference composition, virtual try-on, variations, and history — to any client that speaks the [Model Context Protocol](https://modelcontextprotocol.io). Generate options in parallel, edit attached images through prompts, try garments on a photo, and branch into variations from any result you like. No API code, no keys pasted into the conversation.

- **Hosted, remote, OAuth-only.** Connect to `https://mcp.bfl.ai`. Sign in with your BFL account, pick the org to bill — done.
- **Every FLUX.2 model.** Pro, Max, Klein (4B & 9B), Flex. Your client picks the right one for the task.
- **Built for chat.** Up to 8 images in parallel per prompt. Edit attached images. Browse and reuse history.
- **You pay BFL directly.** No middleman, no shared quotas. Current rates: [bfl.ai/pricing](https://bfl.ai/pricing).

---

## Install

Claude — Desktop &amp; claude.ai

1. Open [Settings → Connectors](https://claude.ai/settings/connectors).
2. Click **Add custom connector**.
3. Name it `FLUX`, URL `https://mcp.bfl.ai`.
4. Click **Connect**, sign in, choose the BFL organization to bill.

Claude Code

```bash
claude mcp add --transport http FLUX https://mcp.bfl.ai
```

A browser opens on first use for OAuth. Tokens refresh automatically.

Cursor

**One-click:** [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=FLUX&config=eyJ1cmwiOiJodHRwczovL21jcC5iZmwuYWkifQ==) — opens Cursor with the FLUX server pre-filled.

**Manual** — add to `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "FLUX": {
      "url": "https://mcp.bfl.ai"
    }
  }
}
```

Codex

```bash
codex mcp add flux --url https://mcp.bfl.ai
codex mcp login flux
```

Or append to `~/.codex/config.toml`:

```toml
[mcp_servers.flux]
url = "https://mcp.bfl.ai"
```

Windsurf

Edit `~/.codeium/windsurf/mcp_config.json` (note Windsurf uses `serverUrl`, not `url`):

```json
{
  "mcpServers": {
    "FLUX": {
      "serverUrl": "https://mcp.bfl.ai"
    }
  }
}
```

Reload plugins from the Cascade panel. The first FLUX call opens a browser for sign-in.

Other MCP clients (stdio bridge via mcp-remote)

For clients that support stdio MCP but don't handle the OAuth flow themselves — for example **Hermes** (Nous Research) and similar tools that only accept static bearer tokens:

```json
{
  "mcpServers": {
    "FLUX": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.bfl.ai"]
    }
  }
}
```

`mcp-remote` opens a browser for OAuth, caches tokens to `~/.mcp-auth/`, and refreshes them automatically.

---

## Showcase

### Generate a batch of options in one prompt

> *"Generate 4 editorial portrait variants — varied lighting, palette, and mood."*

  
  
  
  

### Or just one — when a single hero shot is what you need

> *"A top-down aerial photograph of shallow desert salt pools, intense direct sunlight."*

  

### Edit any image directly in chat

> *"Add a camel on the sand."*

  
    Before
    After
  
  
    
    
  

### Browse and reuse your full generation history

> *"Show me my recent FLUX generations."*

Every generation is saved. Tap any tile to edit, vary, or download. Variations branch off any past image in one click.

---

## Tools

Your client picks which tool to call based on your prompt — you don't need to invoke them by name.

| Tool | What it does |
| --- | --- |
| `generate_image` | Generate **1–8 images in parallel**. Covers text-to-image, edits, multi-reference composition, style transfer, inpainting-style edits, and outpainting — all through prompts. |
| `vto` | **Virtual try-on** — dress a person (or pet) in a garment, hat, sunglasses, shoes, bag, or any wearable from a reference image. Preserves face, hair, and pose; only the worn item changes. |
| `generate_variations` | Produce N more images **in the same direction** as a previous generation (identified by `request_id`). Defaults to 4, max 8. |
| `get_history` | List recent generations as a **thumbnail grid** with per-tile Variations / Edit / copy / download actions. Keyset pagination, date filters. |
| `get_credits` | Return your remaining BFL credit balance. |

### Models

Available on `generate_image`:

| Model | Use it for |
| --- | --- |
| `flux2_pro_preview` *(default)* | Everyday work — best balance of quality and speed |
| `flux2_max` | Hero shots, final assets — highest quality |
| `flux2_klein_9b_preview` | Faster iterations, up to 4 input images |
| `flux2_klein_4b` | Fastest option |
| `flux2_flex` | Typography and readable text |

The full catalog, per-model reference-image limits, and the FLUX Tools (`vto`) are also exposed as the `bfl://models` MCP resource.

---

## Example prompts

Try these in your client once FLUX is connected:

```
Generate 4 editorial portrait variants — varied lighting, palette, and mood.
Use FLUX.2 [pro] at 1440×1792.
```

```
A top-down aerial photograph of shallow desert salt pools at golden hour,
intense direct sunlight, #FF6B6B and #F5E6D3 mineral deposits, FLUX.2 [max].
```

```
[attach an image]
Add a camel on the sand. Preserve the rest of the composition exactly.
```

```
Generate a movie poster with the title "MIRAGE" in 1970s grindhouse type,
high-contrast cyan and orange. Use FLUX.2 [flex].
```

```
[attach a selfie]
Try this on me — a red Nike Tech Fleece hoodie, oversized fit.
```

```
Show me my recent FLUX generations.
```

```
[click Variations on a past image]
4 more like this one, vary the lighting.
```

---

## 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.

For the full FLUX prompting playbook, see [black-forest-labs/skills](https://github.com/black-forest-labs/skills).

---

## Troubleshooting

Tools don't appear after connecting

- **Claude Desktop / claude.ai:** Settings → Connectors, confirm FLUX shows as **Connected**. If it failed silently, remove and re-add — make sure pop-ups aren't blocked so the OAuth window can open.
- **Claude Code:** `claude mcp list` should show the server.
- **Codex:** `codex mcp list` should show `flux`. Start a new Codex session after adding.
- Quick smoke test: ask your client *"check my BFL credits"*.

Refreshing tools or reconnecting the server

- **Claude.ai / Desktop:** Settings → Connectors → toggle FLUX off and on, or click **Reconnect**.
- **Claude Code:** `/mcp` shows status and reauth. Full rebuild:
  ```bash
  claude mcp remove FLUX
  claude mcp add --transport http FLUX https://mcp.bfl.ai
  ```
- **Codex:** `codex mcp login flux`. Full rebuild:
  ```bash
  codex mcp remove flux
  codex mcp add flux --url https://mcp.bfl.ai
  ```
- **mcp-remote clients:** `rm -rf ~/.mcp-auth` and restart the client to force a fresh OAuth.

Authentication or billing errors

- Make sure you have a BFL account at [bfl.ai](https://bfl.ai).
- Disconnect and reconnect the connector to redo OAuth.
- Check the selected organization has sufficient credits.
- Ask your client to check your BFL credits to verify the balance.

A generation keeps loading

Large batches, FLUX.2 [max], or complex edits take longer than smaller generations. Visual MCP clients update the image view automatically.

Attached image editing fails

Your MCP client needs permission to upload attached images to BFL. If your client blocks outbound HTTPS from its sandbox, allow `*.bfl.ai` or pass a public image URL instead.

Switching the billed organization

Disconnect the FLUX connector in your client and reconnect it. The OAuth flow will prompt you to select an organization again.

---

## Agent Skills (companion repo)

MCP and Agent Skills solve different problems:

|  | MCP (this repo) | [Agent Skills](https://github.com/black-forest-labs/skills) |
| --- | --- | --- |
| **What it does** | Generates, edits, varies, and browses images directly in chat | Teaches your coding agent how to write FLUX API code |
| **Best for** | Creative work inside Claude or another MCP client | Building applications that call the FLUX API |

Use both. They complement each other.

---

## Links

- **Docs** — [docs.bfl.ai](https://docs.bfl.ai)
- **Pricing** — [bfl.ai/pricing](https://bfl.ai/pricing)
- **Status** — [status.bfl.ai](https://status.bfl.ai)
- **Black Forest Labs** — [bfl.ai](https://bfl.ai)

---

## License

[MIT](./LICENSE) © Black Forest Labs

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [black-forest-labs](https://github.com/black-forest-labs)
- **Source:** [black-forest-labs/flux-mcp](https://github.com/black-forest-labs/flux-mcp)
- **License:** MIT
- **Homepage:** https://docs.bfl.ai

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-black-forest-labs-flux-mcp
- Seller: https://agentstack.voostack.com/s/black-forest-labs
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
