io.github.maginaryai/maginary-mcp is an MCP server published by io.github.maginaryai, hosted at mcp.maginary.ai. When last checked on 2026-11-22 it was working: it answers and lists its tools. It declares 16 tools, including list_parameters, search_parameters, get_parameter, generate, get_generation.
AI image + video generation for agents: --flag prompt DSL, async generate/poll, x402 pay-per-use.
Nothing else in the archive shares these values.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
List Maginary prompt-DSL parameters. Args: category: Restrict to one category (e.g. ``composition``, ``video``, ``model``, ``outpaint``). Call with no filters once — the response's ``categories`` / ``statuses`` maps are the full taxonomy. status: Restrict to one status (``live``, ``mostly-dead``, ``unimplemented``). include_reserved: When False (default) drop ``unimplemented`` (recognized-but-blocked) parameters from the result. Returns: A dict with ``count``, ``source`` (``live`` vs. ``bundled-snapshot``), ``categories`` / ``statuses`` (the filter taxonomy), and ``parameters`` (the array of matching entries).
| Parameter | Type | Description |
|---|---|---|
| status | any | Filter by status: live, mostly-dead, or unimplemented. |
| category | any | Filter by category, e.g. composition, video, model, outpaint. |
| include_reserved | boolean | Include unimplemented (blocked) parameters. |
{
"name": "list_parameters",
"title": "List parameters",
"description": "List Maginary prompt-DSL parameters.\n\n Args:\n category: Restrict to one category (e.g. ``composition``, ``video``,\n ``model``, ``outpaint``). Call with no filters once — the response's\n ``categories`` / ``statuses`` maps are the full taxonomy.\n status: Restrict to one status (``live``, ``mostly-dead``,\n ``unimplemented``).\n include_reserved: When False (default) drop ``unimplemented``\n (recognized-but-blocked) parameters from the result.\n\n Returns:\n A dict with ``count``, ``source`` (``live`` vs. ``bundled-snapshot``),\n ``categories`` / ``statuses`` (the filter taxonomy), and ``parameters``\n (the array of matching entries).\n ",
"inputSchema": {
"type": "object",
"title": "list_parametersArguments",
"properties": {
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Status",
"default": null,
"description": "Filter by status: live, mostly-dead, or unimplemented."
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Category",
"default": null,
"description": "Filter by category, e.g. composition, video, model, outpaint."
},
"include_reserved": {
"type": "boolean",
"title": "Include Reserved",
"default": false,
"description": "Include unimplemented (blocked) parameters."
}
}
},
"outputSchema": {
"type": "object",
"title": "list_parametersDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Text-search over parameter names, aliases, descriptions, values, examples. Args: query: Substring match, case-insensitive. category: Optional single-category restriction. include_reserved: Whether to include ``unimplemented`` parameters. Returns: Dict with ``count``, ``source`` (``live`` vs. ``bundled-snapshot``), and ``parameters`` (ordered as they appear in the catalog).
| Parameter | Type | Description |
|---|---|---|
| query * | string | Search term (case-insensitive substring match). |
| category | any | Filter by category, e.g. composition, video, model. |
| include_reserved | boolean | Include unimplemented (blocked) parameters. |
{
"name": "search_parameters",
"title": "Search parameters",
"description": "Text-search over parameter names, aliases, descriptions, values, examples.\n\n Args:\n query: Substring match, case-insensitive.\n category: Optional single-category restriction.\n include_reserved: Whether to include ``unimplemented`` parameters.\n\n Returns:\n Dict with ``count``, ``source`` (``live`` vs. ``bundled-snapshot``),\n and ``parameters`` (ordered as they appear in the catalog).\n ",
"inputSchema": {
"type": "object",
"title": "search_parametersArguments",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"title": "Query",
"description": "Search term (case-insensitive substring match)."
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Category",
"default": null,
"description": "Filter by category, e.g. composition, video, model."
},
"include_reserved": {
"type": "boolean",
"title": "Include Reserved",
"default": false,
"description": "Include unimplemented (blocked) parameters."
}
}
},
"outputSchema": {
"type": "object",
"title": "search_parametersDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Return the full record for a single parameter (canonical name or alias). Args: name: Parameter name with or without leading ``--`` (e.g. ``ar``, ``--ar``, ``aspect``). Case-insensitive. Returns: The parameter dict. Not-found is an ``isError`` result — surface it rather than fabricating a param.
| Parameter | Type | Description |
|---|---|---|
| name * | string | Parameter name with or without --, e.g. ar, --ar, aspect. |
{
"name": "get_parameter",
"title": "Get parameter",
"description": "Return the full record for a single parameter (canonical name or alias).\n\n Args:\n name: Parameter name with or without leading ``--`` (e.g. ``ar``,\n ``--ar``, ``aspect``). Case-insensitive.\n\n Returns:\n The parameter dict. Not-found is an ``isError`` result — surface it\n rather than fabricating a param.\n ",
"inputSchema": {
"type": "object",
"title": "get_parameterArguments",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "Parameter name with or without --, e.g. ar, --ar, aspect."
}
}
},
"outputSchema": {
"type": "object",
"title": "get_parameterDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Kick off a generation via POST /api/gens/. Args: prompt: The user's words, passed through as-is. Do NOT add flags the user did not ask for — no ``--ar``, no ``--flagship``, no model flags. Every extra flag costs credits; adding them unrequested is wrong. Standard quality is the default and is cheap; ``--flagship`` is ~4× more expensive and must only be used when the user explicitly asks for best quality. If the user asks about quality or aspect ratio: ask them first (standard vs flagship, landscape vs portrait) before generating. Flags go at the END, only when the user asked: ``--1``/``--2``/``--3``/``--4`` = image count (default 4), ``--ar 16:9`` = aspect ratio, ``--flagship`` = best quality. Unknown flag: call ``get_parameter(name)`` first — never guess. Examples — user says "a fox": prompt is ``"a fox"``. User says "a fox, landscape, best quality": prompt is ``"a fox --ar 16:9 --flagship"``. **Image-to-image (img2img):** Place one or more public image URLs in the prompt, followed by editing instructions: ``"https://cdn.example.com/photo.webp reimagine as oil painting --ar 16:9"`` The engine extracts URLs automatically and switches to img2img mode. Multiple URLs trigger multi-input mode (compositing/combining). Use ``upload_image`` first if images aren't already hosted. **Image-to-video:** Place an image URL in the prompt AND add ``--mp4`` plus video flags (``--5sec``, ``--1080p``). Or use ``execute_action`` with ``action_type="img2vid_basic"`` on a completed generation's image. **Style reference (--sref) is NOT img2img:** ``--sref <url>`` copies the visual *style* of a reference image (colors, mood, composition) without using the image content as input. A bare URL in the prompt edits the actual image; ``--sref`` transfers style. callback_url: Optional HTTPS URL that will receive a webhook when the generation reaches done / failed. See https://maginary.ai/blog/webhooks-guide for signature verification. Returns: On success, the created generation record. Key fields: ``uuid`` (use to poll), ``action_type``, ``processing_state``, ``expected_output_count``. On failure, an ``isError`` result instead (nothing is raised), with a JSON body whose ``error`` field is one of: - ``"auth"`` — no/invalid API key. Surface the message directly to the human. - ``"payment_required"`` — out of credits. The body carries ``billing_url`` and top-level x402 fields (``accepts``, ``resource``): either send the human to ``billing_url`` to top up, or pay programmatically via x402 (settle ``accepts[0]`` with USDC on Base and retry). - ``"demo_not_found"`` — ``--demo`` prompt has no matching seeded generation. ``available_demos`` lists valid prompts. - ``"failed"`` — anything else (invalid prompt, rate limit, backend or network error); see ``message``. x402 over MCP: a ``payment_required`` result also carries the x402 fields at the top level (``accepts``, ``resource``); an x402-capable client signs ``accepts[0]`` and calls this tool again with the payment in ``_meta["x402/payment"]``. The settled call returns the generation with ``x402_receipt`` (and ``_meta["x402/payment-response"]``); a wallet's first settlement creates its account. Subsequent requests use wallet-signed auth headers (X-Wallet-Address/Signature/Timestamp) or pass an API key as ``_meta["maginary/api_key"]``. Every flag that exists, and its state: Flags, live (35): --ar, --output-count (--1/--2/--
Fetch a generation by UUID (GET /api/gens/{uuid}/). Args: uuid: The UUID returned by ``generate``. Returns: The full generation record. If terminal, ``image_urls[]`` holds the finished outputs and ``processing_result.slots[]`` the per-slot detail. NOTE: a generation that failed server-side is a SUCCESSFUL tool call returning ``processing_state: "failed"`` — always check the state, never infer success from the absence of a tool error. **Follow-up actions:** A completed generation's ``processing_result.available_actions`` maps slot indices to valid action types. E.g. ``{"0": ["upscale_2x", "vary_strong", ...], "global": ["reroll"]}``. Use ``execute_action`` with the ``uuid``, a chosen ``action_type``, and the ``parent_image_index`` (the slot key as an int) to run an action. Hosted: a key obtained mid-session may be passed as ``_meta["maginary/api_key"]``.
| Parameter | Type | Description |
|---|---|---|
| uuid * | string | Generation UUID from generate or execute_action. |
{
"name": "get_generation",
"title": "Get generation",
"description": "Fetch a generation by UUID (GET /api/gens/{uuid}/).\n\n Args:\n uuid: The UUID returned by ``generate``.\n\n Returns:\n The full generation record. If terminal, ``image_urls[]`` holds the\n finished outputs and ``processing_result.slots[]`` the per-slot detail.\n NOTE: a generation that failed server-side is a SUCCESSFUL tool call\n returning ``processing_state: \"failed\"`` — always check the state,\n never infer success from the absence of a tool error.\n\n **Follow-up actions:** A completed generation's\n ``processing_result.available_actions`` maps slot indices to valid\n action types. E.g. ``{\"0\": [\"upscale_2x\", \"vary_strong\", ...],\n \"global\": [\"reroll\"]}``. Use ``execute_action`` with the ``uuid``,\n a chosen ``action_type``, and the ``parent_image_index`` (the slot\n key as an int) to run an action.\n\n Hosted: a key obtained mid-session may be passed as\n ``_meta[\"maginary/api_key\"]``.\n ",
"inputSchema": {
"type": "object",
"title": "get_generationArguments",
"required": [
"uuid"
],
"properties": {
"uuid": {
"type": "string",
"title": "Uuid",
"description": "Generation UUID from generate or execute_action."
}
}
},
"outputSchema": {
"type": "object",
"title": "get_generationDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Poll ``get_generation`` on a backoff until it reaches done / failed. Args: uuid: The UUID returned by ``generate``. timeout_s: Return after this many seconds even if still running. Default 45 stays under the 60 s per-call limit most MCP clients enforce; a ``timeout`` result just means "call again". Only raise it (e.g. for video) on clients you know allow long tool calls. Returns: The terminal generation record — which includes generations that failed server-side: those are SUCCESSFUL tool calls returning ``processing_state: "failed"`` with empty ``image_urls``, so always check the state. On tool failure, an ``isError`` result whose ``error`` field is ``"timeout"`` (``message`` names the last observed state — the generation keeps running server-side and can be re-fetched with ``get_generation`` later), ``"auth"``, or ``"failed"``. **Follow-up actions:** A ``done`` generation's ``processing_result.available_actions`` maps slot indices to valid action types — e.g. ``{"0": ["upscale_2x", "vary_strong", "pan_left", "zoom_out_1_5x", "img2img_basic", "img2img_inpaint", "img2vid_basic", ...], "global": ["reroll"]}``. Use ``execute_action`` with the ``uuid``, a chosen ``action_type``, and the ``parent_image_index`` (the slot key as an int) to run an action on a specific output image.
| Parameter | Type | Description |
|---|---|---|
| uuid * | string | Generation UUID to poll. |
| timeout_s | number | Max seconds to wait before returning a timeout result. |
{
"name": "wait_for_generation",
"title": "Wait for generation",
"description": "Poll ``get_generation`` on a backoff until it reaches done / failed.\n\n Args:\n uuid: The UUID returned by ``generate``.\n timeout_s: Return after this many seconds even if still running.\n Default 45 stays under the 60 s per-call limit most MCP clients\n enforce; a ``timeout`` result just means \"call again\". Only raise\n it (e.g. for video) on clients you know allow long tool calls.\n\n Returns:\n The terminal generation record — which includes generations that\n failed server-side: those are SUCCESSFUL tool calls returning\n ``processing_state: \"failed\"`` with empty ``image_urls``, so always\n check the state. On tool failure, an ``isError`` result whose\n ``error`` field is ``\"timeout\"`` (``message`` names the last\n observed state — the generation keeps running server-side and can be\n re-fetched with ``get_generation`` later), ``\"auth\"``, or\n ``\"failed\"``.\n\n **Follow-up actions:** A ``done`` generation's\n ``processing_result.available_actions`` maps slot indices to valid\n action types — e.g. ``{\"0\": [\"upscale_2x\", \"vary_strong\",\n \"pan_left\", \"zoom_out_1_5x\", \"img2img_basic\", \"img2img_inpaint\",\n \"img2vid_basic\", ...],\n \"global\": [\"reroll\"]}``. Use ``execute_action`` with the ``uuid``, a chosen\n ``action_type``, and the ``parent_image_index`` (the slot key as an\n int) to run an action on a specific output image.\n ",
"inputSchema": {
"type": "object",
"title": "wait_for_generationArguments",
"required": [
"uuid"
],
"properties": {
"uuid": {
"type": "string",
"title": "Uuid",
"description": "Generation UUID to poll."
},
"timeout_s": {
"type": "number",
"title": "Timeout S",
"default": 45,
"description": "Max seconds to wait before returning a timeout result."
}
}
},
"outputSchema": {
"type": "object",
"title": "wait_for_generationDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Upload a local image and get a CDN URL for img2img or ``--sref``. Only available on local (stdio) connections. On hosted/remote connections, place an existing image URL directly in the prompt. Place the returned ``url`` in a ``generate`` prompt: ``generate("https://cdn.maginary.ai/…/photo.webp reimagine as oil painting")`` Args: file_path: Path to an image file on disk (JPEG, PNG, WebP, HEIC). filename: Original filename. Inferred from ``file_path`` if omitted. Returns: Dict with ``url`` (the public CDN URL), ``exists`` (deduplicated), ``credits_deducted``, and ``message``.
| Parameter | Type | Description |
|---|---|---|
| filename | any | Override filename. Inferred from file_path if omitted. |
| file_path * | string | Path to a local image (JPEG, PNG, WebP, HEIC). |
{
"name": "upload_image",
"title": "Upload image",
"description": "Upload a local image and get a CDN URL for img2img or ``--sref``.\n\n Only available on local (stdio) connections. On hosted/remote\n connections, place an existing image URL directly in the prompt.\n\n Place the returned ``url`` in a ``generate`` prompt:\n ``generate(\"https://cdn.maginary.ai/…/photo.webp reimagine as oil painting\")``\n\n Args:\n file_path: Path to an image file on disk (JPEG, PNG, WebP, HEIC).\n filename: Original filename. Inferred from ``file_path`` if omitted.\n\n Returns:\n Dict with ``url`` (the public CDN URL), ``exists`` (deduplicated),\n ``credits_deducted``, and ``message``.\n ",
"inputSchema": {
"type": "object",
"title": "upload_imageArguments",
"required": [
"file_path"
],
"properties": {
"filename": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Filename",
"default": null,
"description": "Override filename. Inferred from file_path if omitted."
},
"file_path": {
"type": "string",
"title": "File Path",
"description": "Path to a local image (JPEG, PNG, WebP, HEIC)."
}
}
},
"outputSchema": {
"type": "object",
"title": "upload_imageDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Run a follow-up action on a completed generation's image. After ``generate`` → ``wait_for_generation``, the response's ``processing_result.available_actions`` lists what's possible per slot. Call this tool with one of those action types. Args: generation_uuid: UUID of the parent generation (from ``generate``). action_type: One of the values from ``available_actions`` — e.g. ``"upscale_2x"``, ``"upscale_1_5x"``, ``"vary_strong"``, ``"vary_subtle"``, ``"pan_left"``, ``"pan_right"``, ``"pan_up"``, ``"pan_down"``, ``"zoom_out_2x"``, ``"zoom_out_1_5x"``, ``"img2img_basic"``, ``"img2img_inpaint"``, ``"img2vid_basic"``, ``"reroll"``. parent_image_index: The slot index of the image to act on (0, 1, 2, or 3 for a 4-image grid). Required for per-slot actions; omit for ``"reroll"`` (global action). prompt: Required for ``img2img_basic``, where it is the edit instruction (e.g. ``"make the hat red"``; flags such as ``--2`` or ``--flagship`` may follow it), and for ``img2img_inpaint``, where it is the instruction followed by ``--mask <shapes>`` (e.g. ``"make the hat red --mask rect(.2,.1 .8,.4)"``; the instruction may be empty to just redo the area). Optional otherwise: for ``vary_*`` you can steer the variation with a new prompt; for ``img2vid_basic`` you can describe the desired motion. callback_url: Optional webhook URL (same as ``generate``). Returns: The newly created child generation record (same shape as ``generate``'s return — poll it with ``wait_for_generation``). On failure, same ``isError`` contract as ``generate``: ``"auth"``, ``"payment_required"`` (with x402 challenge), or ``"failed"``.
| Parameter | Type | Description |
|---|---|---|
| prompt | any | Prompt for the action. Required for img2img_basic (the edit instruction) and img2img_inpaint (the instruction, which may be empty, plus --mask <shapes>); optional replacement prompt for vary/img2vid. |
| action_type * | string | Action from available_actions, e.g. upscale_2x, vary_strong, img2img_basic, img2img_inpaint, img2vid_basic, reroll. |
Create a new Maginary account for the given email address. Returns the auto-generated password — display it to the user ONCE so they can save it. A verification email is sent; the user must click the link before the account can generate images. After verification, use ``manage_api_key(action='create')`` with ``email`` + ``password`` to get an API key, then ``configure_api_key`` to activate it. Args: email: The user's email address. Returns: Dict with ``email``, ``password``, and ``message``. On failure, an ``isError`` result — e.g. ``error: "already_exists"`` (email taken: ask the user for their password or a different email), ``"rate_limited"``, or ``"failed"``.
| Parameter | Type | Description |
|---|---|---|
| email * | string | Email address for the new account. |
{
"name": "create_account",
"title": "Create account",
"description": "Create a new Maginary account for the given email address.\n\n Returns the auto-generated password — display it to the user ONCE so they\n can save it. A verification email is sent; the user must click the link\n before the account can generate images.\n\n After verification, use ``manage_api_key(action='create')`` with\n ``email`` + ``password`` to get an API key, then ``configure_api_key``\n to activate it.\n\n Args:\n email: The user's email address.\n\n Returns:\n Dict with ``email``, ``password``, and ``message``. On failure, an\n ``isError`` result — e.g. ``error: \"already_exists\"`` (email taken:\n ask the user for their password or a different email),\n ``\"rate_limited\"``, or ``\"failed\"``.\n ",
"inputSchema": {
"type": "object",
"title": "create_accountArguments",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"title": "Email",
"description": "Email address for the new account."
}
}
},
"outputSchema": {
"type": "object",
"title": "create_accountDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}Create (or access) a Maginary account using a wallet signature. Sign the message ``Maginary: authenticate <address> at <timestamp>. This does not move funds.`` with EIP-191 ``personal_sign`` and pass all three values. On success, an API key is returned immediately — no email verification needed. Use this when you have a wallet but no email. The returned ``api_key`` should be passed as ``Authorization: Bearer <key>`` in the MCP client config, or via ``configure_api_key`` (stdio) / ``_meta["maginary/api_key"]`` (hosted, per-call). If the wallet already has an account, returns the existing account with a fresh API key. Args: address: EVM wallet address (0x..., 42 chars). signature: Hex-encoded EIP-191 personal_sign of the auth message. timestamp: Unix epoch seconds used in the signed message (must be within the last 5 minutes). Returns: Dict with ``address``, ``api_key`` (full key — show once), ``key_prefix``, ``created`` (bool), ``message``. On failure: ``isError`` with ``error`` = ``"validation"``, ``"signature_failed"``, or ``"rate_limited"``.
| Parameter | Type | Description |
|---|---|---|
| address * | string | EVM wallet address (0x..., 42 chars). |
| signature * | string | Hex EIP-191 personal_sign of the auth message. |
| timestamp * | integer | Unix epoch seconds used in the signed message. |
{
"name": "create_wallet_account",
"title": "Create wallet account",
"description": "Create (or access) a Maginary account using a wallet signature.\n\n Sign the message ``Maginary: authenticate <address> at <timestamp>.\n This does not move funds.`` with EIP-191 ``personal_sign`` and pass all\n three values. On success, an API key is returned immediately — no email\n verification needed.\n\n Use this when you have a wallet but no email. The returned ``api_key``\n should be passed as ``Authorization: Bearer <key>`` in the MCP client\n config, or via ``configure_api_key`` (stdio) / ``_meta[\"maginary/api_key\"]``\n (hosted, per-call).\n\n If the wallet already has an account, returns the existing account with\n a fresh API key.\n\n Args:\n address: EVM wallet address (0x..., 42 chars).\n signature: Hex-encoded EIP-191 personal_sign of the auth message.\n timestamp: Unix epoch seconds used in the signed message (must be\n within the last 5 minutes).\n\n Returns:\n Dict with ``address``, ``api_key`` (full key — show once),\n ``key_prefix``, ``created`` (bool), ``message``.\n On failure: ``isError`` with ``error`` = ``\"validation\"``,\n ``\"signature_failed\"``, or ``\"rate_limited\"``.\n ",
"inputSchema": {
"type": "object",
"title": "create_wallet_accountArguments",
"required": [
"address",
"signature",
"timestamp"
],
"properties": {
"address": {
"type": "string",
"title": "Address",
"description": "EVM wallet address (0x..., 42 chars)."
},
"signature": {
"type": "string",
"title": "Signature",
"description": "Hex EIP-191 personal_sign of the auth message."
},
"timestamp": {
"type": "integer",
"title": "Timestamp",
"description": "Unix epoch seconds used in the signed message."
}
}
},
"outputSchema": {
"type": "object",
"title": "create_wallet_accountDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": true
}
}Check account verification status, credit balance, and API key count. Use this after ``create_account`` to poll whether the user has clicked the verification link. Pass ``email`` + ``password`` (from ``create_account``) for Basic auth, or omit both to use the configured API key. Args: email: Account email (for Basic auth). password: Account password (for Basic auth). Returns: Dict with ``verified`` (bool), ``email``, ``api_key_count``, ``credits_remaining``, ``uploads_remaining``.
| Parameter | Type | Description |
|---|---|---|
| any | Account email (for Basic auth). Omit to use API key. | |
| password | any | Account password (for Basic auth). |
{
"name": "check_account_status",
"title": "Check account status",
"description": "Check account verification status, credit balance, and API key count.\n\n Use this after ``create_account`` to poll whether the user has clicked the\n verification link. Pass ``email`` + ``password`` (from ``create_account``)\n for Basic auth, or omit both to use the configured API key.\n\n Args:\n email: Account email (for Basic auth).\n password: Account password (for Basic auth).\n\n Returns:\n Dict with ``verified`` (bool), ``email``, ``api_key_count``,\n ``credits_remaining``, ``uploads_remaining``.\n ",
"inputSchema": {
"type": "object",
"title": "check_account_statusArguments",
"properties": {
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Email",
"default": null,
"description": "Account email (for Basic auth). Omit to use API key."
},
"password": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Password",
"default": null,
"description": "Account password (for Basic auth)."
}
}
},
"outputSchema": {
"type": "object",
"title": "check_account_statusDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Create, list, or revoke Maginary API keys (up to 10 per account). Auth: pass ``email`` + ``password`` for Basic auth (onboarding), or omit both to use the configured API key (normal operation). Args: action: One of ``create``, ``list``, ``revoke``. name: Key name (required for ``create``). key_prefix: 8-char prefix of the key to revoke (required for ``revoke``). email: Account email (for Basic auth). password: Account password (for Basic auth). Returns: For ``create``: dict with ``raw_key`` (the full key — show once, then use ``configure_api_key`` to activate it), ``key_prefix``, ``name``. For ``list``: dict with ``keys`` array. For ``revoke``: success/error message.
| Parameter | Type | Description |
|---|---|---|
| name | any | Key name (required for create). |
| any | Account email (for Basic auth). | |
| action * | string | One of: create, list, revoke. |
| password | any | Account password (for Basic auth). |
| key_prefix | any | 8-char prefix of key to revoke (required for revoke). |
{
"name": "manage_api_key",
"title": "Manage API key",
"description": "Create, list, or revoke Maginary API keys (up to 10 per account).\n\n Auth: pass ``email`` + ``password`` for Basic auth (onboarding), or omit\n both to use the configured API key (normal operation).\n\n Args:\n action: One of ``create``, ``list``, ``revoke``.\n name: Key name (required for ``create``).\n key_prefix: 8-char prefix of the key to revoke (required for ``revoke``).\n email: Account email (for Basic auth).\n password: Account password (for Basic auth).\n\n Returns:\n For ``create``: dict with ``raw_key`` (the full key — show once, then\n use ``configure_api_key`` to activate it), ``key_prefix``, ``name``.\n For ``list``: dict with ``keys`` array.\n For ``revoke``: success/error message.\n ",
"inputSchema": {
"type": "object",
"title": "manage_api_keyArguments",
"required": [
"action"
],
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Name",
"default": null,
"description": "Key name (required for create)."
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Email",
"default": null,
"description": "Account email (for Basic auth)."
},
"action": {
"type": "string",
"title": "Action",
"description": "One of: create, list, revoke."
},
"password": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Password",
"default": null,
"description": "Account password (for Basic auth)."
},
"key_prefix": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Key Prefix",
"default": null,
"description": "8-char prefix of key to revoke (required for revoke)."
}
}
},
"outputSchema": {
"type": "object",
"title": "manage_api_keyDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": true
}
}Activate an API key. Local (stdio) servers persist it; hosted does not. Call this after ``manage_api_key(action='create')`` returns a ``raw_key``. On a local server the key is saved to ``~/.config/maginary/api_key`` (chmod 600) and survives restarts. On the hosted server (mcp.maginary.ai) nothing can be stored — auth is per-request: the response will say ``persisted: false`` and the key must be sent as an ``Authorization: Bearer <key>`` header on every request (set it in the MCP client's connection config). Args: api_key: The full API key string returned by ``manage_api_key``. Returns: Confirmation dict.
| Parameter | Type | Description |
|---|---|---|
| api_key * | string | Full API key string from manage_api_key. |
{
"name": "configure_api_key",
"title": "Configure API key",
"description": "Activate an API key. Local (stdio) servers persist it; hosted does not.\n\n Call this after ``manage_api_key(action='create')`` returns a ``raw_key``.\n On a local server the key is saved to ``~/.config/maginary/api_key``\n (chmod 600) and survives restarts. On the hosted server\n (mcp.maginary.ai) nothing can be stored — auth is per-request: the\n response will say ``persisted: false`` and the key must be sent as an\n ``Authorization: Bearer <key>`` header on every request (set it in the\n MCP client's connection config).\n\n Args:\n api_key: The full API key string returned by ``manage_api_key``.\n\n Returns:\n Confirmation dict.\n ",
"inputSchema": {
"type": "object",
"title": "configure_api_keyArguments",
"required": [
"api_key"
],
"properties": {
"api_key": {
"type": "string",
"title": "Api Key",
"description": "Full API key string from manage_api_key."
}
}
},
"outputSchema": {
"type": "object",
"title": "configure_api_keyDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}List available Maginary products/plans with pricing. No authentication required. Use this to present purchase options to the user. The ``novice_pack`` ($10, 150 credits) is the recommended starting point. Returns: Dict with ``count`` and ``products`` — each product carries ``id``, ``short_name``, ``title``, ``description``, ``price_cents``, ``credits``, ``uploads``, ``is_subscription``. (The backend sends a bare array; it is wrapped here because FastMCP validates tool output against the dict annotation and rejects a top-level list.)
No parameters.
{
"name": "get_products",
"title": "Get products",
"description": "List available Maginary products/plans with pricing.\n\n No authentication required. Use this to present purchase options to the\n user. The ``novice_pack`` ($10, 150 credits) is the recommended starting\n point.\n\n Returns:\n Dict with ``count`` and ``products`` — each product carries ``id``,\n ``short_name``, ``title``, ``description``, ``price_cents``,\n ``credits``, ``uploads``, ``is_subscription``. (The backend sends a\n bare array; it is wrapped here because FastMCP validates tool output\n against the dict annotation and rejects a top-level list.)\n ",
"inputSchema": {
"type": "object",
"title": "get_productsArguments",
"properties": {}
},
"outputSchema": {
"type": "object",
"title": "get_productsDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Create a Stripe checkout session for purchasing a product. Returns a ``checkout_url`` — the user must open it in a browser to complete payment. After payment, credits are provisioned automatically via webhook. **Present the URL exactly as returned, including the ``#fragment`` — do not truncate, reformat, or strip any part of it.** If the agent has a USDC wallet, skip this entirely — just call ``generate`` and the x402 protocol handles payment on-chain. Args: product_id: Product ID from ``get_products``. email: Account email (for Basic auth during onboarding). password: Account password (for Basic auth during onboarding). Returns: Dict with ``checkout_url``. On failure, an ``isError`` result — e.g. ``error: "email_not_verified"`` until the user clicks the verification link, or ``"auth"`` / ``"failed"``.
| Parameter | Type | Description |
|---|---|---|
| any | Account email (for Basic auth during onboarding). | |
| password | any | Account password (for Basic auth). |
| product_id * | integer | Product ID from get_products. |
{
"name": "checkout",
"title": "Create checkout link",
"description": "Create a Stripe checkout session for purchasing a product.\n\n Returns a ``checkout_url`` — the user must open it in a browser to\n complete payment. After payment, credits are provisioned automatically\n via webhook. **Present the URL exactly as returned, including the\n ``#fragment`` — do not truncate, reformat, or strip any part of it.**\n\n If the agent has a USDC wallet, skip this entirely — just call\n ``generate`` and the x402 protocol handles payment on-chain.\n\n Args:\n product_id: Product ID from ``get_products``.\n email: Account email (for Basic auth during onboarding).\n password: Account password (for Basic auth during onboarding).\n\n Returns:\n Dict with ``checkout_url``. On failure, an ``isError`` result — e.g.\n ``error: \"email_not_verified\"`` until the user clicks the\n verification link, or ``\"auth\"`` / ``\"failed\"``.\n ",
"inputSchema": {
"type": "object",
"title": "checkoutArguments",
"required": [
"product_id"
],
"properties": {
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Email",
"default": null,
"description": "Account email (for Basic auth during onboarding)."
},
"password": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Password",
"default": null,
"description": "Account password (for Basic auth)."
},
"product_id": {
"type": "integer",
"title": "Product Id",
"description": "Product ID from get_products."
}
}
},
"outputSchema": {
"type": "object",
"title": "checkoutDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}Check remaining credits and uploads for the authenticated account. Args: email: Account email (for Basic auth). password: Account password (for Basic auth). Returns: Dict with ``credits_remaining`` and ``uploads_remaining``.
| Parameter | Type | Description |
|---|---|---|
| any | Account email (for Basic auth). | |
| password | any | Account password (for Basic auth). |
{
"name": "get_balance",
"title": "Get balance",
"description": "Check remaining credits and uploads for the authenticated account.\n\n Args:\n email: Account email (for Basic auth).\n password: Account password (for Basic auth).\n\n Returns:\n Dict with ``credits_remaining`` and ``uploads_remaining``.\n ",
"inputSchema": {
"type": "object",
"title": "get_balanceArguments",
"properties": {
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Email",
"default": null,
"description": "Account email (for Basic auth)."
},
"password": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Password",
"default": null,
"description": "Account password (for Basic auth)."
}
}
},
"outputSchema": {
"type": "object",
"title": "get_balanceDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": true,
"idempotentHint": true,
"destructiveHint": false
}
}Maginary (spelled M-A-G-I-N-A-R-Y, not 'imaginary') is a Midjourney-style AI image + video generator with a `--flag` prompt DSL and an async HTTP API. **New users (no API key yet) — pick the shortest path:** - **USDC wallet (fastest):** Just call `generate` with your prompt. The 402 response prices the generation; settle it on-chain (x402, USDC on Base) and your account is created automatically. - **Wallet auth (no email):** `create_wallet_account` → returns an API key immediately, no email verification. - **Email:** `create_account` → user clicks verification email → `manage_api_key(action='create')` → `configure_api_key` → `get_products` → `checkout`. The $10 novice_pack is the recommended starting point. API key creation and checkout require a verified email. **Prompt rules (IMPORTANT):** Pass the user's words as-is. Do NOT add flags the user did not ask for — no ``--ar``, no ``--flagship``, no model flags, nothing. Flags cost money; adding them without asking is a UX failure. Before the FIRST generation in a conversation, briefly mention the quality option once: standard (default, cheap) or flagship (best, ~4× more expensive) — then generate with whatever they choose, or standard if they don't care. After that, never ask again unless they bring it up. Do NOT ask about aspect ratio — omit ``--ar`` by default; square format gives the most diversity and is the best starting point. Only add ``--ar`` when the user explicitly mentions landscape, portrait, widescreen, etc. Flags go at the END of the prompt. ``--1``/``--2``/``--3``/``--4`` = image count (default 4; only if user specifies). ``--ar 16:9`` = aspect ratio (only if user explicitly asks). ``--flagship`` = best quality (only if user explicitly wants it). Unknown flag: call ``get_parameter(name)`` — never guess. **Every flag that exists, and its state:** Flags, live (35): --ar, --output-count (--1/--2/--3/--4), --seed, --transparent, --sref, --sw, --png, --jpg, --webp, --svg, --2k, --4k, --upscale, --vary, --varysubtle, --varystrong, --panleft, --panright, --panup, --pandown, --zoomout, --mp4, --video-resolution (--480p/--540p/--720p/--1024p/--1080p/--2160p / --4k (4k, Seedance 2 Pro)/--480p24 / --480p24fps/--540p24 / --540p24fps/--720p24 / --720p24fps/--1024p30 / --1024p30fps/--1080p24 / --1080p24fps), --video-fps (--24fps/--30fps/--50fps/--60fps), --video-duration (--4s / --4sec/--5s / --5sec/--6s / --6sec/--8s / --8sec/--10s / --10sec/--12s / --12sec), --flagship, --sora, --soralite, --nanobananapro, --nb2, --gpt2, --gpt2high, --seedance2, --seedance2pro, --demo. Partial (4, only some models honour them): --no, --zoomout2x, --zoomoutexpand, --zoomoutexpand2x. Reserved (2, the parser rejects them): --cref, --cw. Any other --flag is rejected with `Unrecognized parameter`. Details: `get_parameter(name)`. **Existing users:** Use `search_parameters` / `get_parameter` to discover which flags exist before building a prompt. Use `generate` to kick off a generation, then `wait_for_generation` (or a webhook callback) to fetch the resulting image / video URLs. Flags whose status is `dead`, `mostly-dead`, or `unimplemented` should be avoided. **Image editing (img2img):** Place image URLs directly in the prompt (e.g. `https://cdn.maginary.ai/…/photo.webp reimagine as watercolor`). If the user already has a URL, use it directly. On local (stdio) connections, `upload_image(file_path=...)` reads a file from disk and returns a CDN URL. `--sref <url>` is style-only, not img2img. To edit an image from an earlier generation no URL is needed: run the `img2img_basic` action on it with the instruction as `prompt`. To change only part of an image, add `--mask <shapes>` to the prompt (or run the `img2img_inpaint` action): shapes in 0–1 image coordinates such as `rect(.2,.1 .8,.4)`, `ellipse(.5,.5 .2,.3)`, `poly(x,y …)`, `stroke(width x,y …)`, `;`-separated, a leading `-` erases; the rest of the image stays untouched and the result keeps the image's size. The marked part is rendered at up
Names, descriptions and schemas were written by the server and are shown as data.
Pattern matches on what the server declares. They show what it says it can do, not what it does.
None yet. Changes appear after a server's second daily check.
| Parameter | Type | Description |
|---|---|---|
| prompt * | string | The user's words as-is, flags at the end. Do NOT add flags the user did not ask for. |
| callback_url | any | HTTPS webhook URL for done/failed notifications. |
{
"name": "generate",
"title": "Generate image or video",
"description": "Kick off a generation via POST /api/gens/.\n\n Args:\n prompt: The user's words, passed through as-is. Do NOT add flags the\n user did not ask for — no ``--ar``, no ``--flagship``, no model\n flags. Every extra flag costs credits; adding them unrequested is\n wrong. Standard quality is the default and is cheap; ``--flagship``\n is ~4× more expensive and must only be used when the user\n explicitly asks for best quality.\n\n If the user asks about quality or aspect ratio: ask them first\n (standard vs flagship, landscape vs portrait) before generating.\n\n Flags go at the END, only when the user asked:\n ``--1``/``--2``/``--3``/``--4`` = image count (default 4),\n ``--ar 16:9`` = aspect ratio, ``--flagship`` = best quality.\n Unknown flag: call ``get_parameter(name)`` first — never guess.\n\n Examples — user says \"a fox\": prompt is ``\"a fox\"``.\n User says \"a fox, landscape, best quality\":\n prompt is ``\"a fox --ar 16:9 --flagship\"``.\n\n **Image-to-image (img2img):** Place one or more public image URLs\n in the prompt, followed by editing instructions:\n ``\"https://cdn.example.com/photo.webp reimagine as oil painting --ar 16:9\"``\n The engine extracts URLs automatically and switches to img2img mode.\n Multiple URLs trigger multi-input mode (compositing/combining).\n Use ``upload_image`` first if images aren't already hosted.\n\n **Image-to-video:** Place an image URL in the prompt AND add\n ``--mp4`` plus video flags (``--5sec``, ``--1080p``). Or use\n ``execute_action`` with ``action_type=\"img2vid_basic\"`` on a\n completed generation's image.\n\n **Style reference (--sref) is NOT img2img:** ``--sref <url>``\n copies the visual *style* of a reference image (colors, mood,\n composition) without using the image content as input. A bare URL\n in the prompt edits the actual image; ``--sref`` transfers style.\n\n callback_url: Optional HTTPS URL that will receive a webhook when the\n generation reaches done / failed. See\n https://maginary.ai/blog/webhooks-guide for signature verification.\n\n Returns:\n On success, the created generation record. Key fields: ``uuid`` (use\n to poll), ``action_type``, ``processing_state``,\n ``expected_output_count``.\n\n On failure, an ``isError`` result instead (nothing is raised), with a\n JSON body whose ``error`` field is one of:\n\n - ``\"auth\"`` — no/invalid API key. Surface the message directly to\n the human.\n - ``\"payment_required\"`` — out of credits. The body carries\n ``billing_url`` and top-level x402 fields (``accepts``,\n ``resource``): either send the human to ``billing_url`` to top up,\n or pay programmatically via x402 (settle ``accepts[0]`` with USDC\n on Base and retry).\n - ``\"demo_not_found\"`` — ``--demo`` prompt has no matching seeded\n generation. ``available_demos`` lists valid prompts.\n - ``\"failed\"`` — anything else (invalid prompt, rate limit, backend\n or network error); see ``message``.\n\n x402 over MCP: a ``payment_required`` result also carries the x402\n fields at the top level (``accepts``, ``resource``); an x402-capable\n client signs ``accepts[0]`` and calls this tool again with the payment\n in ``_meta[\"x402/payment\"]``. The settled call returns the generation\n with ``x402_receipt`` (and ``_meta[\"x402/payment-response\"]``); a\n wallet's first settlement creates its account. Subsequent requests\n use wallet-signed auth headers (X-Wallet-Address/Signature/Timestamp)\n or pass an API key as ``_meta[\"maginary/api_key\"]``.\n\nEvery flag that exists, and its state: Flags, live (35): --ar, --output-count (--1/--2/--",
"inputSchema": {
"type": "object",
"title": "generateArguments",
"required": [
"prompt"
],
"properties": {
"prompt": {
"type": "string",
"title": "Prompt",
"description": "The user's words as-is, flags at the end. Do NOT add flags the user did not ask for."
},
"callback_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Callback Url",
"default": null,
"description": "HTTPS webhook URL for done/failed notifications."
}
}
},
"outputSchema": {
"type": "object",
"title": "generateDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}| callback_url | any | HTTPS webhook URL for done/failed notifications. |
| generation_uuid * | string | UUID of the parent generation. |
| parent_image_index | any | Slot index (0-3) of the image to act on. Omit for global actions like reroll. |
{
"name": "execute_action",
"title": "Run action on image",
"description": "Run a follow-up action on a completed generation's image.\n\n After ``generate`` → ``wait_for_generation``, the response's\n ``processing_result.available_actions`` lists what's possible per slot.\n Call this tool with one of those action types.\n\n Args:\n generation_uuid: UUID of the parent generation (from ``generate``).\n action_type: One of the values from ``available_actions`` — e.g.\n ``\"upscale_2x\"``, ``\"upscale_1_5x\"``, ``\"vary_strong\"``,\n ``\"vary_subtle\"``, ``\"pan_left\"``, ``\"pan_right\"``,\n ``\"pan_up\"``, ``\"pan_down\"``, ``\"zoom_out_2x\"``,\n ``\"zoom_out_1_5x\"``, ``\"img2img_basic\"``, ``\"img2img_inpaint\"``,\n ``\"img2vid_basic\"``, ``\"reroll\"``.\n parent_image_index: The slot index of the image to act on (0, 1,\n 2, or 3 for a 4-image grid). Required for per-slot actions;\n omit for ``\"reroll\"`` (global action).\n prompt: Required for ``img2img_basic``, where it is the edit\n instruction (e.g. ``\"make the hat red\"``; flags such as ``--2``\n or ``--flagship`` may follow it), and for ``img2img_inpaint``,\n where it is the instruction followed by ``--mask <shapes>``\n (e.g. ``\"make the hat red --mask rect(.2,.1 .8,.4)\"``; the\n instruction may be empty to just redo the area). Optional otherwise: for\n ``vary_*`` you can steer the variation with a new prompt; for\n ``img2vid_basic`` you can describe the desired motion.\n callback_url: Optional webhook URL (same as ``generate``).\n\n Returns:\n The newly created child generation record (same shape as\n ``generate``'s return — poll it with ``wait_for_generation``).\n\n On failure, same ``isError`` contract as ``generate``:\n ``\"auth\"``, ``\"payment_required\"`` (with x402 challenge),\n or ``\"failed\"``.\n ",
"inputSchema": {
"type": "object",
"title": "execute_actionArguments",
"required": [
"generation_uuid",
"action_type"
],
"properties": {
"prompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Prompt",
"default": null,
"description": "Prompt for the action. Required for img2img_basic (the edit instruction) and img2img_inpaint (the instruction, which may be empty, plus --mask <shapes>); optional replacement prompt for vary/img2vid."
},
"action_type": {
"type": "string",
"title": "Action Type",
"description": "Action from available_actions, e.g. upscale_2x, vary_strong, img2img_basic, img2img_inpaint, img2vid_basic, reroll."
},
"callback_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Callback Url",
"default": null,
"description": "HTTPS webhook URL for done/failed notifications."
},
"generation_uuid": {
"type": "string",
"title": "Generation Uuid",
"description": "UUID of the parent generation."
},
"parent_image_index": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Parent Image Index",
"default": null,
"description": "Slot index (0-3) of the image to act on. Omit for global actions like reroll."
}
}
},
"outputSchema": {
"type": "object",
"title": "execute_actionDictOutput",
"additionalProperties": true
},
"annotations": {
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}