LinkedIn Ads
v1.0.2LinkedIn Ads MCP server: 18 read tools, 15 opt-in preview-first writes.
Values you need
| Variable | What it is | |
|---|---|---|
LINKEDIN_ADS_ACCESS_TOKEN | optional secret | Member access token from your own LinkedIn app, with r_ads and r_ads_reporting. Keep it secret. |
LINKEDIN_ADS_REFRESH_TOKEN | optional secret | Programmatic refresh token. With the client ID and secret, the token is renewed in memory. |
LINKEDIN_ADS_CLIENT_ID | optional | Client ID of your LinkedIn app, needed for refresh. |
LINKEDIN_ADS_CLIENT_SECRET | optional secret | Client secret of your LinkedIn app, needed for refresh. |
LINKEDIN_ADS_ACCOUNT_IDS | required | Comma-separated numeric ad account IDs this server may access, 1 to 100. Required even for reads. |
LINKEDIN_ADS_SCOPES | optional | Scopes actually granted to the token. When set, writes require rw_ads. |
LINKEDIN_ADS_ENABLE_WRITES | optional | true exposes the 15 write tools. Defaults to false. |
LINKEDIN_ADS_API_VERSION | optional | LinkedIn-Version header as YYYYMM. Defaults to 202608. |
LINKEDIN_ADS_LOG_LEVEL | optional | debug, info, warn or error. Logs go to stderr. Defaults to info. |
npm (npx)
Requires Node.js 18+
Run in a terminal
claude mcp add linkedin-ads -e 'LINKEDIN_ADS_ACCOUNT_IDS=<LINKEDIN_ADS_ACCOUNT_IDS>' -- npx -y --package=@getmcpads/linkedin-ads-mcp-server@1.0.2 linkedin-ads-mcpAdd to
claude_desktop_config.json{
"mcpServers": {
"linkedin-ads": {
"args": [
"-y",
"--package=@getmcpads/linkedin-ads-mcp-server@1.0.2",
"linkedin-ads-mcp"
],
"command": "npx",
"env": {
"LINKEDIN_ADS_ACCOUNT_IDS": "<LINKEDIN_ADS_ACCOUNT_IDS>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"linkedin-ads": {
"args": [
"-y",
"--package=@getmcpads/linkedin-ads-mcp-server@1.0.2",
"linkedin-ads-mcp"
],
"command": "npx",
"env": {
"LINKEDIN_ADS_ACCOUNT_IDS": "<LINKEDIN_ADS_ACCOUNT_IDS>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "LINKEDIN_ADS_ACCOUNT_IDS",
"id": "linkedin-ads-account-ids",
"password": true,
"type": "promptString"
}
],
"servers": {
"linkedin-ads": {
"args": [
"-y",
"--package=@getmcpads/linkedin-ads-mcp-server@1.0.2",
"linkedin-ads-mcp"
],
"command": "npx",
"env": {
"LINKEDIN_ADS_ACCOUNT_IDS": "${input:linkedin-ads-account-ids}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.linkedin-ads]
command = "npx"
args = ["-y", "--package=@getmcpads/linkedin-ads-mcp-server@1.0.2", "linkedin-ads-mcp"]
env = { "LINKEDIN_ADS_ACCOUNT_IDS" = "<LINKEDIN_ADS_ACCOUNT_IDS>" }For AI agents
- Ask the user for: LINKEDIN_ADS_ACCOUNT_IDS. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json