MCP (Model Context Protocol) server for Luma Dream Machine AI video 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 (LumaModel, etc.)
exceptions.py — Error classes (AuthError, APIError, TimeoutError)
utils.py — Formatting helpers
tools/
video_tools.py — generate video from text or image
task_tools.py — query task status, batch query
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/luma.jsonis the OpenAPI spec for the LumaMCP 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 .