Black Forest Labs MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Black Forest Labs MCP or direct API to generate images, edit visual content, create videos, and monitor generation jobs through natural language.

Black Forest Labs logoBlack Forest Labs
Api Key

Black Forest Labs provides hosted FLUX models for generating and editing images and videos. It offers fast, flexible media creation with asynchronous processing and fine-tuning support.

14 Tools

Try Black Forest Labs now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Black Forest Labs
Try asking
TOOLS

Supported Tools

Every Black Forest Labs action and event your agent gets out of the box. No Black Forest Labs signup needed. Give your agents access to the Black Forest Labs API and pay per call from your Composio balance.

Deblur Image

Submit a paid asynchronous deblurring of an authorized image.

Edit Video

Submit a paid asynchronous prompt-directed edit of an authorized source video.

Erase Image Object

Submit a paid asynchronous removal of a masked object from an authorized image.

Generate Fine-Tuned Image

Submit a paid asynchronous FLUX fine-tuned image generation using an existing LoRA.

Generate or Edit FLUX.2 Klein Image

Submit a paid asynchronous FLUX.2 Klein image generation or authorized reference-image edit with the stable 4B or 9B model.

Generate or Edit Image

Submit a paid asynchronous FLUX 3 image generation or authorized reference-image edit; some connections support text-to-image only.

Generate Video

Submit a paid asynchronous FLUX 3 video task from text, authorized keyframes, a source video, or a prior draft cache.

Get Credit Balance

Return the connected BFL project's current credit balance so funds can be checked before a paid generation or editing request.

Get Fine-Tune

Return details for one BFL fine-tune by ID; an absent or inaccessible fine-tune is reported as not found without distinguishing access denial.

Get Generation Result

Fetch one status update for an asynchronous BFL task using its exact returned polling URL or task ID.

List Fine-Tunes

Return the fine-tune IDs created by the user in one unpaginated response.

Outpaint Image

Submit a paid asynchronous expansion of an authorized image onto a canvas of at most 4,194,304 pixels; fast mode requires base64, while high mode also accepts HTTP(S) URLs.

Upscale Video

Submit a paid asynchronous upscale for the first 20 seconds of an authorized video, with an optional content prompt and 1.5x–3x scale target; BFL charges per output megapixel-second.

Virtual Try-On

Submit a paid asynchronous virtual try-on using authorized person and garment images.

SETUP GUIDE

Connect Black Forest Labs MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["bfl"],
  mcp: true,
});
Create a session scoped to Black Forest Labs and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Generate an image of a red fox in a snowy forest at sunrise",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Black Forest Labs request
SETUP GUIDE

Connect Black Forest Labs API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["bfl"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Black Forest Labs
3

Run Black Forest Labs tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Generate an image of a red fox in a snowy forest at sunrise" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Black Forest Labs tool calls through the session, and print the final answer

Why Use Composio?

AI Native Black Forest Labs Integration

  • Supports both Black Forest Labs MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable FLUX image and video generation
  • Rich coverage for creating media, polling results, managing fine-tunes, and checking credits

Managed Auth

  • Securely stores and uses your Black Forest Labs API key
  • Central place to manage, scope, and revoke Black Forest Labs access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Black Forest Labs
  • Scoped, least privilege access to Black Forest Labs generation and project resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with Black Forest Labs.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Black Forest Labs tool your agent needs.Free to start.

Start building