Skip to main content
Glama

Magic Hour MCP Server

OpenAPI-backed MCP server for Magic Hour image and video generation and editing, music generation, uploads, completion waiting and retrieval of existing audio projects.

At startup, this server builds MCP tools from the canonical docs/openapi.json with FastMCP.from_openapi(). Installed distributions bundle that snapshot inside the Python package, so startup does not require a repository checkout. The spec supplies endpoint coverage, while Magic Hour MCP policies add agent-facing guidance for async polling, uploads, and project downloads.

Connect an agent

Hosted creation endpoint: https://mcp.magichour.ai/

Follow the client setup guide for Claude, Claude Code, Codex CLI or ChatGPT. After connecting, call get_account_info to verify API access and inspect the account before generation; ping alone does not validate the API key.

Try: “Use my portrait to create a cinematic space-pilot still, then animate it with a slow camera push. Keep my face consistent, wait for the render and show the finished video. Check account eligibility and cost before spending credits.”

Use get_workflow_guide for the ordered tool steps and output review. After a tool-name update, refresh the client’s cached tool catalog or reconnect. Use the names returned by tools/list; dated example receipts keep their original IDs. For documentation search while coding, use the separate API Docs MCP.

Docs:

  • Magic Hour agent skills - media workflows, published examples, and recovery guidance

  • user.md - hosted endpoint user guide

  • integration-handoff.md - FastAPI mount checklist

  • docs/detailed-step-by-step-integration.md - full backend integration guide

  • docs/api-reference.md - generated API reference

Related MCP server: Agnes AI MCP Server

Evaluate a paid workflow

Use the workload evaluation guide to compare a finished image or video job, including its inputs, model, settings, output and cost. Use the Markdown tables for model limits and credit costs and billing options. The Kling 3.0 annual example shows the upfront payment and effective cost when all credits are used. Audio, higher resolutions, and video-reference inputs change credit usage.

The account read verifies API authorization and returns account information; it is not a request-specific price or eligibility quote. The current MCP tool contract has no such quote operation. A workflow guide does not validate the requested model, source media or plan access. Resolve unclear costs or access before creating a paid project.

For inspectable video examples, the published image-to-video benchmark provides source images, requests, all attempts and downloadable results. It compares models through Magic Hour and does not establish a provider-quality winner or human acceptance of the clips.

Upload files from a local agent

If your agent can run Python where the file is stored, call client.v1.files.upload_file("path/to/file.png") from the Magic Hour Python SDK. Use a client authenticated for the same Magic Hour account as the MCP connection. Pass the returned file_path to the generation tool and save it for reuse. Hosted MCP clients can use native attachment tools where available, or request a presigned URL with get_upload_urls and upload the file bytes from the client.

Credits and data

MCP generations use Magic Hour account credits. You can buy a one-time credit pack without a subscription; unused credits never expire. Packs include applicable watermark-free exports and commercial use, subject to the Terms and rights in your source content. They do not unlock subscription-only model or resolution access.

Technical failures generally return credits after processing; completed but unsatisfactory results do not automatically return credits. A wait timeout is not proof of project failure—resume with the existing project ID. Payment refunds follow the separate refund policy.

Trust & Data Use explains Magic Hour's no-training policy for customer prompts, uploads and outputs, and feature-dependent retention.

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 require authentication. Hosted Claude and ChatGPT OAuth connectors handle the token after you sign in and authorize access. For manual bearer clients, 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

Credential-free client connection configs are also public at /mcp.json and /.well-known/mcp.json. These contain only the hosted endpoint, never an API key. Tool calls still require OAuth or a bearer API key. The handshake advertises the setup documentation and a packaged 256px icon; the server card also supplies its human-readable title and description.

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

Read-only workflow guidance

get_workflow_guide accepts video-face-swap, image-editor, image-to-video, video-generator, lip-sync, ugc-ads, talking-photo or media-apis. It returns inputs, product and API documentation URLs, exact creation-tool names, ordered steps, example requests, follow-up edits and review criteria. It makes no API request, spends no credits and does not verify account access. Like other tools, it requires the existing authentication flow.

