A remote Model Context Protocol server. It exposes the MalGomo agency dashboard
(revenue KPIs, fan growth, earnings), broadcast drafting, feedback tickets and the Media Studio
(AI image/video generation) as tools for an AI agent. It is a thin wrapper over the backend REST at
https://api.malgomo.com — all authentication, agency scoping and the permission gates (owner/admin for the
dashboard tools, the per-member is_dev grant for the ticket tools, the per-member
media_studio_access grant for the Media Studio tools) live in the backend; this server only
carries your token. This server is NOT purely read-only: the two generation tools
(malgomo_generate_image, malgomo_generate_video, malgomo_generate_voice) immediately spend real money from the
logged-in user's media budget — see section 5.
| Method & path | Purpose |
|---|---|
POST /mcp | The MCP endpoint (JSON-RPC over Streamable HTTP). Connect your client here. |
GET /mcp | Server-to-client event stream for an open session (used by the MCP client). |
DELETE /mcp | Ends an MCP session. |
GET /healthz | Liveness probe — returns {"status":"ok","service":…,"version":…}. The version tells a landed deploy from a queued one. |
GET / · GET /docs | This documentation page. |
When OAuth is enabled (PUBLIC_URL set), the server also serves the standard OAuth
endpoints — /authorize (sign-in page), /oauth/login, /token,
/register (Dynamic Client Registration), /revoke — plus discovery metadata at
/.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource/mcp.
Your MCP client uses these automatically; you do not call them by hand.
Authentication uses your normal MalGomo CRM email + password. There are two modes:
A) OAuth at connect (recommended, when the server has PUBLIC_URL set). When you add the
connector, the client discovers the login and opens a sign-in page in your browser. You log in once;
the client stores the token and refreshes it automatically — no per-chat login. The /mcp endpoint
requires a valid bearer token in this mode.
B) In-chat tool (when OAuth is off). Session-based — log in once per connection via the
malgomo_login tool, then every data tool works without re-auth:
POST /mcp (it performs the MCP initialize handshake and gets a session id).malgomo_login tool with your MalGomo email and password.https://xgifdbzqplddpeobtwtw.supabase.co) for a short-lived token, stores it
for this session only, and probes whether your account may read dashboard data.malgomo_get_kpis / malgomo_get_fans / malgomo_get_earnings / malgomo_get_broadcasts.The token auto-refreshes on expiry while the connection is open. Credentials are used once
and never stored — only the resulting token lives in memory for the session. Disconnecting (or
malgomo_logout) clears it.
Access level: dashboard data is owner/admin only. A member account can
log in but will get forbidden on the data tools. The Media Studio tools are different:
they also work for members that carry the media_studio_access grant (enforced server-side).
C) Access token (machines, e.g. a content factory). Create a long-lived token
(mgm_pat_…) in art.malgomo.com → Settings, and send it as
Authorization: Bearer mgm_pat_… on /mcp — no login, no OAuth round trip, works in both
modes. The token is checked once against the backend (invalid, expired or revoked tokens get 401 and never open a
session; a revocation takes effect within about a minute). A token session exposes only the Media Studio
tools (no KPI, broadcast, ticket or login tools), runs as the token's owner (role, Media Studio access, budget and
daily limit all still apply), is never refreshed, and every paid generation must carry a
client_token (400 client_token_required otherwise).
Log in with email + password. Verifies once per session.
| Param | Type | Notes |
|---|---|---|
email | string | Your MalGomo CRM email. |
password | string | Your CRM password. Used once, never stored. |
Reports whether the connection is logged in, as whom, and the token expiry. No arguments.
Clears the session token from this connection. No arguments.
Which build is serving: {mcp: {name, version, tools: {count, names, params}}, backend: {service, build_sha, started_at} | {error}}. mcp.tools is what this server really offers over tools/list (all tool names, plus the parameter names of the schedule / vault-folder tools) - compare it with the tool list your client shows to spot a stale or filtered tool schema.
Use it to tell a landed deploy from a queued one, and include it in any bug report. The backend half is read
from its public /version endpoint with a 5 s timeout — an unreachable backend answers
{error} rather than failing the call. No arguments.
Agency-wide net payout revenue for the chosen period, plus agency economics after per-creator cost cuts.
Returns: hero_net_eur, currency, mobile_period, kpi_period,
revenue_by_category_eur, hourly_revenue_current, daily_revenue_current,
creator_count, total_agency_earnings_eur, margin_percent,
per_creator[] {profile_name, total_eur, gross_eur, agency_earnings_eur, cut_percent, breakdown[] {label, percentage, base, amount_eur}, fetched_at},
latest_fetched_at.
Economics are owner/admin only (absent for members). base="gross" = % of gross; base="agency" = % of the remaining agency share after gross-based items. cut_percent is the share of gross removed; the agency keeps 100 - cut_percent. Use the euro figures directly.
OnlyFans revenue per linked creator (Infloww). Days are UTC calendar days (Infloww's own cut). Periods: today, yesterday, this_week, last_week, this_month, last_month (7d / 30d are aliases).
Returns: creators[] {profile_name, net_usd, net_eur, fx_rate_usd_eur, fx_rate_date, by_type_usd, daily[], latest_transaction_at, data_freshness, validated, notice},
total_net_usd, total_net_eur, range, validated.
A missing, stale (> 3 h for periods including today) or incomplete number is null with a notice, never 0. EUR is converted per day at that day's ECB rate.
Top fans by OnlyFans net revenue plus the latest transactions. Arguments: period, min_amount_usd, creator, limit.
Returns: top_fans[], recent_transactions[], fx_rate_usd_eur, fx_rate_date, notice.
Mirrored from the MalGomo desktop app (synced_at per creator, stale after 2 h). Days are UTC. A click counts at most once per person per day; a fan is attributed when they act within 7 days after the click and stays attributed while active (30 days). new_fans = "Interaktionen" in the Maloum UI. Revenue excludes shop purchases and is null with revenue_unit: "unit_unverified" until its unit is confirmed. URL: https://app.maloum.com/creator/<username>?ref=<code>.
malgomo_get_tracking_links (read) — creator?, period? (all_time | today | yesterday | this_week | last_week | this_month | last_month) or from+to (UTC days, summed from daily values), include_archived?.malgomo_get_tracking_link_daily (read) — creator?, link_id?, from, to; missing_days are unknown, not 0.malgomo_get_tracking_link_fans (read) — link_id, limit? (default 50).malgomo_get_fan_tracking_link (read) — creator + fan_id or username.malgomo_create_tracking_link / malgomo_rename_tracking_link (write — owner/admin) — filed as an intent that a desktop app with the creator's Maloum session executes; the tool waits up to 30 s. Names max 40 characters. Duplicate-safe (deterministic idempotency key, never auto-retried). 409 writes_disabled = not switched on yet (desktop update needed).malgomo_archive_tracking_link (write — PERMANENT) — needs confirm_irreversible: true; Maloum has no unarchive and no delete.malgomo_get_tracking_link_intent_result (read) — state of a request (pending | claimed | done | failed | unknown). On pending/unknown: do not call the write tool again, poll this one.malgomo_resolve_tracking_link_intent (write — owner/admin) — marks an unknown request done/failed after a human checked Maloum.Fan growth across the agency.
Returns: period, totals {free, sub, total}, new_today_total,
new_in_period {free, sub, total}, daily_new[] {at, new_free, new_sub},
per_creator[] {profile_name, free, sub, total, new_today}, profile (the resolved scope), generated_at.
Earnings from the payout database.
Returns: period, currency, period_totals {gross, net}, month {gross, net, fee},
daily[] {at, gross, net}, transactions[] {kind, title, fan, net, gross, at, profile_name},
per_creator[] {profile_name, gross, net}, generated_at.
The configured per-creator cost stack (advisory %, creator %, …), independent of revenue. Owner/admin only. The period argument is ignored.
Returns: currency, creators[] {profile_name, cost_stack[] {label, percentage, base, sort_order}, effective_cut_percent}.
base="gross" = % of gross; base="agency" = % of the remaining agency share. effective_cut_percent is the share of gross the stack removes at any revenue; the agency keeps 100 - effective_cut_percent.
Per-broadcast (mass message / Massennachricht) performance for the agency's creators, scraped into the broadcast database. Owner/admin only.
Returns a JSON list of rows: {fingerprint, profile_name, sent_at_iso, sent_date, date_raw, recipients, views, buyers, caption, media_count, media_type, price_cents, recalled, revenue_cents, send_to_lists, exclude_from_lists, recipients_scraped_at}. revenue_cents is the derived revenue (price×buyers); recalled flags a recalled broadcast; send_to_lists / exclude_from_lists are the recipient lists (Senden an / Nicht senden an).
The agency's reusable chat scripts (message templates), the same ones usable as Massennachrichten. Owner/admin only. The period argument is ignored.
Returns: categories[] {scripts[] {title, message_text, ppv_price, vault_media_id, vault_media_folder_name, creator_profiles, tags}}, a flat tags[], and total_scripts.
Placeholders in message_text (e.g. {fan_name}) are left visible and are NOT auto-substituted — a script with an unresolved placeholder must be resolved to literal text before it can be loaded as a broadcast.
Maps a saved script to a broadcast plan and shows exactly what would be sent, without queuing anything. Owner/admin only. Rejects a script whose message_text still has an unresolved placeholder.
| Param | Type | Notes |
|---|---|---|
profile_name | string | Required. The creator the broadcast is for, e.g. katewagner; a display name like "Kate Wagner" is also accepted. The draft is stored under the resolved name. |
script_id | number | Required. The saved script to load (see malgomo_get_scripts). |
sendToLists | string[] | Required, ≥1. Recipient lists (Senden an). |
excludeLists | string[]? | Lists to exclude (Nicht senden an). |
schedule | object? | {mode:"now"} or {mode:"scheduled", dayLabel, hour, minute}. dayLabel: ISO YYYY-MM-DD (recommended), today/tomorrow (also German), or DD.MM.YYYY. Europe/Vienna, minute only 0/15/30/45, not in the past, max 45 days ahead. Send the fixed date from the dry run when creating the draft. |
vaultMediaFolders | string[]? | Up to 3 EXACT Vault folder names. ALL media of these folders are attached; they are resolved when a human approves the draft in the desktop app (needs the creator's Maloum session), so such drafts cannot be approved on the web. Combines with script_id (script media + folder media). Folders containing voice messages or media without preview cannot be approved. Names are checked against the folder list synced from the desktop app (folder_check, see malgomo_list_vault_folders). |
Returns the resolved ComposePlan.
This does NOT send. An AI agent can draft but never fire a mass send. With dry_run=true (the default) it only returns the resolved plan and queues nothing; with dry_run=false it creates an intent with status="awaiting_approval" that a human must approve in the desktop app before it can fire. Owner/admin only.
| Param | Type | Notes |
|---|---|---|
profile_name | string | Required. |
script_id | number? | A saved script to load. Provide this OR message. |
message | object? | A literal message {message, vaultMediaIds?, priceCents?}. Provide this OR script_id. |
sendToLists | string[] | Required, ≥1. |
excludeLists | string[]? | Lists to exclude. |
schedule | object | Required. {mode:"now"} or {mode:"scheduled", dayLabel, hour, minute}. dayLabel: ISO YYYY-MM-DD (recommended), today/tomorrow (also German), or DD.MM.YYYY. Europe/Vienna, minute only 0/15/30/45, not in the past, max 45 days ahead. The response returns scheduled_for_vienna and the canonical plan.schedule. Also returns scheduled_date (the fixed Vienna date; send that, not "tomorrow", when creating after a dry run). A time must be at least 5 minutes ahead. Errors: schedule_unparseable, schedule_minute_invalid, schedule_weekday_mismatch, schedule_in_past, schedule_too_soon, schedule_too_far, schedule_dst_ambiguous. |
dry_run | boolean | Default true. false creates the awaiting-approval draft. |
expires_in_hours | number? | Auto-expire the draft if not approved in time. |
vaultMediaFolders | string[]? | Up to 3 EXACT Vault folder names. ALL media of these folders are attached; they are resolved when a human approves the draft in the desktop app (needs the creator's Maloum session), so such drafts cannot be approved on the web. Combines with script_id (script media + folder media). Folders containing voice messages or media without preview cannot be approved. Names are checked against the folder list synced from the desktop app (folder_check, see malgomo_list_vault_folders). |
confirm_unlisted_folders | string[]? | Up to 3 folder names, exactly as in vaultMediaFolders (case-insensitive). Only set after the human user has explicitly confirmed that a name is intended although the synced folder list does not vouch for it. Never set it on your own and never swap in a suggested name instead. Without it, a real draft (dry_run=false) with a folder_check status of unknown, ambiguous or case_mismatch is refused and nothing is queued. found and unchecked (no data / stale / read error) never block. |
Returns {intent_id, status, request_id, plan, scheduled_for, scheduled_for_vienna, warnings} when queued, or the same with dry_run:true on a dry run. warnings may contain price_dropped_no_media: a PPV price needs media (vaultMediaIds or vaultMediaFolders), otherwise it is not stored.
With vaultMediaFolders the response also carries folder_check[] {name, status, count, suggestions} (status: found, unknown, ambiguous, case_mismatch, unchecked) and needs_confirmation_for_folders. A dry run always returns the plan; when a name needs a decision it adds folder_check_notice. Suggestions are information for the user only, never adopt one automatically. warnings may additionally contain vault_folders_not_synced, vault_folders_stale, unknown_vault_folder, ambiguous_vault_folder.
Lists the active creator profiles: creators[] {name, slug}. name is the exact profile_name to use (e.g. katewagner); there is no separate display name. Owner/admin only.
Lists one creator's Vault folders as last synced from the MalGomo desktop app, newest first. Owner/admin only. Use the names exactly as listed for vaultMediaFolders.
| Param | Type | Notes |
|---|---|---|
profile_name | string | Required. Exact name from malgomo_list_creators. |
query | string? | Only folders whose name contains this text (case-insensitive). |
limit | number? | Default 50, max 200. |
Returns {profile_name, synced_at, stale, folder_total, folders[] {name, pictures, videos, total, created_at}}. synced_at (ISO or null) and stale show how old the data is. New folders only appear after the next desktop sync, which can take a while for big agencies, so a missing name is not proof that the folder does not exist. Never replace a missing name with a similar one on your own; ask the user.
Lists broadcast intents and their lifecycle (status, plan, result). Owner/admin only. Optional filters: profile_name, status.
Each intent may carry media_overlay: {excluded, added} (counts only, never the id lists): a human deselected excluded and added added media on the draft card in the desktop app. Missing or zeros mean the media are untouched. The media in plan (vaultMediaIds / vaultMediaFolders) are always the starting point you created, not the final set that will be sent. A draft with a non-empty media_overlay can only be approved in the desktop app (the web approval is locked). You cannot change media on an existing draft; if the user wants different media, point them to the draft card in the desktop app (they can deselect and add media there) or create a new draft with their consent.
Returns the verbatim ComposeSendResult for one intent once executed (and its status/plan before then). Owner/admin only. Param: intent_id (string, required).
Summarises the desktop's check of Maloum's real queue, done right after each scheduled broadcast was accepted: did the entry match the request (time, lists, media count, price) and is it unique? Returns counts per status, a coverage line and two tiers: real_problems (duplicate, mismatch) and unverified (not_visible, found_unverified), each with plain advice. It reports what the desktop saw at send time; it cannot open the live Maloum queue and changes nothing. Owner/admin only. Params: profile_name (optional), since_hours (default 24, max 168).
Cancels a queued intent, but only if it has not yet been claimed/executed (nothing was sent). Owner/admin only. Param: intent_id (string, required). Returns {ok, reason?}.
Lists feedback/bug tickets submitted from the MalGomo desktop app. Dev only (per-member is_dev grant), across all agencies.
| Param | Type | Notes |
|---|---|---|
status | string? | open (default), in_progress, resolved, closed, or all. |
limit | number? | Maximum tickets to return. |
Returns {tickets[] {id, agency_id, user_id, user_email, user_role, category, description, has_logs, logs_preview, image_count, video_count, app_version, platform, metadata, status, created_at, updated_at}}. Categories: bug | idea | question | other. List rows carry only a logs preview and the media counts — use malgomo_get_ticket for the full logs and the image/video URLs.
Returns one ticket in full, including the complete logs field, image_urls (signed URLs, valid ~7 days, for attached screenshots) and video_urls (signed URLs for attached screen recordings), directly fetchable without extra auth. Dev only. Param: ticket_id (string, required). 404 ticket_not_found for an unknown id.
Sets a ticket's status. Nothing is deleted and any status can be set again later. Dev only. Params: ticket_id (string, required), status (open | in_progress | resolved | closed, required). Returns the updated ticket.
These tools spend real money. malgomo_generate_image and
malgomo_generate_video / malgomo_generate_voice start a paid generation the moment the backend accepts them — no approval
step, no cancel. Protection is server-side: the per-user media budget, the model access list and the
client_token submit dedup. Available to owner/admin and to members with the
media_studio_access grant. All responses have the backend's context block (user/agency
ids) stripped, and inline base64 image outputs are replaced by a placeholder — view those in the app gallery.
Lists the available generation models, compacted: {providers, models[] {id, name, provider, kind,
description, aspect_ratios?, durations_s?, resolutions?, max_images?, supports, price_cents?, recommended?,
superseded_by?, price_model?}}. price_cents is the estimated cost per generation in cents (video:
per base duration, scaled with the requested seconds; token, megapixel and tiered models depend on resolution,
reference count or image size and are rounded up to whole cents — price_model names the type).
recommended marks the preferred model of a family, superseded_by the newer replacement.
Automatic entries (auto/<family>, provider auto) run on the cheapest provider that can
do the request and hand over to the next one if a provider fails; they add family, variants
(the concrete ids) and price_from_model, and the answer carries family_of (concrete id → auto entry).
Lipsync models (kind: lipsync) additionally carry input_field, sync_modes and
price_cents_per_second (cents per second of VIDEO, fractions possible, e.g. 8.3333; total rounded up once to whole cents).
Replace models (kind: replace) carry replace_family, min_duration_s, max_duration_s, resolutions + default_resolution (when there is a choice), supports_prompt, ui_key and the price field price_cents_per_second_by_resolution (cents per second of SOURCE video).
Param: kind (image | video | audio | upscale | lipsync | replace, optional filter).
The logged-in user's Media Studio budget: {status, budget} with budget =
null (unlimited, nothing configured) or {period_start, limit_cents, spent_cents,
remaining_cents, daily_limit_cents, spent_today_cents, remaining_today_cents, day, policy}. The month fields
cover the current month; daily_limit_cents / remaining_today_cents are null when
there is no daily cap (the day follows Europe/Vienna); policy:true means a standing limit is configured.
When a limit is reached, submits fail with 402 budget_exhausted (scope daily|monthly) and nothing is booked.
User/agency ids are stripped. No arguments.
The voices malgomo_generate_voice accepts:
{enabled, voices[] {voice_id, name, provider, scope, source?, creator_profile?, language?}, assigned, assigned_by_provider}.
scope is agency for this agency's own voices and stock for provider voices it may
assign from; source is the server's own label (stock | cloned | designed | imported).
assigned maps each creator_profile to the voice that speaks for it (the Cartesia default) — pass that profile
rather than a raw id. assigned_by_provider ({cartesia:{…}, elevenlabs:{…}}) shows which creators also
have a linked ElevenLabs voice and may therefore use the v4 models. enabled:false means voice is switched off agency-wide and every generation will
fail. Call this BEFORE generating: an id outside the list is rejected with voice_not_allowed.
Members need Media Studio access; assigning and cloning stay admin-only. No arguments.
Starts a paid image generation immediately. Do NOT retry automatically — on an unclear outcome check
malgomo_media_generations first, and resend the SAME client_token to recover that
attempt's job — one token maps to exactly one attempt (a failed attempt counts too); a deliberate new attempt
needs a NEW client_token. OpenRouter models return exactly 1 image per job; reference images
are capped server-side to the model's maximum; @slug mentions in the prompt pull in packs.
| Param | Type | Notes |
|---|---|---|
model_id | string | Required. From malgomo_media_models (kind image). |
prompt | string | Required, ≤32000 chars (only the Flare models take more than 4000; other models are cut server-side). @slug pulls in a pack. |
aspect_ratio | string? | Must be in the model's list. |
resolution | string? | e.g. 1K, 2K. |
image_size | string? | Provider-specific size token (fal). |
num_images | number? | 1–4; OpenRouter always yields 1. |
reference_image_urls | string[]? | ≤16 public URLs (see the upload tool). Capped per model; the job lists references_used / references_dropped. |
thinking_level | string? | minimal | medium | high — models with supports.thinking_level (Nano Banana 2.1). Slightly raises the estimate. |
output_format | string? | jpeg | png | webp | gif | svg (models that support it; Flare default jpeg). |
quality | string? | low | medium | high | xhigh | max | auto — GPT Image 2.6 Flare only (qualities in malgomo_media_models), default medium. |
reasoning_effort | string? | low | medium | high — Flare only, default medium. |
background | string? | auto | transparent | opaque — Flare only. |
mask_url | string? | https URL of a mask (Flare edit only): white = change, black = keep. |
markup_image_url | string? | https URL of a markup image (Flare edit only). |
client_token | string? | Idempotency token (1–64 chars, alnum/-/_). Required for access tokens. |
GPT Image 2.6 Flare (openai/gpt-image-2.6/flare/text-to-image, openai/gpt-image-2.6/flare/edit): @pack prompts work like Nano Banana 2.1 Edit — a routine only swaps the model_id. A field the model does not support is ignored and reported as a job warning. The price is an estimate (token-based: quality, image size, about 0.8 cents per reference image).
Returns the job row (cost_cents, cost_source estimate | computed, warnings). Images run asynchronously — track them with malgomo_media_wait.
Starts a paid video generation immediately. Same retry rules as the image tool. Without
duration_s the server uses the model's smallest duration; a duration outside the model's list is
rejected with unsupported_duration.
| Param | Type | Notes |
|---|---|---|
model_id | string | Required. From malgomo_media_models (kind video). |
prompt | string | Required, ≤4000 chars. |
duration_s | number? | Seconds (1–30); must be in the model's durations_s. |
aspect_ratio | string? | e.g. 16:9, 9:16. |
resolution | string? | Must be in the model's resolutions, e.g. 720p, 1080p, 2K (Hailuo 3). |
generate_audio | boolean? | Native audio track (supported models). |
start_image_url | string? | First frame (image-to-video). |
end_image_url | string? | Last frame — only together with start_image_url. |
reference_image_urls | string[]? | ≤7 public URLs. Capped per model. |
reference_video_urls | string[]? | ≤3 public video URLs (each ≤10 s) for models that take video references (Gemini Omni reference-to-video). |
client_token | string? | Idempotency token (1–64 chars, alnum/-/_). Required for access tokens. |
Enlarges one image with an upscale model (kind: upscale in malgomo_media_models). Same retry rules
as the generate tools; the price depends on megapixels and is rounded up to whole cents. Returns the job row.
| Param | Type | Notes |
|---|---|---|
model_id | string | Required. An upscale model. |
image_url | string? | Source URL. Exactly one of image_url / job_id. |
job_id | string? | Source: a finished job of yours. |
index | number? | Which output of job_id (default 0); only with job_id. |
upscale_factor | number? | Scale factor (range depends on the model). |
target_resolution | string? | e.g. 1080p, 2160p — instead of the factor. |
client_token | string? | Idempotency token. Required for access tokens. |
Re-animates the mouth of an existing video so it matches a supplied audio track (lipsync; models of kind: lipsync in
malgomo_media_models: fal-ai/sync-lipsync/v2 = default, fal-ai/sync-lipsync/v2/pro, veed/lipsync/v2).
Same retry rules as the generate tools (a 502 is never retried; resend the SAME client_token to get the already paid job back instead of paying twice).
The price is an estimate by seconds of video: sync v2 3 USD/min, sync v2/pro 5 USD/min, veed 0.07 USD/s — see
price_cents_per_second in malgomo_media_models. The server reads the video length itself, but only from MP4/MOV files.
Only sync mode cut_off is run: the longer track is cut to the shorter one, so the result is as long as the shorter of video and audio (a 10 s video with 1.75 s of audio gives a 1.75 s video) — to keep the whole video, supply audio at least as long as the video. Billing stays an estimate by video seconds (an upper bound; fal may bill by the output length). Max 180 s per job.
The result stays at fal for 14 days only — download the file yourself within 14 days;
malgomo_media_download does not secure fal links, it returns the link unchanged. Returns the job row (kind video_lipsync).
| Param | Type | Notes |
|---|---|---|
model_id | string | Required. A lipsync model. |
video_url | string? | Video source URL. Exactly one of video_url / video_job_id. |
video_job_id | string? | Video source: a finished video job of yours. |
video_index | number? | Which output of video_job_id (default 0); only with video_job_id. |
audio_url | string? | Audio URL. Exactly one of audio_url / audio_job_id. |
audio_job_id | string? | Audio source: a finished audio job of yours (e.g. a voice note). |
audio_index | number? | Which output of audio_job_id (default 0); only with audio_job_id. |
duration_s | number? | Optional. Length of the VIDEO in seconds (max 180); only needed when the server cannot read it (not MP4/MOV, or unreadable). A measured length wins. |
client_token | string? | Idempotency token. Required for access tokens. |
Replaces the person in an existing video with your own character picture (four models of kind: replace:
minimax/h3-max/recast = H3 Max Recast, recommended (made for this: tracks the people across shots, keeps motion/camera/cuts/sound, 5–30 s),
alibaba/wan-3.0/reference-to-video and alibaba/wan-3.0-prime/reference-to-video (Wan 3.0 / Prime, source 2–15 s; they generate a new video after the template, so background, sound and details can differ) and
Kling 4 kling/v4/video-to-video/edit (3–30 s); plus wan/3-0-video and wan/3-0-video-prime routed through Kie.ai: source 2–15 s, MP4/MOV up to 100 MB, resolutions in upper case, result kept 14 days, no cancel)). Same retry rules as the generate tools
(a 502 is never retried; resend the SAME client_token to get the already paid job back; 502 fal_job_unsaved → resubmit with a NEW token).
The price is an estimate per second of source video (the input video is billed too, so about twice fal's output rate): Wan 3.0 10 / 20 / 40 cents (480p / 720p / 1080p), Wan 3.0 Prime 13.6 / 28 / 56, H3 Recast 23.35 / 31.85 (768P / 1080P), Kling 4 18.8 / 28.2 (720p / 1080p).
A 10 s clip: Wan 3.0 at 720p 200 cents, H3 at 768P 234 cents.
The server measures the video length itself (MP4/MOV only; unreadable length is refused) — there is no duration_s / fps. Limits: see min_duration_s / max_duration_s per model.
The fal safety filter follows the platform default; use only your own AI characters and rights-cleared source videos.
The result stays at fal for 14 days only — download the file yourself within 14 days;
malgomo_media_download does not secure fal links, it returns the link unchanged. Returns the job row (kind video_lipsync).
| Param | Type | Notes |
|---|---|---|
model_id | string | Required. A lipsync model. |
video_url | string? | Video source URL. Exactly one of video_url / video_job_id. |
video_job_id | string? | Video source: a finished video job of yours. |
video_index | number? | Which output of video_job_id (default 0); only with video_job_id. |
audio_url | string? | Audio URL. Exactly one of audio_url / audio_job_id. |
audio_job_id | string? | Audio source: a finished audio job of yours (e.g. a voice note). |
audio_index | number? | Which output of audio_job_id (default 0); only with audio_job_id. |
duration_s | number? | Optional. Length of the VIDEO in seconds (max 180); only needed when the server cannot read it (not MP4/MOV, or unreadable). A measured length wins. |
client_token | string? | Idempotency token. Required for access tokens. |
Replaces the person in an existing video with your own character picture (models of kind: replace:
fal-ai/wan/v2.2-14b/animate/replace = default and cheapest, minimax/h3-max/recast (made for this: multi-shot, keeps motion/camera/cuts/sound, 5–30 s), Kling 3.0 (O3) fal-ai/kling-video/o3/standard|pro/video-to-video/edit (3–15 s) and Kling 4 kling/v4/video-to-video/edit / kling/v4/flash/video-to-video (3–30 s / 3–20 s)). Same retry rules as the generate tools
(a 502 is never retried; resend the SAME client_token to get the already paid job back; 502 fal_job_unsaved → resubmit with a NEW token).
The price is an estimate: Kling O3 Standard 12.6 / Pro 16.8 cents per second of video, H3 Recast about 23.4 / 31.9 (768P / 1080P, input video included), Kling 4 about 18.8 / 28.2 (720p / 1080p) and Flash 12.6 (input + output billed); Wan bills frames (16 frames = 1 billed second at 4/6/8 cents for 480p/580p/720p) and the frame rate is not read,
so Wan is reserved as if the video had 60 fps (a 30 fps clip at twice its price; slow motion above 60 fps costs more — re-encode to 30 fps). A 10 s clip at 480p is reserved at 150 cents.
The server measures the video length itself (MP4/MOV only; unreadable length is refused) — there is no duration_s / fps. Limits: see min_duration_s / max_duration_s per model (Wan 1–15 s is our own cap).
The fal safety filter follows the platform default; use only your own AI characters and rights-cleared source videos.
The result stays at fal for 14 days only — download it yourself. Returns the job row (kind video_replace).
| Param | Type | Notes |
|---|---|---|
model_id | string | Required. A replace model. |
video_url / video_job_id (+ video_index) | string / string / number | Exactly one video source. |
image_url / image_job_id (+ image_index) | string / string / number | Exactly one character picture. |
resolution | string? | One of the model's resolutions (any letter case); default = default_resolution. |
prompt | string? | Optional. Kling 4: @Element1 = the character, @Video1 = the source (@ImageN unsupported); Wan 3: positional (Video 1 / Image 1), default prompt built in; H3 Recast: free text, who becomes whom. Max 2000 chars. |
client_token | string? | Idempotency token. Required for access tokens. |
Starts a paid text-to-speech voice note (kind audio_tts). model_id picks the engine:
cartesia/sonic-3.6 (default) or ElevenLabs elevenlabs/eleven-v4 / elevenlabs/eleven-v4-turbo.
The v4 models need the creator's voice linked to ElevenLabs first
(404 creator_voice_not_linked_elevenlabs → run malgomo_voice_link_elevenlabs once). Same retry rules as the
image tool. Priced per 1000 characters; text is capped at 1500. Needs the agency's voice feature enabled
(voice_not_enabled otherwise). The finished MP3 is output_urls[0]. Access tokens may use this tool
(client_token is mandatory for them).
| Param | Type | Notes |
|---|---|---|
text | string | Required, ≤1500 chars. Inline emotion tags like [flirtatious] or [calm] set the emotion (first tag wins). |
creator_profile | string? | Speak with this creator's assigned voice. |
voice_id | string? | Explicit voice id when no creator voice applies. |
model_id | string? | Defaults to cartesia/sonic-3.6; also elevenlabs/eleven-v4, elevenlabs/eleven-v4-turbo. |
client_token | string? | Idempotency token (1–64 chars, alnum/-/_). Required for access tokens. |
malgomo_generate_video now also takes reference_audio_urls (≤3), middle_image_url + middle_frame_time,
reference_video_seconds and prompt_expansion_mode; reference_image_urls up to 12 (the model's max_images caps it) and
reference_video_urls up to 5. A pack @slug in the prompt attaches the pack's images; malgomo_media_pack with model_id shows
how many the model really takes. Fields a model cannot use come back as the job warning fields_ignored.
Cost rule: new models are tried only when CHEAPER than the current reference (Omni Flash 1.5 USD / 10 s); expensive ones (Seedance 2.5 ≈ 11 USD / 10 s) are never run as tests.
Add or change a fal video model without a deploy: endpoint id, bucket (video_t2v | video_i2v), name, allowed durations / resolutions / aspect ratios,
reference limits and the price formula (price.cents_per_second by resolution, optional promo, free_refs + extra_ref_cents,
ref_tokens, video_ref). A model without a valid price, an unpriced resolution or without duration_range is refused. Saved disabled unless
enabled:true; visible only while the server switch MEDIA_STUDIO_CUSTOM_MODELS is on. The answer states ten_second_cost_cents. Access tokens cannot call these.
One-time setup per creator: her saved Cartesia voice reads a ~40 s reference text, that clip becomes an ElevenLabs clone stored
next to the Cartesia voice (which stays the default). Params: creator_profile (string, required),
consent (must be true). Idempotent (already_linked:true costs nothing); counts toward the daily
voice-creation limit. The clone is a clone of a clone — close, not guaranteed identical. Owner/admin only; access tokens cannot call it.
Returns one generation job by id and triggers a server-side provider status refresh. Inline
data: outputs are replaced by a placeholder plus inline_media_count. Param:
job_id (string, required). Useful fields: status (a provider timeout reads timeout,
the original failed is kept in status_raw), cost_cents, cost_source
(estimate | computed), failure_kind (content_blocked | provider_error | validation | timeout | internal),
error_detail (the provider's text, verbatim), warnings [{code, message}],
references_used / references_dropped.
Polls one job until terminal (completed | failed | timeout | cancelled) or the timeout elapses. On timeout
it returns the current job state plus a hint — the job keeps running server-side (sweeper); just call the
tool again. Params: job_id (string, required), timeout_seconds (number?, 5–80,
default 55 — hard-capped because the server sits behind a ~100 s edge).
A job the automatic route handed over to the next provider (failed with retried_as) is followed
automatically, here and in malgomo_media_job: the answer is the job that carries on, and
followed_from lists the handed-over ids. Never resubmit such a job.
Lists the user's generation jobs, newest first, slim (inline outputs blanked). Keyset pagination via
before = the previous response's next_before. Params: limit (number?, 1–200),
before (string?), favorites_only (boolean?), folder_id (string?).
Marks/unmarks a job as favorite. Params: job_id (string, required), favorited
(boolean, required).
Lists character/element packs. A pack is used by mentioning its @slug in a generate prompt —
the server merges its reference images + prompt hint automatically. Param: kind
(character | element, optional filter).
Returns one pack in full. Params: pack_id (string, required), model_id (string?). With
model_id the pack carries pack.effective_refs {model_id, max, used, dropped}: how many of its reference
images that model really takes (max = the model's cap, dropped = images cut for being over it).
Upsert by slug: updates the pack that owns it (only the fields you pass), otherwise creates it
(name then required). Returns {action: created | updated | unchanged, pack}. Packs can not be deleted
through the MCP. Params: slug (required), name, kind (character | element),
prompt_hint (≤500), scope (agency | private).
Adds a reference image to a pack. Params: pack_id (required) and exactly one of
image_url (fetched server-side) or data_b64 + mime_type (≤16 MB). Stored permanently.
Only AI-generated characters — never real persons.
Removes one reference image from a pack. Params: pack_id, image_id (from malgomo_media_pack).
Returns a plain HTTPS URL for one output of a finished job — fetchable with a simple GET, no auth,
valid for at least 72 h (normally 7 days). The file is published to MalGomo's own media store on the
first call (and cached); already-public provider URLs are passed through (source: direct).
Answer: url, source, expires_hint. Params: job_id
(string, required), index (number, default 0). This is the way to actually save a generated
file from an agent: call it, then GET the returned url.
Stores a file to use as a generation reference and returns its URL for reference_image_urls /
start_image_url. Give exactly one of data_b64 (+ mime_type) or
source_url (a public https link the server fetches itself; shared Google Drive links work). The file lives in
MalGomo's own media store for 7 days and is readable by anyone holding the long, unguessable URL.
Only AI-generated characters — never real persons. Answer: url, host,
expires_at, notice. Max 16 MB.
| Param | Type | Notes |
|---|---|---|
kind | string | Required. image | video | audio. |
data_b64 | string? | Base64 content, ≤16 MB decoded. |
mime_type | string? | Required with data_b64, e.g. image/png. |
source_url | string? | Alternative to data_b64. |
filename | string? | Original filename (with data_b64). |
| HTTP / code | Meaning |
|---|---|
402 budget_exhausted | Daily or monthly media limit reached (scope); nothing booked. |
503 provider_balance_exhausted | The fal balance is empty; the operator is notified. Do not retry immediately. |
429 provider_rate_limited | The provider throttles. Wait; changing the prompt does not help. |
400 client_token_required | Access-token calls need a client_token. |
403 pat_route_not_allowed | The access token may not call that route. |
422 fal_rejected | fal refused the job; the detail carries its reason verbatim. |
| Value | Window |
|---|---|
today (default) | Current day |
yesterday | Previous day |
7d | Fans & earnings: last 7 days. KPIs: Maloum's current week. |
30d | Fans & earnings: last 30 days. KPIs: Maloum's current month. |
Earnings & fan totals for a period are summed over that rolling day window; KPI revenue maps the token onto Maloum's own named period instead.
Add this server as a remote/custom MCP connector pointed at POST /mcp. With OAuth on (mode A), the
client shows a sign-in page at connect time — log in there and you are done. With OAuth off (mode B),
no header is required and you authenticate with the malgomo_login tool. (Advanced: send
Authorization: Bearer <supabase-jwt> on the connection to skip the login tool.)
Quick raw check with curl (initialize handshake):
curl -i -X POST <this-url>/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize",
"params":{"protocolVersion":"2025-06-18","capabilities":{},
"clientInfo":{"name":"curl","version":"0"}}}'
The response carries an mcp-session-id header — send it back on later requests.
forbidden there. The Media Studio tools additionally work for members carrying the media_studio_access grant; the ticket tools require the per-member is_dev grant. Every gate is enforced server-side.context block (user/agency ids, email) stripped before they reach the agent.awaiting_approval DRAFT — they can NEVER fire a real mass send, which always requires a human to approve in the desktop app. The media generation tools are different: malgomo_generate_image / malgomo_generate_video / malgomo_generate_voice are paid direct actions — they spend real money from the logged-in user's media budget the moment the backend accepts them, with no approval step and no cancel. The safeguards are server-side: the per-user media budget, the per-agency model access list, and the client_token submit dedup (plus: these tools never auto-retry a 502). malgomo_upscale_image / malgomo_upscale_video / malgomo_lipsync / malgomo_video_replace are paid in the same way.mgm_pat_…) carry no refresh token and see only the Media Studio tools; the backend allowlist rejects every other route with pat_route_not_allowed. Treat a token like a password.mcp-session-id is a connection secret (it rides your logged-in token). It is a random UUID sent only over TLS — treat it like a bearer token; do not share it.