Provides access to the BFL MCP server repository for installation, configuration, and contribution
Serves as the runtime environment for the MCP server, allowing for easy installation and execution through npx
Enables package management and installation of the BFL MCP server through npx commands
BFL MCP Server
Model Context Protocol (MCP) server for Black Forest Labs FLUX image generation and editing using FLUX.1 Kontext Pro.
🎨 Create and edit images with AI using natural language through the MCP protocol
Features
- 🎨 Image Generation: Generate high-quality images from text prompts using FLUX.1 Kontext Pro
- ✏️ Image Editing: Edit existing images with natural language instructions
- 🚀 Easy Installation: Run directly with npx - no local setup required
- 🔧 Configurable: Support for aspect ratios, seeds, safety settings, and output formats
- 🔗 MCP Compatible: Works with Claude Desktop, Claude Code, and other MCP clients
Installation & Usage
Quick Start with npx
Environment Variable
IDE Integration
Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json
):
Claude Code
- Via CLI Wizard (Recommended):
- Via .claude.json (Project-specific):
Create or edit
.claude.json
in your project root:
- Using Environment Variables:
Cursor IDE
- Enable MCP: Go to Settings > Cursor Settings > MCP Servers and enable it
- Project Configuration: Create
.cursor/mcp.json
in your project:
- Global Configuration: Create
~/.cursor/mcp.json
for system-wide access:
Windsurf IDE
- Via Plugin Store:
- Open Windsurf and navigate to Cascade assistant
- Click the Plugins icon in the top right menu
- Add custom server with our package
- Manual Configuration:
- Click the hammer (MCP) icon in Cascade
- Click "Configure" to open
~/.codeium/windsurf/mcp_config.json
- Add configuration:
- Reload: Save and click "Refresh" in the Cascade assistant
Available Tools
generate_image
Generate an image from a text prompt.
Parameters:
prompt
(required): Text description of the image to generateaspect_ratio
(optional): Image aspect ratio (default: "1:1")- Supported: "1:1", "16:9", "9:16", "4:3", "3:4", etc.
seed
(optional): Seed for reproducible generationsafety_tolerance
(optional): Safety level 0-6 (higher = more permissive)output_format
(optional): "jpeg" or "png" (default: "jpeg")
Example:
edit_image
Edit an existing image using natural language instructions.
Parameters:
prompt
(required): Text description of how to edit the imageinput_image
(required): Base64 encoded input imageaspect_ratio
(optional): Output image aspect ratio (default: "1:1")seed
(optional): Seed for reproducible generationsafety_tolerance
(optional): Safety level 0-6output_format
(optional): "jpeg" or "png" (default: "jpeg")
Example:
Verification & Troubleshooting
Verify Installation
After configuring in any IDE, you should see:
- Claude Desktop: MCP tools available in chat
- Claude Code: Run
/mcp
command to check status - Cursor: Green dot with tools list in MCP section
- Windsurf: Tools available in Cascade assistant
Common Issues
- "Command not found": Ensure npx is installed (
npm install -g npm
) - "Permission denied": Try with
sudo
or check Node.js permissions - "API key invalid": Verify your BFL API key at bfl.ai
- "Server not starting": Check IDE logs for detailed error messages
Testing the Server
Test manually before IDE integration:
API Key
Get your API key from Black Forest Labs.
Technical Details
- Model: FLUX.1 Kontext Pro
- Output: ~1MP images (1024x1024 for 1:1 ratio)
- URL Validity: Generated image URLs are valid for 10 minutes
- Processing: Asynchronous with automatic polling
- Timeout: 5 minutes maximum generation time
Development
Local Development
Testing
Author
Created by @elhombrehd
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
- Issues: GitHub Issues
- BFL API Documentation: docs.bfl.ai
- MCP Protocol: Model Context Protocol
Repository
🔗 GitHub: github.com/elhombrehd/bfl_mcp
This server cannot be installed
An MCP server that enables generating and editing high-quality images with natural language using Black Forest Labs' FLUX.1 Kontext Pro model.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that enables AI assistants to generate images using Black Forest Labs' Flux model via Cloudflare Workers.Last updated -1JavaScriptMIT License
- AsecurityFlicenseAqualityAn MCP server that generates images based on text prompts using Black Forest Lab's FLUX model, allowing for customized image dimensions, prompt upsampling, safety settings, and batch generation.Last updated -31TypeScript
- -securityFlicense-qualityAn MCP image generation server based on the Flux Schnell model that provides API access for generating images from text prompts with customizable dimensions and seeds.Last updated -1Python
- -securityFlicense-qualityAn MCP server that enables text-to-image generation and editing using OpenAI's gpt-image-1 model, supporting multiple output formats, quality settings, and background options.Last updated -33Python