Clients can also discover the public magic-hour://workflows/index resource and read magic-hour://workflows/{workflow}. UGC uses create_spoken_ad_video with a prepared image, script and supported duration; image composition is a separate Image Editor call. Keep the returned project ID and use wait_for_video_project to retrieve the finished file.

For example, ask for image-to-video to animate an approved product photo directly, review the finished clip and reuse it for a later edit. Edit the still only when the requested appearance must change or a source problem prevents the shot. The talking-photo guide requires a portrait and an existing audio file; text alone cannot start that tool. Guides describe workflows, not prevalidated generated outputs or account eligibility.

This helps assistants that connect to this server select workflows; it does not establish a recommendation or ranking benefit in unconnected consumer assistants.

OAuth

This server is an OAuth protected resource only. The authorization server is the Magic Hour web app (https://magichour.ai): users sign in and consent there, and it returns a Magic Hour API key as the access token, which this server passes through to the API. Production requires MCP_OAUTH_ISSUER_URL and MCP_OAUTH_RESOURCE_URL. See docs/future-oauth-support.md.

Test with MCP Inspector

  1. Start the server.

  2. Run:

    npx @modelcontextprotocol/inspector
  3. In Inspector:

    • Transport: Streamable HTTP

    • URL: http://127.0.0.1:8000/

    • Header: Authorization: Bearer <magic_hour_api_key>

  4. Call ping.

  5. Call get_upload_urls or another generated tool.

Notes:

  • FastMCP generates endpoint tools from OpenAPI at startup.

  • Creation tools return id and the initial credits_charged. Record them together, then reconcile that entry with credits_charged from the terminal project response when available.

  • OpenAPI operationId values are normalized to descriptive snake_case tool names.

  • The shared /v1/files/upload-urls endpoint is named get_upload_urls. It accepts video, audio, and image items.

  • Use wait_for_*_project to poll jobs. Use exact_download_urls exactly 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.

Result delivery metrics

media_project_resolved includes project_id, project_type, status and download_count. Count distinct projects with status complete and at least one download to measure completed-project retrievals. Repeated reads remain raw events; older events without a project ID cannot be deduplicated or backfilled.

The result card reports mcp_app_result events: preview_loaded when the main media loads, playback_started when playback actually starts, and download_requested when Download is clicked. Properties contain only the project ID, media type and SHA-256 output-path hash. No prompts, filenames, raw paths, signed URLs or credentials are sent. The widget suppresses repeat events within its lifetime; reports must also deduplicate by (event, project_id, project_type, output_id) across reloads and cards.

UI reports are anonymous and can be spoofed. Reconcile project IDs against authenticated completion events and report unmatched coverage separately. Loading does not prove visibility or quality; a download request does not prove host acceptance or a completed download. These events do not establish unique customers, public-plugin installs or paid activation.

File uploads

Magic Hour does not accept raw file bytes inside tool arguments. The flow is:

  1. Call the generated shared upload-URL tool, get_upload_urls

  2. Upload the file bytes to the returned upload_url

  3. Pass the returned file_path into the generated creation tool

Direct public media URLs may work, but uploaded file_path values are more reliable. Upload bytes from the caller or a dedicated upload bridge; the hosted MCP server never reads caller-supplied local filesystem paths. Browser chat needs a separate upload UI or bridge; see docs/future-chat-ui-handoff.md.

MCP voice and meme tools

Voice Generator uses the voice presets in the Magic Hour API schema. Voice Cloner takes an audio sample and text. Use your own voice or a voice you have permission to clone. Meme Generator accepts the templates listed in its tool schema.

Available Tools

45 tools
account_retrieveAInspect

Get the current credit balance and subscription details of the account that owns the API key.

Inputs: no named parameters. Returns: id, tier, email, credits, +1 more

ai_clothes_changer_create_imageAInspect

Change outfits in photos in seconds with just a photo reference. Each photo costs 25 credits.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), name. Returns: Success

ai_face_editor_edit_imageAInspect

