LinkedIn Ads

v1.0.2
com.getmcpads/linkedin-ads Checked 1 day ago Published 24 days ago

LinkedIn Ads MCP server: 18 read tools, 15 opt-in preview-first writes.

Values you need

VariableWhat it is
LINKEDIN_ADS_ACCESS_TOKENoptional secret Member access token from your own LinkedIn app, with r_ads and r_ads_reporting. Keep it secret.
LINKEDIN_ADS_REFRESH_TOKENoptional secret Programmatic refresh token. With the client ID and secret, the token is renewed in memory.
LINKEDIN_ADS_CLIENT_IDoptional Client ID of your LinkedIn app, needed for refresh.
LINKEDIN_ADS_CLIENT_SECREToptional secret Client secret of your LinkedIn app, needed for refresh.
LINKEDIN_ADS_ACCOUNT_IDSrequired Comma-separated numeric ad account IDs this server may access, 1 to 100. Required even for reads.
LINKEDIN_ADS_SCOPESoptional Scopes actually granted to the token. When set, writes require rw_ads.
LINKEDIN_ADS_ENABLE_WRITESoptional true exposes the 15 write tools. Defaults to false.
LINKEDIN_ADS_API_VERSIONoptional LinkedIn-Version header as YYYYMM. Defaults to 202608.
LINKEDIN_ADS_LOG_LEVELoptional 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-mcp
Add 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

  1. Ask the user for: LINKEDIN_ADS_ACCOUNT_IDS. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. 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).
  3. Restart or reload the client so it starts the server.
  4. 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