# flux-kontext-mcp [Health: Active]

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

## Description
RunAPI MCP server for Flux Kontext: create tasks, poll status, 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.
- **text_to_image** — Create a Flux Kontext 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-kontext task.
- **check_pricing** — Look up RunAPI pricing for the flux-kontext model line.

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

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

## Documentation

## What flux-kontext-mcp does

flux-kontext-mcp gives MCP-compatible clients access to the Flux Kontext model line through RunAPI. It focuses on one endpoint and two model variants: `flux-kontext-max` and `flux-kontext-pro`. The server is intended for agents that need to create image-generation jobs, inspect asynchronous results, or review pricing without exposing the broader RunAPI catalog.

The package is available as `@runapi.ai/flux-kontext-mcp` and runs as an MCP server over a standard stdio command. It can be added to an MCP host with `npx -y @runapi.ai/flux-kontext-mcp`.

## How it works

A client sends tool calls through MCP, and the server forwards the relevant operation to RunAPI. Image generation is asynchronous: `text_to_image` creates a task and can either wait for a terminal state or return as soon as the task is submitted. The response includes the task ID, status, and any output URLs available at that point.

For deferred workflows, an agent can save the returned task ID and later call `get_task` to retrieve the latest status and payload. Pricing can be checked independently with `check_pricing`, including before authentication. Model availability may change, so pricing lookup or the Flux Kontext model page should be used for the current catalog.

## Setup and configuration

Install the package through an MCP client's stdio configuration. Claude Code can register it with either user or project scope. Other hosts can use the equivalent configuration:

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

Pricing lookup does not require authentication. Creating tasks and checking their status require RunAPI authentication. An interactive client can invoke the `login` flow, which opens a browser and stores credentials in `~/.config/runapi/config.json`; that file is also used by `runapi login`.

For headless or CI environments, set `RUNAPI_API_KEY` before starting the MCP host. Authentication can alternatively use a pre-provisioned configuration file containing an `apiKey` value. Real credentials should not be committed to a repository.

## Tools and capabilities

- `text_to_image`: Creates a Flux Kontext text-to-image task. It accepts the supported model variants and can wait for completion or return immediately with the task ID.
- `get_task`: Retrieves the current state and latest payload for an existing task.
- `check_pricing`: Looks up pricing for a Flux Kontext model and endpoint without authentication.
- Supports `flux-kontext-max` and `flux-kontext-pro` for image-generation requests.
- Returns output URLs when they are available from the task response.

## Limitations and notes

The server is scoped to Flux Kontext rather than the complete RunAPI model catalog. It covers two model variants across one endpoint, and model availability can change between releases. Authentication is needed for task creation and status polling, while pricing remains available without a key. The server depends on an MCP host that can launch a stdio server and on RunAPI access for authenticated operations.

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