Edit facial features of an image using AI. Each edit costs 1 frame. The height/width of the output image depends on your subscription. Please refer to our pricing page for more details

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: style (required), assets (required), name. Returns: Success

ai_gif_generator_create_imageAInspect

Create an AI GIF. Each GIF costs 50 credits.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

Inputs: style (required), name, output_format. Returns: Success

ai_headshot_generator_create_imageAInspect

Create an AI headshot. Each headshot costs 50 credits.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), name, style. Returns: Success

ai_image_editor_create_imageAInspect

Edit images with AI.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: style (required), assets (required), name, model, +3 more. Returns: Success

ai_image_generator_create_imageAInspect

Create an AI image with advanced model selection and quality controls.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

Inputs: style (required), image_count (required), name, model, +2 more. Returns: Success

ai_image_upscaler_create_imageAInspect

Upscale your image using AI. Each 2x upscale costs 50 credits for balanced/creative modes, and 25 credits for preserve. 4x upscale costs 200 and 100 credits respectively.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), scale_factor (required), name, style. Returns: Success

ai_meme_generator_create_imageAInspect

Create an AI generated meme. Each meme costs 10 credits.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

Inputs: style (required), name. Returns: Success

ai_qr_code_generator_create_imageAInspect

Create an AI QR code. Each QR code costs 0 credits.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

Inputs: style (required), content (required), name. Returns: Success

ai_talking_photo_create_talking_photoAInspect

Create a talking photo from an image and audio or text input.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), end_seconds (required), start_seconds (required), name, +2 more. Returns: Success

ai_video_editor_create_videoAInspect

What this API does

Create the same Video Editor you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.

Good for

  • Automation and batch processing

  • Adding video editor into apps, pipelines, or tools

How it works (3 steps)

  1. Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.

  2. Send a request to create a video editor job with the basic fields.

  3. Check the job status until it's complete, then download the result from downloads.

Key options

  • Inputs: usually a file, sometimes a YouTube link, depending on project type

  • Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes

  • Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt

Cost
Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.

For detailed examples, see the product page.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: style (required), assets (required), end_seconds (required), name, +3 more. Returns: Success

ai_voice_cloner_create_audioAInspect

Clone a voice from an audio sample and generate speech.

  • Each character costs 0.1 credits.

  • The cost is rounded up to the nearest whole number

MCP guidance:

  • This starts an async audio generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_audio_project helper with the returned id, or poll the matching GET /v1/audio-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: style (required), assets (required), name. Returns: Success

ai_voice_generator_create_audioAInspect

Generate speech from text. Each character costs 0.1 credits. The cost is rounded up to the nearest whole number.

MCP guidance:

  • This starts an async audio generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_audio_project helper with the returned id, or poll the matching GET /v1/audio-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

Inputs: style (required), name. Returns: Success

animation_create_videoAInspect

Create a Animation video. The estimated frame cost is calculated based on the fps and end_seconds input.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: fps (required), style (required), width (required), assets (required), +3 more. Returns: Success

audio_projects_deleteAInspect

Permanently delete the rendered audio file(s). This action is not reversible, please be sure before deleting.

Inputs: id (required).

audio_projects_retrieve_detailsAInspect

Check the progress of a audio project. The downloads field is populated after a successful render.

Statuses

  • queued — waiting to start

  • rendering — in progress

  • complete — ready; see downloads

  • error — a failure occurred (see error)

  • canceled — user canceled

  • draft — not used

MCP guidance:

  • Use this after a create tool to poll job status. When status is complete, surface the downloads URLs to the user; if status is error, surface the error message.

  • Each downloads[n].url is already the full signed download URL. Use it exactly as returned. Do not shorten it, strip query parameters, or append expires_at onto the URL string.

Inputs: id (required). Returns: Success

audio_to_video_create_videoAInspect

What this API does

Create the same Audio To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.

Good for

  • Automation and batch processing

  • Adding audio to video into apps, pipelines, or tools

How it works (3 steps)

  1. Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.

  2. Send a request to create a audio to video job with the basic fields.

  3. Check the job status until it's complete, then download the result from downloads.

Key options

  • Inputs: usually a file, sometimes a YouTube link, depending on project type

  • Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes

  • Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt

