# flux-2-mcp [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/runapi-ai/flux-2-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 393  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/flux-2-mcp

## Description
RunAPI MCP server for Flux 2: create tasks, poll status, and check pricing.

## Tools
Capabilities this server exposes over MCP:

- **login** — Authenticate RunAPI by opening a browser PKCE login flow and saving the API key to ~/.config/runapi/config.json.
- **remix_image** — Create a Flux 2 task on RunAPI (remix image). Returns a task id, status, and output URLs.
- **text_to_image** — Create a Flux 2 task on RunAPI (text to image). Returns a task id, status, and output URLs.
- **get_task** — Fetch the current status and latest result payload for a flux-2 task.
- **check_pricing** — Look up RunAPI pricing for the flux-2 model line.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "flux-2-mcp": {
    "command": "npx",
    "args": ["-y","@runapi.ai/flux-2-mcp"],
    "env": {
      "RUNAPI_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `RUNAPI_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What flux-2-mcp does

RunAPI's Flux 2 model line becomes available to MCP-compatible assistants through four focused tools. `text_to_image` submits a prompt-based image-generation task, while `remix_image` creates a task based on an input image. Both creation tools can either return after submission or wait for a terminal task state, then report the task ID, status, and resulting output URLs.

`get_task` retrieves the latest status and payload for an existing task. `check_pricing` returns pricing for a selected Flux 2 model and endpoint and is available without signing in. The package covers two endpoint types and six model variants: Flex, Max, and Pro for both text-to-image and remix-image operations.

## How it works

The package runs as a standard stdio MCP server. MCP hosts start it with `npx -y @runapi.ai/flux-2-mcp`, then expose its tools to an assistant. A request can submit an asynchronous task with waiting enabled or disabled. When waiting is disabled, the returned task ID can be passed to `get_task` later.

Authentication is resolved in this order: the `RUNAPI_API_KEY` environment variable, the RunAPI configuration file at `~/.config/runapi/config.json`, or no credential. The no-credential mode supports pricing lookups only. The MCP `login` flow can open a browser, authenticate the user, and save credentials in the same configuration file used by `runapi login`.

## Setup and configuration

For Claude Code, add the server with:

```bash
claude mcp add flux-2 -s user -- npx -y @runapi.ai/flux-2-mcp
```

Use project scope instead when the configuration should be shared with a repository. Other MCP hosts can use the equivalent stdio configuration:

```json
{
  "mcpServers": {
    "flux-2": {
      "command": "npx",
      "args": ["-y", "@runapi.ai/flux-2-mcp"]
    }
  }
}
```

For interactive use, ask the assistant to invoke `login`. Headless and CI environments can set `RUNAPI_API_KEY` before launching the host. A pre-provisioned configuration file can contain an `apiKey` property. Keep API keys out of source control.

## Tools and capabilities

- `text_to_image`: submit a Flux 2 text-to-image task and optionally wait for its terminal result.
- `remix_image`: submit a Flux 2 image-remix task and optionally wait for completion.
- `get_task`: inspect the current state and latest payload of an existing task.
- `check_pricing`: query pricing for a Flux 2 model and endpoint without authentication.

The text-to-image tool supports `flux-2-flex-text-to-image`, `flux-2-max-text-to-image`, and `flux-2-pro-text-to-image`. The remix tool supports the corresponding Flex, Max, and Pro remix models. Model availability may change, so pricing lookup or the Flux 2 model page should be used for the current catalog.

## Limitations and notes

Task creation and status retrieval require authentication; pricing lookup does not. The package is intentionally scoped to Flux 2 rather than the complete RunAPI model catalog. Choose the broader RunAPI MCP package when an assistant needs to discover other model families. Asynchronous tasks may need a later `get_task` call when submitted without waiting. The project is licensed under Apache-2.0.

_Full upstream README: https://allmcps.com/mcp/flux-2-mcp/readme_

