LinkedIn Ads connector for Claude Code

Use Porter’s LinkedIn Ads connector for Claude Code to pull spend, leads and audience breakdowns into your terminal, then turn them into files, scripts and scheduled reports in your own project.

  • Save LinkedIn Ads data as CSV in your repo
  • Find the seniorities and job functions that bring leads
  • Run a weekly LinkedIn Ads report from a script
  • Compare LinkedIn with X Ads for B2B
G2★★★★★Rated 4.6/5 from 288 G2 reviews (October 2026) · Used by 1,600+ marketing teams and agencies

By · Last updated November 26, 2026

Claude Codeporter connected
Show last month’s Spent, Leads and cost per lead by Seniority and save it to reports/li-seniority.csv
porter / LinkedIn Ads / Trailgear Demo✓ 4 rows
Saved reports/li-seniority.csv. Director brings leads cheapest; Entry costs the most per lead.
SenioritySpentLeads
Director$3,24046
Manager$4,11052
Senior$2,38024
Entry$1,2606
Demo data, Trailgear Demo account
226 LinkedIn Ads fields
01Setup

How to connect LinkedIn Ads to Claude Code

Connecting LinkedIn Ads to Claude Code takes 3 steps and no API keys: connect your LinkedIn ad accounts in Porter with LinkedIn, add Porter’s MCP server to Claude Code with one command, then sign in from /mcp and ask. The same server also works in Cursor, VS Code and Codex, as Porter’s LinkedIn Ads MCP server page shows. Using the Claude app instead? See the LinkedIn Ads connector for Claude.

Before you start

  • You need Claude Code installed (Anthropic’s Claude Code overview), a free Porter account and a LinkedIn login with a role on the ad account in Campaign Manager.
  • Works with any Claude model in Claude Code, from Opus to Sonnet and Haiku.
  1. Step 1: Connect LinkedIn Ads in Porter

    Sign up free at Porter, pick LinkedIn Ads as the source and sign in with LinkedIn. Tick every ad account you want Claude Code to read.

  2. Step 2: Add Porter to Claude Code

    In your terminal, run this command. It adds Porter for every project on your machine; drop --scope user to add it to the current project only.

    Terminal
    claude mcp add --transport http --scope user porter https://mcp.portermetrics.com/mcp

    Or, inside Claude Code, install Porter’s plugin, which adds the server and Porter’s skill together: /plugin marketplace add portermetrics/porter, then /plugin install porter-metrics@portermetrics.

  3. Step 3: Sign in and ask

    Start claude, type /mcp, pick porter and sign in with the Google account you use in Porter. When porter shows as connected, paste this prompt:

    Prompt
    Which LinkedIn ad accounts can you see? For the last 30 days, show Campaign Name, Spent, Impressions, Clicks and Leads and save it to reports/li-campaigns.csv.

Guides and videos

app.portermetrics.com / create
Porter's Select accounts window for LinkedIn Ads with a demo account and the Connect button
First, in Porter, open LinkedIn Ads and select Connect.
LinkedIn sign-in screen you see when you connect LinkedIn Ads to Porter
Then, sign in to LinkedIn to authorize Porter.
$ claude mcp add --transport http --scope user porter https://mcp.portermetrics.com/mcp

$ claude mcp list
porter: https://mcp.portermetrics.com/mcp (HTTP)
Then, add Porter's MCP server from your terminal.
> /mcp
porter · needs authentication → Authenticate

> Which LinkedIn Ads accounts can you see?
● porter - list_accounts (MCP)
Trailgear Demo
After you sign in from /mcp, Claude Code lists your LinkedIn Ads accounts.
02Use cases and prompts

What you can do in Claude Code

Claude Code works inside your project, so LinkedIn Ads answers can become files, scripts and dashboards instead of chat replies. Each use case has a prompt to copy and uses the LinkedIn Ads fields Porter reads.

Can Claude Code export LinkedIn Ads data?

The problemCampaign Manager exports need cleanup before anyone can use them.

