Skip to main content
Use Google ADK’s native Streamable HTTP toolset with Magic Hour’s hosted MCP server. This walkthrough discovers tools, checks API authorization, and reads an existing image project’s status. It calls no model and needs no Google Cloud account or Gemini API key.

Install and configure

Requires Python 3.11+. Install the versions verified together:
Provide a Magic Hour API key through your server-side secret manager as MAGIC_HOUR_API_KEY. Set MAGIC_HOUR_IMAGE_PROJECT_ID to the saved ID of an image project you already created. Keep keys, account responses, and temporary download URLs private.

Discover tools and check an existing project

Save this as your application’s Python entry point. The example uses a real in-memory ADK session and tool context, then closes the MCP toolset and deletes the session.
Tool discovery is public; the separate account_retrieve call verifies API authorization. ADK returns an MCP result envelope, so the example checks errors and extracts metadata before reading the project status. It does not print private account details or download URLs. Native validation discovered 48 tools, verified authenticated account access, and read a completed image project using its existing ID. The toolset closed and the in-memory session was deleted. This was metadata-only validation: no media download, Agent, Runner, model, or generation was run.

Continue with an agent

A model-driven ADK agent needs its own model-provider configuration, which this walkthrough does not test. Generation tools send authorized prompts and media to Magic Hour and spend credits. Persist every accepted project ID before waiting. A timeout does not cancel a job; read its saved ID again instead of automatically repeating a paid creation. See Magic Hour MCP for uploads, generation, and downloads, our privacy policy, and the official ADK toolset source.