Codex CLI Integration with Flux MCP
📘 Complete Guide: Using All 11 AceData Cloud MCPs in Codex CLI →
A top-tier open-source image model from Black Forest Labs, featuring photorealistic style and excellent Kontext editing capabilities. After integrating MCP with Codex CLI, you can call it directly in conversations without switching windows or copying and pasting.
¶ Obtaining API Token
Register an account at AceData Cloud Platform and copy the API Token from the homepage — one token allows access to all 11 MCP Servers. Detailed steps are available in the Complete Guide.
¶ Configuration
Edit the configuration file: ~/.codex/config.toml
[mcp_servers.flux]
url = "https://flux.mcp.acedata.cloud/mcp"
type = "http"
http_headers = { "Authorization" = "Bearer 你的Token" }
The tool will be automatically loaded on the next codex session startup after saving.
¶ Usage Examples
Generate a cyberpunk-style city night scene with neon lights, rainy night, and wet streets using Flux
Transform this image (link xxx) into a watercolor painting style
Generate a 1024x1024 product hero image: black metallic headphones floating on a white background
¶ Tools
| Tool | Description |
|---|---|
| flux_generate_image | Text-to-image generation (Flux pro / dev / ultra) |
| flux_edit_image | Edit existing images based on prompts (using flux-kontext-pro / max models) |
