Hosted MCP endpoint
Get a Magic Hour API key
Create the key used to authorize MCP tool calls.
This is the creation MCP, which can call Magic Hour tools. If you only want an assistant to
search these API docs while you write code, use the API Docs MCP.
What the server exposes
The current server builds tools from its bundled Magic Hour OpenAPI specification and adds helpers for the media workflow:- Video: talking photo, video editing, animation, audio-to-video, subtitles, character replace, face swap, image-to-video, lip sync, text-to-video, and video-to-video
- Image: generation and editing, clothes and face editing, GIFs, headshots, upscaling, memes, QR codes, body/face/head swaps, background removal, and photo colorization
- Audio: voice generation and voice cloning
- Workflow: server health, file-upload URLs, face detection, project status and deletion, render waiting, and secure retrieval of completed image, audio, and video files
Before you connect
You need:- A Magic Hour API key
- A client that supports remote Streamable HTTP MCP servers
- Enough Magic Hour credits for the generations you request
Connect a client
- Claude
- Claude Code
- Codex CLI
- ChatGPT
- Open Settings → Connectors in Claude and add a custom connector.
- Name it
Magic Hourand usehttps://mcp.magichour.ai/as the connector URL. - If Claude asks for an OAuth client ID in Advanced settings, enter
magic-hour-mcp. - Select Connect. On the Magic Hour authorization page, paste your API key and continue.
- Enable the connector and ask Claude:
Call the Magic Hour ping tool.
pong.Verify API access before generating
Afterping, ask the agent to call account_retrieve and check eligibility for the
intended generation. Tool discovery can work without credentials, and an invalid API key
can still receive pong; the account read checks actual API authorization.
Authentication required means the bearer token is missing. An account 401 means
authorization failed. Check the key and the environment that launched the agent before
reinstalling anything. Keep account details private.
Add media generation workflows
The MCP gives your assistant access to Magic Hour tools. The Magic Hour skills cookbook adds workflows and published examples for prompting, tool sequencing, output review, and recovery without duplicate paid jobs.Try a first request
Start with a prompt that does not require an uploaded file:How render jobs work
Image, video, and audio creation is asynchronous:- A creation tool starts the job and immediately returns a project
idandcredits_charged. - The assistant calls the matching
wait_for_image_project,wait_for_video_project, orwait_for_audio_projecthelper. - The wait helper stops when the project is complete, has an error, is canceled, or times out.
- Completed projects return
exact_download_urls. Those signed URLs must be used exactly as returned without removing query parameters or appending expiration metadata.
Using input files
The hosted server deliberately does not read a path on your computer. For local media, the complete flow is:- Call
video_assets_generate_presigned_url. Despite its name, it accepts image, audio, and video items. - Have the client or an upload bridge send the raw bytes to the returned
upload_url. - Pass the matching returned
file_pathto the creation tool.
file_path values are more reliable. A browser attachment only works when the MCP client provides
the required upload bridge; the hosted server cannot fetch a caller-supplied local filesystem path.
Built-in video guidance
When the user does not give different instructions, the current server tells the assistant to:- Prefer AI Image Editor followed by Image-to-Video for multi-step video creation
- Reuse reference images and preserve identity, style, color, lighting, and aspect ratio across scenes
- Prefer
nano-banana-2-litefor image creation/editing andltx-2.3for Image-to-Video - Add an appropriate AI Voice Generator narration when it suits the video and let sentences finish
- Use Text-to-Video when visual consistency is not important
Troubleshooting
- Tools do not appear: Restart the client after adding the server, then call
ping. - Authentication fails: Confirm the full API key is active and bearer authentication uses
Authorization: Bearer YOUR_MAGIC_HOUR_API_KEY. - Codex cannot see the server: Launch Codex from the shell where
MAGIC_HOUR_API_KEYis set. - You only received a project ID: Ask the assistant to call the matching
wait_for_*_projecthelper and return the finished result. - A signed link fails: Ask for the exact download URL again. Do not shorten it, strip its query
parameters, or append
expires_at. - A local attachment cannot be used: Use a client with an upload bridge or upload the file first
and provide its Magic Hour
file_path.
Magic Hour MCP overview
See product examples and the hosted connector URL.
Official MCP repository
Inspect the implementation, policies, and tests used for this guide.