Cost
Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.

For detailed examples, see the product page.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), end_seconds (required), name, style, +2 more. Returns: Success

auto_subtitle_generator_create_videoAInspect

Automatically generate subtitles for your video in multiple languages.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: style (required), assets (required), end_seconds (required), start_seconds (required), +1 more. Returns: Success

body_swap_create_imageAInspect

Swap a person into a scene image using Nano Banana 2 Lite (640px/1k) or Nano Banana 2 (2k/4k). Credits depend on resolution (from 50 credits at 640px upward).

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), resolution (required), name. Returns: Success

character_replace_create_videoAInspect

What this API does

Create the same Character Replace you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.

Good for

  • Automation and batch processing

  • Adding character replace into apps, pipelines, or tools

How it works (3 steps)

  1. Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.

  2. Send a request to create a character replace job with the basic fields.

  3. Check the job status until it's complete, then download the result from downloads.

Key options

  • Inputs: usually a file, sometimes a YouTube link, depending on project type

  • Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes

  • Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt

Cost
Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.

For detailed examples, see the product page.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), end_seconds (required), name, style, +2 more. Returns: Success

face_detection_detect_facesAInspect

Detect faces in an image or video.

Use this API to get the list of faces detected in the image or video to use in the face swap photo or face swap video API calls for multi-face swaps.

Note: Face detection is free to use for the near future. Pricing may change in the future.

MCP guidance:

  • This starts an async face-detection task and returns an id. Use the face-detection details endpoint with that id to retrieve detected faces before doing individual face swaps.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), confidence_score. Returns: id, credits_charged

face_detection_retrieve_detailsAInspect

Get the details of a face detection task.

Use this API to get the list of faces detected in the image or video to use in the face swap photo or face swap video API calls for multi-face swaps.

Inputs: id (required). Returns: id, faces, status, credits_charged

face_swap_create_videoAInspect

What this API does

Create the same Face Swap you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.

Good for

  • Automation and batch processing

  • Adding face swap into apps, pipelines, or tools

How it works (3 steps)

  1. Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.

  2. Send a request to create a face swap job with the basic fields.

  3. Check the job status until it's complete, then download the result from downloads.

Key options

  • Inputs: usually a file, sometimes a YouTube link, depending on project type

  • Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes

  • Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt

Cost
Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.

For detailed examples, see the product page.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), end_seconds (required), start_seconds (required), name, +1 more. Returns: Success

face_swap_photo_create_imageAInspect

Create a face swap photo. Each photo costs 10 credits. The height/width of the output image depends on your subscription. Please refer to our pricing page for more details

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), name. Returns: Success

fetch_audio_downloadAInspect

Fetch a audio downloads[n].url from a completed audio project and return it as inline MCP audio content for compatible clients. Pass the exact full signed URL from downloads[n].url without trimming query parameters; expires_at is separate metadata, not part of the URL.

Inputs: download_url (required), max_bytes.

fetch_image_downloadAInspect

Fetch a image downloads[n].url from a completed image project and return it as inline MCP image content for compatible clients. Pass the exact full signed URL from downloads[n].url without trimming query parameters; expires_at is separate metadata, not part of the URL.

Inputs: download_url (required), max_bytes.

fetch_video_downloadAInspect

Fetch a video downloads[n].url from a completed video project and return it as an embedded MCP binary resource for compatible clients. Pass the exact full signed URL from downloads[n].url without trimming query parameters; expires_at is separate metadata, not part of the URL.

Inputs: download_url (required), max_bytes.

head_swap_create_imageAInspect

Swap a head onto a body image. Each image costs 10 credits. Output resolution depends on your subscription; you may set max_resolution lower than your plan maximum if desired.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), name, max_resolution. Returns: Success

image_background_remover_create_imageAInspect

Remove background from image. Each image costs 5 credits.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), name. Returns: Success

image_projects_deleteAInspect

Permanently delete the rendered image(s). This action is not reversible, please be sure before deleting.

Inputs: id (required).

image_projects_retrieve_detailsAInspect