What Claude Code doesClaude Code pulls Campaign Group Name, Campaign Name, Spent, Impressions, Clicks and Leads through Porter and writes them to a CSV.

What you getA clean campaign file in your repo, ready for a model or a teammate.

Prompt
For the last 30 days, by Campaign Group Name and Campaign Name, pull Campaign Objective Type, Spent, Impressions, Clicks and Leads from LinkedIn Ads and save it as data/linkedin-30d.csv.

Which seniorities and job functions bring leads cheapest?

The problemLinkedIn’s audience breakdowns live in separate reports.

What Claude Code doesClaude Code pulls Spent and Leads by Seniority, Job Function and Company Size and calculates cost per lead for each.

What you getThe audiences worth more budget, in one file.

Prompt
For my lead generation campaigns in the last 30 days, show Spent, Clicks and Leads by Seniority, then by Job Function, then by Company Size. Calculate cost per lead and save the three tables to reports/li-audiences.md.

Can I schedule a LinkedIn Ads report with Claude Code?

The problemCampaign Manager shows lead counts, but cost per lead by campaign needs a spreadsheet every week.

What Claude Code doesA scheduled claude -p run pulls Spent, Clicks and Leads per campaign for both weeks and works out cost per lead.

What you getreports/li-weekly.md ranking campaigns by cost per lead, week over week.

Prompt
claude -p "Compare last week with the week before for every LinkedIn Ads campaign: Spent, Clicks, Leads and cost per lead. Write it to reports/li-weekly.md" --allowedTools "mcp__porter" "Write"

Can Claude Code compare LinkedIn Ads and X Ads?

The problemB2B teams run both, but each reports in its own columns.

What Claude Code doesClaude Code pulls spend and clicks from both through the same porter server and writes one table.

What you getOne file with both platforms side by side.

Prompt
For the last 30 days, pull Spent and Clicks from LinkedIn Ads and Spend and Link clicks from X Ads, by week, and save one comparison table to reports/linkedin-vs-x.csv.

Can Claude Code match LinkedIn leads with my pipeline?

The problemLead counts look good until you check which ones became opportunities.

What Claude Code doesClaude Code reads your CRM export in the project, pulls LinkedIn Leads by campaign and joins them by campaign name.

What you getPipeline by LinkedIn campaign, not only lead counts.

Prompt
Read data/crm-opportunities.csv, count opportunities by utm_campaign, then pull LinkedIn Ads Leads and Spent by Campaign Name for the same months and save cost per opportunity to reports/li-pipeline.csv.
03Why Porter

Why Porter for LinkedIn Ads in Claude Code

Porter reads every LinkedIn ad account your login has a role on, with no developer app or Marketing API approval, and puts LinkedIn next to 30+ other marketing sources behind the same server.

✓

One server for all your sources

The same porter server answers about LinkedIn Ads, Meta Ads, Google Ads, GA4 and Shopify, so one script can pull every channel.

⊞

Changes only after you approve

Claude Code can make changes through Porter where the platform allows them, and each change waits for your yes.

⚙

No Marketing API approval

You sign in with LinkedIn in Porter and with Google in Claude Code. There is no LinkedIn developer app or API access request to wait for.

↻

Hosted dashboards when a file isn’t enough

Ask for a Porter AI dashboard and it is published at its own link, synced automatically and ready to share with a client.

04Dashboard

Dashboard template

Start from a ready-made LinkedIn Ads template, or ask Claude Code to build a live one with AI dashboards.

AI dashboards

Build a live LinkedIn Ads dashboard from the chat

Describe the dashboard in one sentence and Porter builds it. A client-ready dashboard in minutes, with no chart dragging and no BI tool to learn. Ask Claude Code:

Prompt
Build a live LinkedIn Ads dashboard for my account with the last 30 days, the main KPIs and a weekly trend.
Live URLEach dashboard at its own link: no login, no app, no download
Auto-syncFresh LinkedIn Ads data, nobody re-exports each period
Scheduled deliveryEmail or PDF sends on a set day
White labelYour logo and branding for clients
Sharing permissionsView or edit access per person

