How to integrate Magic Hour MCP with Atomic Agent

Connect Atomic Agent to Magic Hour MCP. Generate three 16:9 hero image variations, create 30-second promo video from script, and more using natural language, with authentication handled for you.

Magic Hour logoMagic Hour
Api Key

Magic Hour is an AI media creation platform for generating and editing images, videos, and audio through a unified API. It streamlines multimedia production so teams can programmatically create and iterate on visual and audio assets faster.

38 Tools

Introduction

Atomic Agent is an open-source AI agent that runs on your machine and supports local models through llama.cpp. Connect it to 1,500+ apps through Composio, including Magic Hour.

This guide uses Atomic Agent's built-in Composio integration. You need Atomic Agent v0.5.6 or later, your own Composio API key, and a Magic Hour account. See the Atomic Agent documentation for installation instructions.

Also integrate Magic Hour with

How Atomic Agent connects to Magic Hour

Atomic Agent connects to Composio's Tool Router over Streamable HTTP MCP. It discovers the tools needed for your request, and Composio handles account authentication.

Execution and account-connection tools follow Atomic Agent's configured approval policy. Review any approval prompt before allowing an action on your connected account.

Connect Magic Hour to Atomic Agent

  1. Sign up or sign in to the Composio dashboard. Copy your API key.
  2. In Atomic Agent, open the Integrations tab and select Composio. Select API key, press e, paste the key, and press Enter. The tools become available immediately, without a restart.
  3. Ask Atomic Agent to do something in Magic Hour. It searches Composio for the right tool.
  4. On first use, open the sign-in link returned in the chat. Connect your Magic Hour account, then return to Atomic Agent to continue.

Headless setup

Add the following line to ~/.atomic-agent/.env, replacing YOUR_COMPOSIO_API_KEY with your key. Start Atomic Agent after saving the file.

bash
COMPOSIO_API_KEY=YOUR_COMPOSIO_API_KEY

What is the Magic Hour MCP server, and what's possible with it?

The Magic Hour MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Magic Hour account. It provides structured and secure access so your agent can perform Magic Hour operations on your behalf.

Use Magic Hour from Atomic Agent

With your account connected, ask Atomic Agent to work with Magic Hour in natural language. You can connect more apps through the same Composio integration as you need them.

Visit the Atomic Agent website or inspect the Atomic Agent source code.

Troubleshooting

Why is my API key rejected?

Copy the key directly from the Composio dashboard. Atomic Agent requires ASCII characters because it sends the key in an HTTP header. Remove any extra characters introduced when copying.

Why are Composio tools unavailable after saving a key?

Check that you use Atomic Agent v0.5.6 or later and that Composio is enabled in your configuration. A "composio": { "enabled": false } setting disables the integration while keeping the saved key on disk.

Does Composio have a free plan?

The Hobby plan includes 100,000 tool calls per month. Composio-managed OAuth apps have a lower included allowance. See Composio pricing for the current limits that apply to your connection.

TOOLS

Supported Tools

Every Magic Hour action and event your agent gets out of the box.

Create AI Clothes Change

Start a credit-consuming asynchronous clothes-change image job from person and garment images.

Create AI Face Edit

Start a credit-consuming asynchronous edit of facial features in an image.

Create AI GIF

Start a credit-consuming asynchronous prompt-based animation in GIF, MP4, or WebM format.

Create AI Headshot

Start a credit-consuming asynchronous headshot generation from an image containing one detectable face.

Create AI Image

Start a credit-consuming asynchronous text-to-image job.

Create AI Image Edit

Start a credit-consuming asynchronous prompt-based edit of one or more images.

Create AI Meme

Start a credit-consuming asynchronous meme generation from a topic and a documented Magic Hour template.

Create AI QR Code

Start an asynchronous artistic QR-code generation for supplied content.

Create AI Video Edit

Start a credit-consuming asynchronous prompt-based edit of an input video.

Create AI Voice

Start credit-consuming asynchronous speech generation from text using a documented preset voice.

Create AI Voice Clone

Start credit-consuming asynchronous speech generation by cloning an input voice recording.

Create Animation Video

Start one credit-consuming asynchronous animation render with explicit dimensions, frame rate, duration, style, and assets.

Create Audio-to-Video

Start a credit-consuming asynchronous video generation job from audio and optional visual style controls.

Create Background Removal

Start a credit-consuming asynchronous image job that removes a background or replaces it with an optional supplied image.

Create Body Swap

Start a credit-consuming asynchronous body-swap image job that places a person into a scene at the selected resolution.

Create Character Animation Video

Animate a reference character with motion transferred from a source video in a credit-consuming asynchronous job.

Create Character Replacement Video

Replace a source-video subject with a reference character in a credit-consuming asynchronous video job.

Create Face Swap Photo

Start a credit-consuming asynchronous photo face swap using one source face for all detected faces or up to five individual face mappings.

Create Face Swap Video

Start a credit-consuming asynchronous video face-swap job using one image for all detected faces or up to five individual face mappings.

Create Head Swap

Start a credit-consuming asynchronous head-swap image job from body and head images.

Create Image-to-Video

Start a credit-consuming asynchronous video generation job from a still image and optional final frame, prompt, audio, model, and resolution controls.

Create Image Upscale

Start a credit-consuming asynchronous 2x or 4x image upscale.

Create Lip Sync Video

Start a credit-consuming asynchronous lip-sync video job from audio and a file or YouTube video.

Create Photo Colorization

Start a credit-consuming asynchronous colorization of a photo.

Create Subtitled Video

Start a credit-consuming asynchronous job that transcribes speech and burns styled subtitles into an MP4 video.

Create Talking Photo

Start a credit-consuming asynchronous talking-photo video from an image and audio.

Create Text-to-Video

Start a credit-consuming asynchronous video generation job from a text prompt and model/output options.

Create Video-to-Video

Start a credit-consuming asynchronous stylized transformation of an input video.

Delete Audio Project

Permanently delete one rendered Magic Hour audio project by ID.

Delete Image Project

Permanently delete one Magic Hour image project and its rendered images by ID.

Delete Video Project

Permanently delete one rendered Magic Hour video project by ID.

Detect Faces

Start asynchronous face detection for an image or video and return a task ID.

Generate Asset Upload URLs

Generate ordered, expiring signed upload URLs and Magic Hour file paths for image, video, or audio assets.

Get Account

Return the connected Magic Hour account's tier, available credits, identity, and subscription details; use this before generation to check entitlement and balance.

Get Audio Project

Get an audio project's asynchronous status, error, credit charge, and temporary downloads.

Get Face Detection

Get face-detection status and detected face paths by task ID.

Get Image Project

Get an image project's asynchronous status, error, credit charge, and temporary downloads.

Get Video Project

Get a video project's asynchronous status, error, credit charge, and temporary downloads.

FAQ

Frequently asked questions

With a standalone Magic Hour MCP server, the agents and LLMs can only access a fixed set of Magic Hour tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Magic Hour and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. Atomic Agent fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Magic Hour tools.

Yes, absolutely. You can configure which Magic Hour scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Magic Hour data and credentials are handled as safely as possible.

Start with Magic Hour.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Magic Hour tool your agent needs.Free to start.

Start building