Home>Connect>LinkedIn Ads to Claude Code

Connect LinkedIn Ads to Claude Code in One Command

By Ahmed Ashraf|Updated September 23, 2026
LinkedIn Ads Claude Code

Run claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp, type /mcp, and sign in with your PaidSync login. Claude Code then reaches LinkedIn Campaign Manager through 34 tools: performance by job title, seniority and company, audience sizing, forecasts, campaign groups, campaigns and ads. Claude Code asks before it runs each tool, and most LinkedIn writes preview with a dry run first.

One command. OAuth sign-in, no key pasted. Free plan, 15 tasks a month, no card.

Free to start · No credit card · OAuth 2.0 sign-in · 530+ tools total

The command

Claude Code talks to remote MCP servers over Streamable HTTP. PaidSync is one of them. Add it once and the same terminal that edits your code can read and change your LinkedIn ad accounts.

claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp

By default that registers the server for the current project only. Add --scope user to make it available in every project on your machine. Run claude mcp list to confirm it is there, then start a session and type /mcp to sign in.

5-Step Setup

1

Sign up at paidsync.ai/signup

Takes 10 seconds. Google or email sign-in. The free plan is 15 tasks a month at $0, no card.

2

Connect LinkedIn Ads in the PaidSync dashboard

Click Connect on LinkedIn Ads and sign in with the LinkedIn account that has access to Campaign Manager. LinkedIn Ads authorizes via LinkedIn OAuth. PaidSync stores the tokens encrypted at rest with AES-256-GCM.

Already inside Claude Code? Ask it to run connect_linkedin_ads. The tool returns an OAuth link to open in your browser.

3

Pick the ad account Claude Code should work on

After the sign-in, PaidSync lists the LinkedIn ad accounts that login can reach. Inside a session, list_linkedin_ad_accounts shows them and set_linkedin_ad_account picks the active one.

4

Add PaidSync to Claude Code

In your terminal, run:

claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp

Start a session, type /mcp, pick paidsync, and sign in with your PaidSync login in the browser window that opens. Claude Code stores the OAuth token for you. No key is pasted anywhere.

Setting this up for a team? Commit a .mcp.json at the repo root so every engineer gets the same connector:

{ "mcpServers": { "paidsync": { "type": "http", "url": "https://mcp.paidsync.ai/mcp" } } }

Prefer an API key, for example for headless runs? Send it in a header, never in the URL, where it would end up in logs:

claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp --header "Authorization: Bearer $PAIDSYNC_API_KEY"

In a committed .mcp.json, add "headers": { "Authorization": "Bearer ${PAIDSYNC_API_KEY}" } so the key stays in each engineer's environment and never enters git. Applying a change to Google Ads still requires the OAuth sign-in. On other platforms a key can apply changes too, so treat it like a password and prefer OAuth.

5

Test the connection

In a Claude Code session ask: “Show me LinkedIn campaign performance for the last 30 days”

Claude Code returns impressions, clicks, spend, CTR, CPC and conversions for each campaign. The connection is live.

Free plan includes 15 tasks a month. Pro from $99 a month, Team from $249.

Start Free See a Demo

LinkedIn Ads prompts to try in Claude Code

Each prompt below maps to tools in the PaidSync LinkedIn Ads group. Claude Code picks the tool. The last column says whether the call can change anything in the ad account.

AskTools it callsChanges your account?
“Show campaign performance for the last 30 days”get_linkedin_performanceNo
“Break down spend and CTR by job title and by seniority”get_linkedin_performance_by_dimensionNo
“How many members does VP of Marketing in Germany reach?”search_linkedin_targeting_entities, get_linkedin_audience_sizeNo
“Forecast impressions and clicks for that audience at $100 a day”get_linkedin_campaign_forecastNo
“Create a campaign group and a draft campaign for that audience”create_linkedin_campaign_group, create_linkedin_campaignYes, after you confirm
“Pause the campaign with the highest CPC”pause_linkedin_campaignYes, after you confirm
“Change the intro text and destination URL on this ad”update_linkedin_adYes, after you confirm

