Log in

AdChat for Claude Code

Connect Facebook & Google Ads to Claude Code

One terminal command connects Claude Code to your Facebook, Instagram and Google ads.

FacebookGoogle AdsOne MCP server, one AdChat account, both ad platforms

Run this in your terminal

claude mcp add --transport http adchat https://mcp.adchat.app
  • OAuth sign-in, no API keys
  • 7-day free trial, no card
  • Set up in about a minute

Three steps. That's it.

  1. 1

    Paste it into Claude Code

    Run the command in your terminal. Add --scope user to use AdChat in every project.

  2. 2

    Connect Facebook and Google

    In Claude Code, run /mcp, pick adchat and sign in to AdChat in your browser.

  3. 3

    Ask about your ads

    Live numbers from your account, in plain English. Nothing changes without your yes.

Then just ask

Claude Code pulls live data from your Facebook and Google ad accounts through AdChat and answers with real numbers. Click a question to copy it.

Claude CodeClaude CodeAdChat connected

Which Facebook ads wasted money this month?

I checked your Meta ads for the last 30 days. Three ads spent $412 with zero purchases:

  • Summer sale – carousel$188 · 0 purchases
  • UGC video v2$131 · 0 purchases
  • Broad 25-45 – static$93 · 0 purchases

Want me to pause them? I'll show you each change first.

via AdChat · Meta Ads

Example conversation. The numbers are made up.

One link works in every AI app

Use AdChat wherever you already chat. Same tools, same safety, one account.

AdChat for Claude Code: FAQ

Yes. Ask it to pull last month's results and save a CSV or a Markdown report in your project. Changes to your ads still need your yes.

No. Claude Code signs in to AdChat with OAuth, and you connect Facebook and Google by logging in to each. You never paste a token anywhere.

No. The AI has to tell you the exact change and get your yes first, and new campaigns, ad sets and ads start paused.

Yes. Connect Google Ads in the same AdChat account, when you sign in or later from your dashboard, and Claude Code sees it through the same link. There's no second server to add. Ask about results and search terms, change budgets and keywords, and add search ads. TikTok isn't supported.

Every new account gets a 7-day free trial of everything, no card, on all your ad accounts. After that, plans start at $29 a month. Cancel anytime.

Let Claude Code run your Facebook and Google ads

Start your 7-day free trial, connect Facebook and Google, and paste the link. You approve every change.

Start free trial

7-day free trial of everything, no credit card (built-in chat: 10 messages; unlimited in your own Claude or ChatGPT). Then from $29/month. Cancel anytime.

Step-by-step guide

Connect Facebook and Google Ads to Claude Code with AdChat (CLI Setup)

Add AdChat to Claude Code with one claude mcp add command. Covers sign-in, scopes, checking status with /mcp, and common fixes.

Eric Strohmaier
By , founder of AdChatPublished Updated 4 min read

Try AdChat free for 7 days, no card. Start your trial

Claude Code is Anthropic's coding assistant that runs in your terminal. It can also use MCP servers, which means you can ask it about your Facebook and Instagram ads, pull numbers into a script, or build a quick report without leaving the command line. This guide shows you how to add AdChat in one command.

Google Ads too. The same AdChat link covers Google Ads. Connect Google in your AdChat account, when you sign in or later from your dashboard, and Claude Code sees your Facebook and Google ad accounts through this one server. There's nothing extra to add.

If you just want to chat about your ads, the Claude web and desktop setup is easier. Claude Code is a good fit if you already live in the terminal.

What you need

  • Claude Code installed and working.
  • An AdChat account. Sign up. You can connect Facebook now or during sign-in.

Step 1: Add AdChat with one command

Run this in your terminal:

bash
claude mcp add --transport http adchat https://mcp.adchat.app

What each part means:

  • --transport http tells Claude Code that AdChat is a remote server reached over HTTP.
  • adchat is the name you'll see in Claude Code.
  • https://mcp.adchat.app is AdChat's server URL. There's no key in it. You sign in instead.

