Cogny CLI · Paid Social

    Meta Ads scriptable from Bash.

    Pull Facebook & Instagram ad insights, walk the campaign → ad set → ad tree, update budgets and status, and manage audiences — all from the shell over the Meta Ads MCP. No Graph API tokens to juggle.

    # 1. sign up (free for 15 calls) — uses your git email
    $ npx @cogny/cli init --agent claude-code
    
    # 2. see every Meta Ads tool
    $ cogny tools list
    
    # 3. call any tool from Bash — no MCP wiring
    $ cogny tools call mcp__Meta_Ads__tool_get_insights --input '{…}'
    ❯ start Cogny Solo — $9/mo@cogny/cli on npm →

    cogny --who

    TWO PATHS
    You're a human

    Ads Manager makes you click through campaign → ad set → ad and export each view. The CLI returns the whole tree as JSON in one call, ready to diff, sort, or feed to an agent. Connect Meta Ads once in Cogny Solo and let your coding agent — or scheduled reports — do the querying for you.

    ❯ start Solo
    You're an agent

    Self-onboard with one command. The CLI issues a key, wires nothing, and exposes every Meta Ads tool over JSON-RPC. First 15 calls are free.

    $ npx @cogny/cli init --agent claude-code

    cogny tools call

    3 EXAMPLES

    Real tool names from the Meta Ads MCP. Send --input JSON, get JSON back.

    mcp__Meta_Ads__tool_get_insightsPerformance metrics for any account, campaign, ad set, or ad.
    $ cogny tools call mcp__Meta_Ads__tool_get_insights \
      --input '{"ad_account_id":"act_1234567890","level":"campaign","date_preset":"last_7d"}'
    example response
    {
      "data": [
        {
          "campaign_name": "Prospecting — Broad",
          "spend": "4120.55",
          "impressions": 812044,
          "clicks": 9123,
          "ctr": "1.12",
          "cpc": "0.45",
          "purchase_roas": "2.8"
        },
        {
          "campaign_name": "Retargeting — 30d",
          "spend": "1880.10",
          "impressions": 204113,
          "clicks": 6201,
          "ctr": "3.04",
          "cpc": "0.30",
          "purchase_roas": "5.1"
        }
      ]
    }
    mcp__Meta_Ads__tool_get_campaignsList campaigns with objective, status, and budget.
    $ cogny tools call mcp__Meta_Ads__tool_get_campaigns \
      --input '{"ad_account_id":"act_1234567890","limit":2}'
    example response
    {
      "data": [
        {
          "id": "120200000000000001",
          "name": "Prospecting — Broad",
          "objective": "OUTCOME_SALES",
          "status": "ACTIVE",
          "daily_budget": "15000"
        },
        {
          "id": "120200000000000002",
          "name": "Retargeting — 30d",
          "objective": "OUTCOME_SALES",
          "status": "ACTIVE",
          "daily_budget": "5000"
        }
      ]
    }
    mcp__Meta_Ads__tool_update_ad_set_budgetShift budget into a winning ad set.
    $ cogny tools call mcp__Meta_Ads__tool_update_ad_set_budget \
      --input '{"ad_set_id":"120200000000000010","daily_budget":20000}'
    example response
    {
      "id": "120200000000000010",
      "daily_budget": "20000",
      "success": true
    }

    cogny tools list

    MORE

    A sample of the rest of the Meta Ads surface. Run cogny tools list --json for every tool and its input schema.

    mcp__Meta_Ads__tool_list_ad_accountsmcp__Meta_Ads__tool_get_ad_setsmcp__Meta_Ads__tool_get_adsmcp__Meta_Ads__tool_create_campaignmcp__Meta_Ads__tool_create_ad_setmcp__Meta_Ads__tool_update_campaign_statusmcp__Meta_Ads__tool_update_ad_set_targetingmcp__Meta_Ads__tool_create_lookalike_audiencemcp__Meta_Ads__tool_get_pixels

    cogny --faq

    Does this replace Meta Ads Manager?

    No — it adds a scriptable surface on top. You keep Ads Manager; the CLI lets you (or your agent) read insights and push approved budget/status changes without clicking through the UI.

    How is auth handled?

    You connect Meta once inside Cogny (OAuth). The proxy holds the token; the CLI calls tools with your Cogny key. No long-lived Graph API token in your shell history.

    Can it create campaigns or just read?

    Both. The Meta Ads MCP exposes read tools (insights, campaigns, ad sets) and write tools (create campaign/ad set/ad, update budget/status/targeting, build audiences).

    related CLIs

    /cli/google-ads/cli/tiktok-ads/cli/snapchat-ads/cli/linkedin-ads

    Building an agent? The full tool map for all servers is one fetch: /cli/llms.txt