Open the live LinkedIn Ads dashboard

LinkedIn Ads dashboard template by Porter
Template

The LinkedIn Ads dashboard template

Start from Porter’s official LinkedIn Ads dashboard template, or run the prompt above in Claude Code and Porter publishes the dashboard at its own link.

Or start from a template

05Pricing

Pricing

You can start free, since Porter’s LinkedIn Ads connector for Claude comes with every plan. Use the calculator for your number of accounts, or see Porter pricing for every plan.

What you get

  • Free plan: never expires, with unlimited connected accounts and the last 15 days of data in Claude (30 days in Data Studio and Sheets)
  • Reporting: from $12.50 per account a month billed annually, or $15 month to month for one account
  • Billing: each LinkedIn ad account counts as one account once it returns data, with volume discounts and no per-seat fee
  • Changes: 1 AI credit per completed change; failed tasks are free, and the Free plan includes 100 credits a month
  • Trial: 14 days of full access, no card

Price calculator

$33.33/mo$6.67 per account

An account is one ad account, Stripe account, store, page or GA4 property. The Free plan never expires and has unlimited accounts, with the last 15 days of data in AI chats.

06Data and actions

LinkedIn Ads data and actions in Claude Code

The LinkedIn Ads connector gives Claude 226 fields across ad accounts, campaign groups, campaigns, creatives, leads, conversions, video, engagement, Reach and audience breakdowns. It also gives Claude 18 actions to read, create, change and delete. If you need any label, look it up in the LinkedIn Ads fields list.

The 12 LinkedIn Ads fields Claude uses most

These 12 field groups answer most questions, so start with them.

FieldWhat it's for
Date · Weeklinkedin_ads_date · linkedin_ads_weekTrends by day or week
Account Namelinkedin_ads_accountNameComparing several ad accounts
Campaign Group Namelinkedin_ads_campaignGroupNameGroup budgets and programs
Campaign Namelinkedin_ads_campaignNameRanking campaigns
Campaign Objective Typelinkedin_ads_campaignObjectiveTypeLead generation vs brand awareness vs website visits
Creative Titlelinkedin_ads_creativeTitleComparing creatives and spotting wear-out
Impressions · Clickslinkedin_ads_impressions · linkedin_ads_clicksDelivery, and CTR calculated by Claude
Spentlinkedin_ads_costInLocalCurrencySpend in the account currency, the base of every cost-per figure
Leads · One Click Lead Form Openslinkedin_ads_oneClickLeads · linkedin_ads_oneClickLeadFormOpensCost per lead and form completion
Conversions · Post Click Conversionslinkedin_ads_externalWebsiteConversions · linkedin_ads_externalWebsitePostClickConversionsInsight Tag website results
Seniority · Job Function · Company Size · Member Company Namelinkedin_ads_memberSeniority · linkedin_ads_memberJobFunction · linkedin_ads_memberCompanySize · linkedin_ads_memberCompanyNameWho the ads reached, one breakdown at a time
Reachlinkedin_ads_approximateUniqueImpressionsUnique members reached, 92 days at most

Can Claude pause, edit or create LinkedIn Ads campaigns?

Yes. Claude creates campaign groups, campaigns and ads from existing posts, then pauses or activates all three. It also changes names, budgets, bids, schedules and targeting. To change an ad's text, Claude creates a new ad from a new post, while lead forms, Matched Audiences and conversion rules stay in Campaign Manager as usual.

How fresh is the data, and how far back?

