streamable-httpupdated 8d ago
OpenAPI-backed MCP server for Magic Hour image, video, and audio generation.
What can you do with Magic Hour?
Magic Hour MCP Server
OpenAPI-backed MCP server for Magic Hour image, video, and audio generation.
At startup, this server reads docs/openapi.json and builds MCP tools with
FastMCP.from_openapi(). The OpenAPI spec supplies endpoint coverage, while
Magic Hour MCP policies add agent-facing guidance for async polling, uploads,
and project downloads.
Docs:
user.md- hosted endpoint user guideintegration-handoff.md- FastAPI mount checklistdocs/detailed-step-by-step-integration.md- full backend integration guidedocs/api-reference.md- generated API reference
Setup
pip install -e .
Run locally
python main.py
Local MCP endpoint:
http://127.0.0.1:8000/
This local dev server runs at /, not /mcp. The host app adds /mcp when it mounts the server.
By default, requests go to the production Magic Hour API:
https://api.magichour.ai
Tool discovery is public. Tool calls must include your Magic Hour API key:
Authorization: Bearer <magic_hour_api_key>
Agents can discover the hosted server card at:
https://mcp.magichour.ai/.well-known/mcp/server-card.json
Environment variables:
MAGIC_HOUR_API_BASE_URL=https://api.magichour.ai
MAGIC_HOUR_OPENAPI_PATH=docs/openapi.json
MCP_OAUTH_ISSUER_URL=https://mcp.magichour.ai
MCP_OAUTH_RESOURCE_URL=https://mcp.magichour.ai
Override MAGIC_HOUR_API_BASE_URL to use a mock or another API base:
MAGIC_HOUR_API_BASE_URL=https://api.sideko.dev/v1/mock/magichour/magic-hour/latest python main.py
OAuth compatibility
The optional OAuth shim validates a Magic Hour API key and uses that key as the
access token. Production requires MCP_OAUTH_ISSUER_URL and
MCP_OAUTH_RESOURCE_URL. See docs/future-oauth-support.md for deployment
limits.
Public OAuth clients can use the stateless POST /register compatibility endpoint.
Test with MCP Inspector
- Start the server.
- Run:
npx @modelcontextprotocol/inspector - In Inspector:
- Transport:
Streamable HTTP - URL:
http://127.0.0.1:8000/ - Header:
Authorization: Bearer <magic_hour_api_key>
- Transport:
- Call
ping. - Call
video_assets_generate_presigned_urlor another generated tool.
Notes:
- FastMCP generates endpoint tools from OpenAPI at startup.
- Creation tools return
idandcredits_chargedimmediately. - OpenAPI
operationIdvalues are normalized to descriptive snake_case tool names. - The shared
/v1/files/upload-urlsendpoint is namedvideo_assets_generate_presigned_url. It acceptsvideo,audio, andimageitems. - Use
wait_for_*_projectto poll jobs. Useexact_download_urlsexactly as returned; never append expiration metadata. - Image and audio wait tools also return inline media when supported.
Rebuild and type-check the MCP App UI with cd web && npm ci && npm run build.
File uploads
Magic Hour does not accept raw file bytes inside tool arguments. The flow is:
- Call the generated shared upload-URL tool,
video_assets_generate_presigned_url - Upload the file bytes to the returned
upload_url - Pass the returned
file_pathinto the generated creation tool
Direct public media URLs may work, but uploaded file_path values are more
reliable. upload_file_to_presigned_url handles local files when the server can
read them. Browser chat needs a separate upload UI or bridge; see
docs/future-chat-ui-handoff.md.
Install
Add Magic Hour to your client. Pick the one you use.
claude mcp add --transport http magic-hour https://mcp.magichour.ai/codex mcp add magic-hour --url https://mcp.magichour.ai/{
"mcpServers": {
"magic-hour": {
"url": "https://mcp.magichour.ai/"
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"servers": {
"magic-hour": {
"type": "http",
"url": "https://mcp.magichour.ai/"
}
}
}Add to `.vscode/mcp.json` in your workspace.
{
"mcpServers": {
"magic-hour": {
"url": "https://mcp.magichour.ai/"
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"magic-hour": {
"serverUrl": "https://mcp.magichour.ai/"
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
Score
39 / 100
Incomplete
- Documentation22/25
- Maintenance19/25
- Trust9/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 1 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 6 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 0.1.0Latest | Aug 31, 2026 |