Step 2: Choose a scope (optional)

By default, Claude Code adds the server with local scope: it's only available in the project folder where you ran the command, and only to you. You can change that with --scope:

ScopeWhere it worksWhere it's saved
local (default)This project only, just you~/.claude.json
userAll your projects~/.claude.json
projectThis project, shared with your team.mcp.json in the project folder

For most people, user is the most convenient, so AdChat is there wherever you open Claude Code:

bash
claude mcp add --transport http adchat --scope user https://mcp.adchat.app

project scope is safe to share, because the config only holds the URL:

json
{
  "mcpServers": {
    "adchat": {
      "type": "http",
      "url": "https://mcp.adchat.app"
    }
  }
}

Each person then signs in with their own AdChat account and sees only their own ad accounts.

Try it on your own account. Connect your Meta and Google ads to Claude, ChatGPT or the built-in chat. 7-day free trial of everything, no credit card (built-in chat: 10 messages; unlimited in your own Claude or ChatGPT). Then from $29/month. Cancel anytime.

Start free trial

Step 3: Sign in

Start Claude Code and type:

/mcp

Pick adchat and choose to sign in. A browser window opens. Sign in to AdChat, connect Facebook if you haven't yet, and click Allow. You only do this once. Claude Code stays connected as long as you use AdChat at least once every 90 days.

Back in /mcp, AdChat should show as connected. From your regular terminal, claude mcp list shows the same list.

Step 4: Ask a question

In Claude Code, try:

Use AdChat to list my ad accounts, then show spend, clicks and cost per result for each active campaign over the last 7 days as a table.

Or something more hands-on:

Pull last month's daily spend and results for my top campaign with AdChat and save it as a CSV file called spend.csv.

Claude Code asks for permission before it uses a new tool, so you stay in control. More prompt ideas are in Your first 10 questions to ask.

Can't sign in? Use your key as a header

Signing in is the way to go. If you're running Claude Code somewhere a browser can't open, you can send your AdChat key as a header instead. Your key is in the dashboard and starts with adchat_:

bash
claude mcp add --transport http adchat --scope user https://mcp.adchat.app \
  --header "Authorization: Bearer adchat_..."

Treat your key like a password. Don't put it in a .mcp.json that gets committed to git. If it ever leaks, roll it in the dashboard and the old key stops working.

Removing or changing it

To remove AdChat, or to re-add it:

bash
claude mcp remove adchat --scope user

Use the same scope you added it with.

Troubleshooting

AdChat shows as failed in /mcp. Check the URL is exactly https://mcp.adchat.app. The old AdChat address no longer works. Remove AdChat, add it again with the new URL, then run /mcp and sign in. If you use the header instead, the key must start with adchat_ and come right after Bearer (with one space).

It works in one folder but not another. You used the default local scope. Remove it and add it again with --scope user.

"Your AdChat free trial has ended". After the 7-day trial, AdChat needs a plan. Pick Weekly or Daily on the pricing page. On every plan, Claude Code asks you yes or no before each change. Read How AdChat confirms changes first.

Rate limit errors. Use through your own AI apps is unlimited, but capped at 120 requests per minute. Long loops can hit that. Ask Claude Code to slow down or batch its requests.

FAQ

Does my Facebook token ever reach Claude Code? No. Claude Code only gets an AdChat sign-in, never your Facebook token. AdChat keeps your Facebook token encrypted on its side and calls Meta for you.

Can I use AdChat in Claude Code and Cursor? Yes. Add the same URL in each app and sign in once per app. See Cursor and other MCP clients.

Start now

Start your 7-day free trial. No credit card needed. Questions? Email [email protected].

Try it on your own ad account

Connect your Meta and Google ads to Claude, ChatGPT or our built-in chat in about a minute.

Start free trial7-day free trial of everything, no credit card (built-in chat: 10 messages; unlimited in your own Claude or ChatGPT). Then from $29/month. Cancel anytime.

Questions? Email me at [email protected]