Summary
Read LinkedIn Campaign Manager through the Marketing API: ad accounts, campaign groups, campaigns and creatives, and ad analytics (impressions, clicks, spend, conversions, leads) by campaign, creative, day or member demographics such as company, job function and seniority.
Guided setup
Connect LinkedIn Ads to Microsoft Copilot in 2 minutes
Start a free trial on AnythingMCP Cloud, connect LinkedIn Ads in the guided setup, then add your MCP URL to Microsoft Copilot. No code and no server to run.
No credit card · 7-day trial · Self-host alternative available
Try asking
Example prompts for LinkedIn Ads
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → LinkedIn Ads, paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
LinkedIn Ads + Microsoft Copilot
Read LinkedIn Campaign Manager through the Marketing API: ad accounts, campaign groups, campaigns and creatives, and ad analytics (impressions, clicks, spend, conversions, leads) by campaign, creative, day or member demographics such as company, job function and seniority.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
LINKEDIN_ADS_CLIENT_ID, LINKEDIN_ADS_CLIENT_SECRET
Step 1 — Get credentials
- Create an app at
https://www.linkedin.com/developers/apps. LinkedIn requires the app to be linked to a LinkedIn Page. - Request the Advertising API product for the app and wait for LinkedIn's approval. The Development tier is enough for your own ad accounts.
- On the app's Auth tab, add the redirect URI
https://cloud.anythingmcp.com/api/mcp-oauth/callback(if you host AnythingMCP yourself:<your AnythingMCP URL>/api/mcp-oauth/callback) under Authorized redirect URLs. - Copy the Client ID and the Primary Client Secret from the same tab into
LINKEDIN_ADS_CLIENT_IDandLINKEDIN_ADS_CLIENT_SECRET. LeaveLINKEDIN_ADS_REFRESH_TOKENempty: the sign-in fills it in. - Install the connector, click Authorize with Provider and sign in with a LinkedIn member who has a role on the ad accounts. The connector asks for the scopes
r_ads(accounts, campaigns, creatives) andr_ads_reporting(analytics). - Run
linkedin_ads_list_my_ad_accounts. It lists the ad accounts the member can use, with the member's role on each, as URNs likeurn:li:sponsoredAccount:507404993. The other tools only need the number.
Read-only: the AI reads ad accounts, campaign groups, campaigns with budgets, bids, schedules and targeting, and creatives with their review result and the reason one is not serving. It cannot create, change, pause or start anything.
Analytics: impressions, clicks, spend, conversions and leads for a whole account or one campaign over any date range, as totals or per day, grouped by campaign, campaign group, creative or member demographics such as company, job function or seniority. Spend comes in the account currency or in USD. Performance data is near real time and kept 10 years. Demographic figures are approximate, arrive 12 to 24 hours late, are kept 2 years, show only the top 100 values per creative per day and leave out values with fewer than 3 events. Test accounts have no analytics, and an empty answer means no activity or no access, not an error.
Tokens: access tokens last 60 days. Approved Advertising API apps also get a refresh token that lasts one year, and the connector uses it to renew access automatically. When it expires, click Authorize with Provider again.
Limits: LinkedIn throttles per app and member per day, and analytics also by data volume. A 429 means wait and try again later. One analytics answer holds at most 15,000 rows.
Common errors: 401: authorize again. 403 USER_NOT_AUTHORIZED or ACCESS_DENIED: the member has no role on that account, or the app lacks the Advertising API product or the r_ads_reporting scope. 426 or a version error: LinkedIn no longer supports the API version the connector sends, so update the connector from the catalog.
The connector does not create or change anything in Campaign Manager: no new campaigns or creatives, and no changes to budgets, bids, targeting or status.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Microsoft Copilot
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Microsoft Copilot uses MCP servers through agents built in Copilot Studio: you add AnythingMCP to an agent as a tool, then publish the agent to Microsoft 365 Copilot and Teams. Copilot Studio connects from Microsoft's cloud over Streamable HTTP, which AnythingMCP supports.
- In Copilot Studio, open your agent (or create one), go to Tools and choose Add a tool → New tool → Model Context Protocol.
- Enter a Server name (for example
AnythingMCP), a Server description that says what the connector does, and the Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID. Copilot Studio uses the description to decide when to call the server. - Under authentication, choose API key, set Type to Header and the header name to
X-API-Key, then select Create. - In Add tool, choose Create a new connection, paste an MCP API key from AnythingMCP (MCP Servers → your server → API keys) and select Add to agent.
- Try it in the agent's Test pane: ask for something that needs the
LinkedIn Adstools. - Select Publish, then Channels → Microsoft 365 and Microsoft Teams, keep Make agent available in Microsoft Copilot selected and choose Add channel. See agent in Teams installs it for you; in Microsoft 365 Copilot, type @ and pick the agent.
Prefer per-user sign-in? Choose OAuth 2.0 → Dynamic discovery instead of an API key: each user then signs in to AnythingMCP the first time the agent calls it.
Self-hosting? Use your instance's public HTTPS address instead of https://cloud.anythingmcp.com. Copilot Studio connects from Microsoft's cloud, so localhost does not work.
Available tools
| Tool | What it does |
|---|---|
linkedin_ads_list_my_ad_accounts | List the ad accounts the authorized LinkedIn member has a role on, as account URNs (urn:li:sponsoredAccount:<id>) with the role (VIEWER… |
linkedin_ads_search_ad_accounts | Search the ad accounts the member can reach by status, with id, name, currency, type (BUSINESS or ENTERPRISE), status, servingStatuses… |
linkedin_ads_get_ad_account | Get one ad account by id: name, currency, type, status, servingStatuses, test flag and the organization or person it advertises for |
linkedin_ads_list_campaign_groups | List the campaign groups of an ad account with id, name, status, total budget, run schedule, objective and servingStatuses |
linkedin_ads_get_campaign_group | Get one campaign group by id with its budget, schedule, objective, status and serving statuses |
linkedin_ads_list_campaigns | List the campaigns of an ad account with id, name, campaignGroup, type, objectiveType, status, costType, dailyBudget, totalBudget, unitCost… |
linkedin_ads_get_campaign | Get one campaign by id with budget, bid, cost type, objective, schedule, full targeting criteria, locale and serving statuses |
linkedin_ads_list_creatives | List the creatives (ads) of an ad account with id, campaign, intendedStatus, isServing, servingHoldReasons, review status and the content… |
linkedin_ads_list_campaign_creatives | List the creatives of one campaign with id, intendedStatus, isServing, servingHoldReasons, review status and content reference |
linkedin_ads_get_creative | Get one creative by id: campaign, content reference, intended and serving status, review outcome and hold reasons |
linkedin_ads_get_account_analytics | Get performance for a whole ad account over a date range, grouped by one pivot: by CAMPAIGN (default), CREATIVE, CAMPAIGN_GROUP, or by… |
linkedin_ads_get_campaign_analytics | Get performance for one campaign over a date range, grouped by one pivot: by CREATIVE (default), by day with time_granularity DAILY, or by… |
Example prompts
- "How much did we spend on LinkedIn Ads last month, and what did each campaign cost per lead?"
- "Which job functions and seniority levels clicked most on our ads in the last 30 days?"
- "Show daily impressions, clicks and spend for our biggest campaign over the last two weeks."
- "Which of our creatives are not serving right now, and why?"
FAQ
Which Copilot is this for? Microsoft 365 Copilot at work, through agents built in Copilot Studio. The Microsoft Copilot app for personal accounts has no option to add your own MCP server.
What do I need? A work account with access to Copilot Studio (a license or a trial) to build the agent. People who use it in Microsoft 365 Copilot or Teams need access to the agent: share it with them, or ask an admin to publish it to the organization. If your organization applies data policies to Power Platform connectors, they cover MCP servers too.
The agent doesn't call the tools. Check that the header name is exactly X-API-Key and that the key belongs to the same MCP server as the URL, and make the server description specific: Copilot Studio uses it to decide when to call the server. Publish the agent again after each change; in an open chat, type "start over" to get the new version.
Next steps
- Connector landing page
- Connect to Claude
- Connect to ChatGPT
- Connect to Cursor
- Connect to Gemini
- Connect to Meta Muse
Was this guide helpful?