MCP (Model Context Protocol) server for Flux AI image generation via AceDataCloud API.
core/
config.py — Settings dataclass (API token, base URL)
server.py — FastMCP server singleton
client.py — httpx async HTTP client
types.py — Literal types (FluxModel, etc.)
exceptions.py — Error classes (AuthError, APIError, TimeoutError)
utils.py — Formatting helpers
tools/
image_tools.py — generate images from prompts
task_tools.py — query task status
info_tools.py — list models, actions
prompts/ — LLM guidance prompts
tests/ — pytest-asyncio + respx tests
When invoked by the sync workflow, the Docs repo is checked out at _docs/. Your job:
- Source of truth —
_docs/openapi/flux.jsonis the OpenAPI spec for the FluxMCP API. - Compare models — The Literal types in
core/types.pymust match the spec's model enum. Add/remove as needed. - Compare parameters — Each
@mcp.tool()function's parameters should match the corresponding OpenAPI endpoint. - Update defaults — If a new model becomes the recommended default, update the default in
core/types.py. - Update README — Keep the model table and feature list current.
- Add tests — For new tools or parameters, add test cases in
tests/. - PR title — Use format:
sync: <description> [auto-sync]
pip install -e ".[dev]"
pytest --cov=core --cov=tools
ruff check .