Lock in $67
Setup

Meta Ads CLI: the install command most guides get wrong

Meta shipped a command-line tool alongside its ads MCP server. Several guides tell you to install it with a command that installs nothing, or installs someone else’s tool.

Espen Opdahl Published 6 min read
The short answer

Meta’s Ads CLI is a Python package, meta-ads on PyPI, installed with pip install meta-ads and run as meta. It is not on npm: the scoped package two guides name does not exist in the npm registry. It does not sign in through a browser either. Meta’s docs require an admin system user access token, kept in a .env file or an environment variable. Created campaigns, ad sets and ads default to paused, but one flag makes them live, and the CLI can delete a campaign with everything under it.

You are in Claude Code, you have read that Meta has an official CLI, and a guide gives you one line to paste. The terminal either reports the package cannot be found, or installs something that works but is not Meta’s.

The decision under the install step matters more than the typo. The ads MCP server (the connector you add to Claude by URL) and the Ads CLI are both listed under Meta’s ads AI connectors, but they authenticate differently, stop differently and delete differently. Picking the CLI because it “fits the terminal” hands a script more power than the connector ever gives a chat.

What Meta’s own docs say

Everything below comes from Meta’s developer documentation for the Ads CLI, each page stamped last updated 29 April 2026, read on 14 September 2026. I have not installed or run the tool; this is the documented surface, checked against the package registries.

  • Install: the Get Started page lists a recent Python release (it names a minimum version), a virtual environment, pip and uv, then pip install meta-ads followed by uv sync. Commands run as uv run meta or plain meta inside the environment. PyPI shows meta-ads first published on 29 April 2026, launch day.
  • Sign-in: “Ads CLI requires a system user access token to authenticate for programmatic access.” You create an admin system user in Business Suite, assign it the ad accounts, pages, pixels and catalogs, add it as an admin on an app, and generate a token with business_management, ads_management, pages_show_list, pages_read_engagement, pages_manage_ads, catalog_management and read_insights.
  • Where the token lives: the Configuration page names ACCESS_TOKEN as required, read from flags, then environment variables, then a .env file “in the directory where you are running Ads CLI”, then ~/.config/meta/. meta auth status shows a masked copy.

The connector works the other way round. You add Meta’s endpoint to Claude and sign in with your own Facebook login in a browser; no token is written into your project. Setup for that path is in connecting Claude to Meta ads, and the Claude Code version of it in the Claude Code and Cursor post.

Which path to use for which job, and which jobs stay with a human, is part of what the Claude Ads Operator course covers.

worth knowing Three different commands are published as “the Meta Ads CLI”. Only one installs Meta’s.

GoMarble’s vendor page (dated 5 June 2026) and a Claude Fast guide by Abdullah Mobayad (13 September 2026) both give npm install -g @meta/ads-cli; the npm registry returns not found for that name (checked 14 September 2026). MCP.Directory (updated 2 May 2026) gives pip install meta-ads-cli, which is a real package — published by Attainment Labs, not Meta. The unscoped npm meta-ads-cli is a community project whose own page says it is not affiliated with Meta. The name Meta documents is meta-ads.

What guides say, and what the docs say

What guides sayWhat Meta’s docs say
“Auth is through your existing Meta Business login, no Developer App registration or token management.” — GoMarble, vendor page, 5 June 2026 A system user access token, generated against an app you are an admin of, stored as ACCESS_TOKEN
“Same 29 tools as the Meta Ads MCP, just CLI-flavored.” — GoMarble, same page A different surface: campaigns, ad sets, ads, creatives, pixels, catalogs, insights, accounts and pages. No Ad Library search, activity log or custom audiences appear in the command reference
“Every campaign, ad set, and ad created through the connectors lands in PAUSED status. No CLI flag overrides this default.” — AdMove, vendor blog, 19 May 2026 --status defaults to PAUSED and is documented as “Initial status: ACTIVE or PAUSED”

Where the CLI and the connector differ

  1. Paused is a default, not a lock status

    The connector’s creation tools describe themselves as creating in paused state, and it holds however you prompt. The command reference gives campaign create, adset create and ad create a --status option that defaults to paused and accepts active. An agent that adds one flag launches spend, with nothing between the command and delivery.

  2. Delete exists, and it cascades the big one

    meta ads campaign delete is documented as “Delete an ad campaign and all its child ad sets and ads.” Ad set, ad, creative and catalog deletes are there too. Each asks for confirmation unless you pass --force, and the global --no-input disables interactive prompts. The connector has no delete for a campaign, ad set or ad at all; pause is its only stop.

    The trade: for cleaning up test campaigns in bulk, that is exactly why people want the CLI.

  3. The token sits next to the agent sign-in

    The recommended .env file lives in the folder you run commands from, which in Claude Code is the folder the agent can read. System user tokens do not expire the way a personal login token does. Keep the file out of version control, and treat the folder as holding a key to every asset you assigned to that system user.

  4. Budgets are written in cents money

    The reference describes --daily-budget as “Daily budget in cents” and says nothing about currencies with no minor unit. Meta counts those in whole units, which is how an agent ends up with a budget far off from the one you meant; the detail is in what the minimum budget API reports.

  5. Lists stop early reads

    campaign list, adset list and ad list default to 10 rows, and output defaults to a table. For an agent, pass a higher --limit and --output json, which the reference says must come before the subcommand. A “which campaigns are active?” answer built on the default is built on the first page.

The connector cannot delete a campaign. The CLI can delete one and everything under it without asking.

  • Pasting the npm line. It either fails or, with the unscoped name, installs a community tool that talks to your account with whatever token you give it.
  • Allowing --force in an agent’s permissions. A confirmation prompt is the only thing between a mistyped ID and a deleted campaign.
  • Committing the .env. A system user token with ads_management in a repository is a standing key to the account.
  • Assuming paused because the connector pauses. Different path, different rule. Read the command before approving it.

Try this tonight If you already installed something called the Meta Ads CLI, run pip show meta-ads and npm ls -g and look at what is actually there. If you find meta-ads-cli from either registry, that is a third-party tool: check which token it holds and revoke it in Business Suite if you no longer use it. If you want Meta’s, deny Claude Code any command containing delete or --force before you give it the token.

Is the Ads CLI the same thing as the ads MCP server?

No. Both sit under Meta’s ads AI connectors, but the MCP server is a hosted endpoint you sign in to from a browser, while the CLI is a Python package on your machine that uses a system user token. Their commands, defaults and delete rules differ.

Is there an npm package for Meta’s Ads CLI?

Not one Meta documents. @meta/ads-cli is not in the npm registry, and the unscoped meta-ads-cli on npm says it is unofficial. Meta’s docs name only meta-ads on PyPI.

Do I need a Meta developer app?

Yes, per the Get Started page: the system user is added as an admin on your app, and the token is generated for that app. That is the step the no-developer-app claims leave out; the MCP server is the path that skips it.

Should Claude Code use the CLI or the connector?

For reading and drafting, the connector: browser sign-in, nothing stored in the folder, and everything it creates stays paused. The CLI suits scripted work where deleting is the point, run with a person approving each destructive command.

Know which path can spend, and which can only draft

The course sets out what to hand Claude, through which tool, and which changes always go past a person first.

See what's inside — $67 founding price

Pre-sale: the modules are still being recorded and founding members get the checkout link first. No charge today. Public price $97.

Espen Opdahl Writes The Claude Ads Operator. I run Meta ad accounts through Claude and Meta's official ads connector, and I write down what actually happens — including the parts that don't work. Not affiliated with Meta or Anthropic.