Performance data reaches Claude in near real time, including today as a partial day. Audience breakdowns, however, arrive 12–24 hours later (LinkedIn's reporting retention and delays). LinkedIn keeps 10 years of performance data, compared to 2 years of audience data. Porter's free plan covers the last 15 days in Claude (30 days in Data Studio and Sheets), while paid plans have no history cap.

Product stats

WhatLinkedIn Ads connector
Fields226 across ad accounts, campaign groups, campaigns, creatives, leads, conversions, video, engagement, Reach and audience breakdowns
Actions18 to read, create, change and delete; new campaign groups, campaigns and ads start as drafts
FreshnessPerformance data in near real time, with today as a partial day; audience breakdowns 12–24 hours later
HistoryLinkedIn keeps 10 years of performance data (yearly totals tested back to 2016) and 2 years of audience data; no cap on paid plans; the last 15 days in Claude on the Free plan (30 days in Data Studio and Sheets)
ReachUp to 92 days per question, by day or month
Audience breakdownsOne per question, per campaign
AccessViewer reads reports; Campaign Manager or Account Manager changes campaigns and ads

See all 226 LinkedIn Ads fields

07Security

Is it safe?

Yes, with approvals: the LinkedIn Ads connector for Claude Code shows every change before Porter sends it. New campaign groups, campaigns and ads are created as drafts that don't serve or spend, while only drafts can be deleted. Porter signs in through LinkedIn's OAuth, then acts only with the role you already have on the ad account.

How you approve changes

Claude asks before every write, and you activate drafts from the top down: campaign group, then campaign, then ad. It lists each change first, such as a new daily budget or a paused creative, and waits for you to confirm. Deletes are permanent, so Claude asks before each one.

Porter enables each ad account for changes once, and until then LinkedIn refuses the change, so nothing in the account is modified.

What the connector needs from LinkedIn Ads

Porter needs a LinkedIn sign-in with a role on the ad account, because that role decides what Claude can change (LinkedIn ad account roles). Viewer reads reports. Creative Manager can change ads, while Campaign Manager or Account Manager can change campaigns and ads.

LinkedIn access lasts 60 days and renews for up to a year, then you sign in again (LinkedIn's 60-day access tokens).

08FAQ

FAQ

Answers on setup, scope, scripts and credits, plus fixes for the most common Claude Code errors with LinkedIn Ads. Setup questions every source shares, like where Claude Code saves the server and how to share it with your team, are in the Claude Code hub FAQ.

Can I put LinkedIn Ads leads next to HubSpot contacts?

Yes. Connect HubSpot in Porter and ask for new contacts by original source next to LinkedIn Ads Leads. Claude Code reads both through one server and writes them to the same report.

Why are some audience breakdowns empty?

LinkedIn hides audience breakdowns with very few members to protect privacy, so small segments can show no data. Widen the date range or group by a broader field.

Do Claude Code questions use Porter credits?

Reading LinkedIn Ads data uses no AI credits. Each completed change, such as a budget change, uses 1 credit, and every Porter account gets 100 free credits a month.

Troubleshooting

Why does /mcp show porter as needing authentication?

Claude Code adds the server before you sign in. Pick porter in /mcp, choose Authenticate and sign in with the Google account you use in Porter.

Why does my claude -p script stop and ask for permission?

Scripts can’t answer permission prompts. Pass the tools the script may use, for example --allowedTools "mcp__porter" "Write", so Claude Code can read Porter and save files without stopping.

Why does Claude Code see my ad accounts but return no data?

Usually the LinkedIn login has no role on that ad account, or the range had no delivery. Check the user’s role in Campaign Manager, then ask again with a range that had spend.

09Next

More Claude connectors

Porter connects many sources to Claude, and also sends LinkedIn Ads to more places than Claude. Browse all Claude connectors, then add your other ad platforms and CRM. You can also copy a dashboard, send the data to a warehouse, or use Porter's MCP server outside Claude. For B2B paid social beyond LinkedIn, add the Reddit Ads MCP connector for Claude.

Not only Claude. Send LinkedIn Ads data anywhere

The same Porter account and connection also send LinkedIn Ads data to these destinations, at no extra cost.

Try the connector in Claude Code

Porter’s LinkedIn Ads connector for Claude Code takes one command, so your first campaign file can land in your project today. Start with a CSV, then break leads down by audience or schedule a weekly script.

Free plan · 14-day trial · No card needed

B2B marketers: cost per lead by seniority and job function comes out as one file.

Demand gen managers: LinkedIn leads meet your pipeline export in the same project.

Agencies: one script builds the Monday report for every client ad account.