Run it headless with claude -p

The -p flag runs Claude Code without the interactive session. Sign in once through /mcp and the stored OAuth token carries over. A report that lands in a file looks like this:

claude -p "Pull last 30 days LinkedIn performance by job title and list the five titles with the lowest cost per conversion." \ --allowedTools "mcp__paidsync" \ --output-format json > reports/linkedin-ads-$(date +%F).json

Reads run straight through, and so do writes. --allowedTools "mcp__paidsync" allows every PaidSync tool, writes included, with no prompt. For an unattended job, allow only the read tools it needs, each by name as mcp__paidsync__tool_name.

What reads and what writes

Of the 34 LinkedIn Ads tools, 15 only read and 17 can write. Reads cover performance, breakdowns by creative, company, job title, industry, seniority, country and region, targeting, audience counts, forecasts, conversions and lead forms.

Writes cover campaign groups, campaigns, targeting, creatives, ads, conversions and lead gen forms. Most writes preview by default with dry_run. Image and video uploads apply on the first call.

Over MCP, the approval step is Claude Code’s own prompt. It asks before it runs a tool unless you allowed it with --allowedTools or in your settings. PaidSync adds checks on its side. Deletes, pauses and budget changes need confirm_destructive, and a pre-write rule check blocks unsafe arguments. The approval card and one-tap undo apply only in the PaidSync workspace.

Upload an ad image from the terminal

When the image sits on your machine rather than a public URL, create_linkedin_image_upload_url returns a one-time upload link. It takes JPEG, PNG or GIF up to 5 MB, works once, and expires after 15 minutes. Claude Code can run the upload for you:

curl -X PUT --data-binary @ad.jpg -H "Content-Type: image/jpeg" "<put_url>"

The response carries the image URN that create_linkedin_ad takes. Video goes through upload_linkedin_video from a public URL, up to 200 MB.

Limits worth knowing

  • A new campaign starts as a draft, which never serves and never spends, until you pass another status.
  • Targeting is required when you create a campaign. LinkedIn treats a campaign with no targeting as Auto-Targeting, which disables most ad formats and cannot be undone.
  • PaidSync turns the LinkedIn Audience Network and audience expansion off by default. You can switch either back on.
  • LinkedIn needs an end date whenever a campaign group has a total budget. If you do not give one, PaidSync sets it 365 days after the start and says so in the response.
  • The conversions figure adds website conversions and lead gen form leads together. Both parts also come back separately.

Frequently Asked Questions

How do I connect LinkedIn Ads to Claude Code?

Sign up at paidsync.ai, connect LinkedIn Ads via LinkedIn OAuth in the dashboard, then run claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp in your terminal. Type /mcp inside a session, pick paidsync, and sign in with your PaidSync login.

Can Claude Code create LinkedIn campaigns?

Yes. LinkedIn Ads is a build tier platform in PaidSync. Claude Code can create campaign groups, campaigns, creatives, ads, conversions and lead gen forms. New campaigns start as drafts, most writes preview as a dry run first, and Claude Code asks before it runs each tool.

Can Claude Code size a LinkedIn audience before I build anything?

Yes. search_linkedin_targeting_entities turns names like a job title or company into the IDs LinkedIn needs, get_linkedin_audience_size counts the members, and get_linkedin_campaign_forecast returns LinkedIn’s own forecast. None of these change the account.

Does it work in headless mode with claude -p?

Yes. Once you have signed in through /mcp, claude -p reuses the stored OAuth token. Reads run straight through. Writes need care. No one is there to answer the Claude Code prompt, so any write tool you allowed with --allowedTools runs straight through. For an unattended job, allow only the read tools it needs.

Is it free?

Yes. The free plan is $0 for 15 tasks a month with no card. Pro starts at $99 a month and Team at $249 a month.

34 LinkedIn Ads tools. One command in Claude Code.