Documentation

Get started in five steps.

  1. Connect Meta

    Open /connect and click Connect Meta. This performs a full-page navigation to the backend at /auth/meta/start. The backend handles OAuth, PKCE, and encrypted token storage; you return to /dashboard?meta=connected.

  2. Pick an ad account

    Visit /ad-accounts to list every Meta ad account the connected user can access. Copy an ad account id (act_...) to use it when listing campaigns.

  3. List campaigns and insights

    Use /campaigns to list campaigns for a given ad account, and /insights to fetch Meta insights for any object id (ad account, campaign, ad set, or ad).

  4. Stage a write

    Create, update, and pause are confirmation-gated. Submit the form, review the exact tool name and arguments, and approve. The frontend replays the same call with a confirmationToken and reports success only after the second call resolves.

  5. Watch confirmations expire

    Confirmation tokens live for a short window (typically 15 minutes). Expired confirmations are cleared automatically and the flow restarts.

Deployed MCP tools

The backend exposes exactly eight tools via JSON-RPC 2.0 at POST /mcp.

ToolKindArguments
meta_list_ad_accountsread{}
meta_list_pagesread{}
meta_list_campaignsread{ adAccountId, limit? }
meta_get_campaignread{ campaignId }
meta_get_insightsread{ objectId, datePreset?, level? }
meta_create_campaignwrite{ adAccountId, name, objective, specialAdCategories?, confirmationToken? }
meta_update_campaignwrite{ campaignId, name?, status?, confirmationToken? }
meta_pause_campaignwrite{ campaignId, confirmationToken? }