Check the progress of a image project. The downloads field is populated after a successful render.

Statuses

  • queued — waiting to start

  • rendering — in progress

  • complete — ready; see downloads

  • error — a failure occurred (see error)

  • canceled — user canceled

  • draft — not used

MCP guidance:

  • Use this after a create tool to poll job status. When status is complete, surface the downloads URLs to the user; if status is error, surface the error message.

  • Each downloads[n].url is already the full signed download URL. Use it exactly as returned. Do not shorten it, strip query parameters, or append expires_at onto the URL string.

Inputs: id (required). Returns: Success

image_to_video_create_videoAInspect

What this API does

Create the same Image To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.

Good for

  • Automation and batch processing

  • Adding image to video into apps, pipelines, or tools

How it works (3 steps)

  1. Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.

  2. Send a request to create a image to video job with the basic fields.

  3. Check the job status until it's complete, then download the result from downloads.

Key options

  • Inputs: usually a file, sometimes a YouTube link, depending on project type

  • Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes

  • Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt

Cost
Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.

For detailed examples, see the product page.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), end_seconds (required), name, audio, +3 more. Returns: Success

lip_sync_create_videoAInspect

What this API does

Create the same Lip Sync you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.

Good for

  • Automation and batch processing

  • Adding lip sync into apps, pipelines, or tools

How it works (3 steps)

  1. Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.

  2. Send a request to create a lip sync job with the basic fields.

  3. Check the job status until it's complete, then download the result from downloads.

Key options

  • Inputs: usually a file, sometimes a YouTube link, depending on project type

  • Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes

  • Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt

Cost
Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.

For detailed examples, see the product page.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), end_seconds (required), start_seconds (required), name, +2 more. Returns: Success

photo_colorizer_create_imageAInspect

Colorize image. Each image costs 10 credits.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: assets (required), name. Returns: Success

pingAInspect

Check that the Magic Hour MCP server is reachable.

Inputs: no named parameters. Returns: result

saved_items_listAInspect

Returns active saved items owned by the authenticated account, newest first. Each item includes every saved asset with a durable file_path for reuse in compatible generation APIs and a temporary signed URL for previewing or downloading. Filter by type to find characters, references, voices, moodboards, or brand kits. To fetch the next page, pass the response's next_cursor as cursor.

Inputs: type, limit, cursor. Returns: items, next_cursor

text_to_video_create_videoAInspect

What this API does

Create the same Text To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.

Good for

  • Automation and batch processing

  • Adding text to video into apps, pipelines, or tools

How it works (3 steps)

  1. Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.

  2. Send a request to create a text to video job with the basic fields.

  3. Check the job status until it's complete, then download the result from downloads.

Key options

  • Inputs: usually a file, sometimes a YouTube link, depending on project type

  • Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes

  • Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt

Cost
Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.

For detailed examples, see the product page.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

Inputs: style (required), end_seconds (required), name, audio, +3 more. Returns: Success

video_assets_generate_presigned_urlAInspect

Generates a list of pre-signed upload URLs for the assets required. This API is only necessary if you want to upload to Magic Hour's storage. Refer to the Input Files Guide for more details.

The response array will match the order of items in the request body.

Valid file extensions per asset type:

  • video: mp4, m4v, mov, webm

  • audio: mp3, wav, aac, flac, webm, weba, m4a, opus, ogg, oga, aiff, amr

  • image: png, jpg, jpeg, jfif, heic, heif, webp, avif, jp2, tiff, tif, bmp

  • gif: gif, webp, webm

Note: gif is only supported for face swap API video_file_path field.

Once you receive an upload URL, send a PUT request to upload the file directly.

Example:

curl -X PUT --data '@/path/to/file/video.mp4' \
  https://videos.magichour.ai/api-assets/id/video.mp4?<auth params from the API response>

MCP guidance:

  • This only creates presigned upload URLs. For local files, upload the raw bytes to each returned upload_url outside the generation call, then pass the matching file_path into the create tool.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: items (required). Returns: Success

video_projects_deleteAInspect

Permanently delete the rendered video. This action is not reversible, please be sure before deleting.

Inputs: id (required).

