Hosted MCP endpoint
Get a Magic Hour API key
Create a key for clients that use manual bearer authentication, such as the Claude Code, Codex
CLI, and Manus setup below. Claude and ChatGPT OAuth connector users sign in and authorize the
connection instead.
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
These examples use the verb-first MCP tool names. Refresh cached tool inventories after a server update and use the exact names your client exposes, including any client prefix. Dated validation receipts retain the tool names that were actually tested at the time. The current server builds tools from its bundled Magic Hour OpenAPI specification and adds helpers for the media workflow:- Video: talking photo, UGC ads from a prepared image and script, video editing, translation and upscaling, 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: generate music from a description, with optional custom lyrics or instrumental output. Use audio files with talking-photo and other tools that accept audio. Voice generation and voice cloning are not currently exposed by the hosted MCP.
- Workflow: server health, account details, saved items, 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 account for the Claude or ChatGPT OAuth connector sign-in flow
- For the Claude Code, Codex CLI, and Manus bearer-token setup below, 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
- Hermes Agent
- ChatGPT
- Manus
- 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, sign in to Magic Hour if asked, and select Allow on the authorization page. A Claude connector API key is created automatically in your Developer Hub; delete that key there to disconnect.
- Enable the connector and ask Claude:
Call Magic Hour get_account_info and confirm API access without generating media.
Verify API access before generating
Useget_account_info to confirm API access, then 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 and video creation is asynchronous. Audio status, waiting, and download helpers can also retrieve existing API audio projects:- 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
get_upload_urlsfor image, audio, or 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.
Recommended video guidance
Unless the user gives different instructions, guide the assistant to:- Use Image-to-Video directly when the user already has an approved image to animate
- Use AI Image Editor first only when the requested appearance must change or the source needs editing
- Reuse reference images and preserve identity, style, color, lighting, and aspect ratio across scenes
- Omit optional
modelandresolutiononly when their defaults are compatible with the account - For an image model recommendation, prefer
nano-banana-2-liteonly when account support is known; otherwise check account access and tool model metadata before choosing a model - For an Image-to-Video model recommendation, prefer
ltx-2.5 - Use Text-to-Video when visual consistency is not important
model or model="default" currently selects nano-banana, which
requires a paid plan. On Free, explicitly request model="flux-2-klein", resolution="640px", and
image_count=1. Available credits alone do not unlock paid-only models or larger resolutions.
If a request returns plan_upgrade_required, choose a model and resolution supported by the account
or upgrade; do not retry the unchanged request. Do not silently change a user-selected model.
Troubleshooting
- Tools do not appear: Restart the client after adding the server, then call
get_account_info. - Authentication fails: For Claude or ChatGPT OAuth connections, reconnect, sign in to Magic Hour,
and select Allow. For manual bearer-token clients, confirm the full API key is active and
authentication uses
Authorization: Bearer YOUR_MAGIC_HOUR_API_KEY. Then callget_account_infoto verify API access. - 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.