liads-mcp-server
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
liads-mcp-server
An MCP server for LinkedIn Ads (Campaign Manager). It lets an AI agent read results and build, run and pause small LinkedIn campaigns, with safety rules in the code instead of in the prompt.
Status: early. The tests run against a mocked LinkedIn API; the payloads follow LinkedIn's Marketing API docs (version 202610) but haven't been run against a live ad account yet. Try it first in an ad account without a payment method, where nothing can spend.
How writes work
Every write tool (draft_*, pause_entity, enable_entity) only stores a plan and returns a preview. Nothing changes in LinkedIn until confirm_and_apply, which you put on your MCP client's ask list. confirm_and_apply(dry_run=true) re-checks every rule and the ad account without writing; LinkedIn has no validate-only mode, so this is the closest thing to one. Each plan is reported on its own. If a step fails, the steps before it stay applied (new objects are drafts) and applying the plan again continues from the failed step, so nothing is created twice. A plan ID listed twice is refused.
Whatever the caller asks, the server:
creates campaign groups, campaigns and ads as
DRAFT; switching on is onlyenable_entity, its own plan and its own approval, and the campaign is checked again just before;keeps audience expansion and the LinkedIn Audience Network off, bids manual CPC, and requires a daily budget, a lifetime budget and an end date;
refuses budgets and bids over the caps in your config; a rise in budget or bid is its own plan;
refuses ad accounts that aren't in
ads.allowed_accounts;builds image ads on hidden posts (
feedDistribution: NONE), so nothing appears on your company page feed;reads images and conversion CSVs only from
uploads.allowed_dir;hashes emails (SHA-256) before a conversion upload leaves your machine;
never retries a write, so a timeout can't create a duplicate;
talks only to
api.linkedin.comandwww.linkedin.com, with no telemetry;writes every applied step to a JSONL audit log.
Related MCP server: LinkedIn Ads MCP Server
Tools
Kind | Tools |
Read |
|
Draft (stores a plan) |
|
Apply |
|
List tools return {elements, count, truncated} and follow LinkedIn's pages up to 1,000 items. get_analytics reports by campaign or ad, and by who clicked: job title, job function, seniority, company size, industry, company, country and region. Conversions there are LinkedIn's count, which includes view-through.
Setup
LinkedIn developer app at https://www.linkedin.com/developers/apps, linked to your company page (a page admin confirms it).
Under Products, add Advertising API (the Development tier is enough: it reads any number of ad accounts and edits up to five) and Conversions API.
Under Auth, add the redirect URL
http://localhost:8787/callback.
Roles: the LinkedIn user who signs in needs an editing role on each ad account (Account Manager or Campaign Manager).
Install (Python 3.11+):
pip install git+https://github.com/teamniteo/liads-mcp-server, or run it withuvx --from git+https://github.com/teamniteo/liads-mcp-server liads-mcp-server.Config in a folder outside git, named by
LIADS_CONFIG:linkedin: client_path: /path/to/liads/client.json # {"client_id": "...", "client_secret": "..."} token_path: /path/to/liads/token.json # written by `liads-mcp-server login`, mode 0600 api_version: "202610" # LinkedIn-Version; bump once a year redirect_port: 8787 ads: allowed_accounts: [512345678] # ad account IDs this server may change safety: max_daily_budget: 20 # in the ad account's currency max_lifetime_budget: 1500 max_bid: 15 log_file: /path/to/liads/audit.log uploads: allowed_dir: /path/to/images-and-csvsSign in:
LIADS_CONFIG=/path/to/config.yaml liads-mcp-server login. It opens LinkedIn's consent page and stores the tokens. Scopes:r_ads rw_ads r_ads_reporting rw_conversions w_organization_social(the last one is for the hidden posts behind image ads).Connect it as a stdio MCP server running
liads-mcp-serverwithLIADS_CONFIGset. For Claude Code:{ "mcpServers": { "linkedin-ads": { "command": "liads-mcp-server", "env": { "LIADS_CONFIG": "/path/to/liads/config.yaml" } } } }Allow the read and draft tools, and keep
confirm_and_applyon the ask list.
health_check shows when the access and refresh tokens expire and how long the pinned API version is still supported. LinkedIn retires each version about a year after release: bump api_version before then.
Conversion upload CSV
Columns: email, li_fat_id (LinkedIn's click ID, if you stored it), happened_at (YYYY-MM-DD or an ISO time), value (optional) and event_id (optional, for de-duplication). Rows without an email or click ID, and rows older than 90 days, are skipped and counted in the preview.
Development
uv run --extra test pytestThe tests mock LinkedIn's API with respx: rules on every write, plan references, no retries on writes, the upload host check, email hashing, and Rest.li query encoding.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Open-source ad agent for LinkedIn Ads and Google Ads. Drafts campaigns, audiences and reports.
LinkedIn ads, ABM and CRM data for AI agents: reports, audits, and campaign management.
Run LinkedIn Ads: campaigns, ABM audiences and cost forecasts. Changes wait for approval.
LinkedIn Ads MCP server: run LinkedIn campaigns, ad groups, ads and reports from AI.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables management and analysis of LinkedIn ad campaigns, including listing accounts, campaigns, creatives, and retrieving analytics, through natural language queries.66 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to audit and analyze LinkedIn Campaign Manager accounts, campaigns, targeting, creatives, performance, and audience demographics without requiring a LinkedIn Developer App.MIT
- AlicenseCqualityBmaintenanceEnables AI agents to authenticate with LinkedIn via OAuth, look up profiles and organizations, create and manage posts, comments, reactions, and media uploads, and handle ad campaign management, all with dry-run previews for write operations.341MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access, analyze, and manage LinkedIn advertising data, including campaigns, creatives, audiences, and conversions, with full create, update, and delete capabilities plus analytics via natural language.43MIT