video_projects_retrieve_detailsAInspect

Check the progress of a video project. The downloads field is populated after a successful render.

Statuses

  • queued — waiting to start

  • rendering — in progress

  • complete — ready; see downloads

  • error — a failure occurred (see error)

  • canceled — user canceled

  • draft — not used

MCP guidance:

  • Use this after a create tool to poll job status. When status is complete, surface the downloads URLs to the user; if status is error, surface the error message.

  • Each downloads[n].url is already the full signed download URL. Use it exactly as returned. Do not shorten it, strip query parameters, or append expires_at onto the URL string.

Inputs: id (required). Returns: Success

video_to_video_create_videoAInspect

What this API does

Create the same Video To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.

Good for

  • Automation and batch processing

  • Adding video to video into apps, pipelines, or tools

How it works (3 steps)

  1. Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.

  2. Send a request to create a video to video job with the basic fields.

  3. Check the job status until it's complete, then download the result from downloads.

Key options

  • Inputs: usually a file, sometimes a YouTube link, depending on project type

  • Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes

  • Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt

Cost
Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.

For detailed examples, see the product page.

MCP guidance:

  • This starts an async video generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_video_project helper with the returned id, or poll the matching GET /v1/video-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Inputs: style (required), assets (required), end_seconds (required), start_seconds (required), +2 more. Returns: Success

wait_for_audio_projectAInspect

Poll an audio project until it completes, errors, is canceled, or times out. Returns the final project JSON and, when complete, attempts to inline audio downloads for Inspector or compatible clients. Returns sanitized download fields. Use exact_download_urls[n] or downloads[n].url exactly as returned; do not shorten it, remove query parameters, or append expiration metadata.

Inputs: id (required), timeout_seconds, max_inline_downloads, poll_interval_seconds, +2 more.

wait_for_image_projectAInspect

Poll an image project until it completes, errors, is canceled, or times out. Returns the final project JSON and, when complete, attempts to inline image downloads for Inspector or compatible clients. Returns sanitized download fields. Use exact_download_urls[n] or downloads[n].url exactly as returned; do not shorten it, remove query parameters, or append expiration metadata.

Inputs: id (required), timeout_seconds, max_inline_downloads, poll_interval_seconds, +2 more.

wait_for_video_projectAInspect

Poll a video project until it completes, errors, is canceled, or times out. Returns sanitized download fields. Use exact_download_urls[n] or downloads[n].url exactly as returned; do not shorten it, remove query parameters, or append expiration metadata.

Inputs: id (required), timeout_seconds, max_inline_downloads, poll_interval_seconds, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 45 tools

    Disambiguation4/5

    Each tool targets a distinct media generation task (e.g., text_to_video vs image_to_video) or lifecycle operation (create vs retrieve vs delete). Some related tools like face_swap_photo_create_image, head_swap_create_image, and body_swap_create_image are similar but descriptions clarify their specific inputs. The main risk is the large number of video/image creation tools, but the descriptions are distinct enough.

    Naming Consistency2/5

    Naming follows multiple inconsistent patterns: some use 'ai_' prefixes (ai_image_generator_create_image), some use domain prefixes (video_projects_retrieve_details), some use feature-based prefixes (text_to_video_create_video), and a few are standalone (ping, saved_items_list). The verb_noun structure varies (e.g., 'create_video' vs 'retrieve_details' vs 'delete'). This lack of a uniform convention makes it harder for an agent to predict tool names.

    Tool Count3/5

    With 45 tools, this is on the heavy side. The server covers a wide range of media generation features (video, image, audio) plus lifecycle utilities (upload, create, poll, wait, delete, fetch), which justifies many tools, but the count is high and near the threshold where agents may struggle to choose. It's borderline appropriate but not excessively bloated.

    Completeness4/5

    The server provides a complete lifecycle for each media type: presigned upload URLs, creation tools, retrieval of project details, wait helpers, download fetching, and deletion. There are also utilities for saved items, account info, and face detection. Minor gaps include no explicit list-projects tool (only saved items) and no cancel/update operations, but these are not essential for the core generation workflow.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers