# linkedin-ads [Health: Active]

**Category:** 🎯 Marketing  
**Repository:** https://github.com/mharnett/mcp-linkedin-ads  
**GitHub Stars:** 0  
**npm Downloads (last month):** 1640  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/linkedin-ads

## Description
MCP server for LinkedIn Campaign Manager — campaigns, creatives, and analytics

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "linkedin-ads": {
    "command": "npx",
    "args": ["-y","mcp-linkedin-ads"],
    "env": {
      "LINKEDIN_ADS_CLIENT_ID": "",
      "LINKEDIN_ADS_CLIENT_SECRET": "",
      "LINKEDIN_ADS_ACCESS_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `LINKEDIN_ADS_CLIENT_ID`, `LINKEDIN_ADS_CLIENT_SECRET`, `LINKEDIN_ADS_ACCESS_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What linkedin-ads does

linkedin-ads exposes LinkedIn Campaign Manager data and operations through the Model Context Protocol. It is designed for account and campaign workflows, including campaign-group and campaign listing, account-level and campaign-level performance analysis, and flexible reporting by dimensions such as member seniority, device, or creative.

The server supports multiple LinkedIn ad accounts through named client configurations. This allows an operator to select an account context without placing client-specific account data in the source repository. A client-context tool can also provide the active configuration for a working directory.

## How it works

The server runs as a Node.js package and communicates with MCP clients over a local HTTP endpoint when started with `npm start`. Claude Code can connect to `http://localhost:3001`, and Claude Desktop can be configured with the server connection in its MCP configuration file.

Authentication uses LinkedIn OAuth credentials and access tokens. Requests are made against the LinkedIn Campaign Manager API using the configured client ID, client secret, access token, and ad account mapping. When a refresh token is configured, OAuth token rotation is handled automatically.

Reporting accepts date ranges and a time granularity. Flexible analytics requests can include a pivot, such as `MEMBER_SENIORITY`, to divide results into useful audience or delivery segments.

## Setup and configuration

Install the package with:

```bash
npm install mcp-linkedin-ads
```

Create a LinkedIn developer application with the required marketing and social scopes, then copy the example configuration to `config.json`. The configuration includes OAuth credentials and one or more named clients, each with an ad account ID and display name. Environment variables are recommended for production deployments:

- `LINKEDIN_ADS_CLIENT_ID`
- `LINKEDIN_ADS_CLIENT_SECRET`
- `LINKEDIN_ADS_ACCESS_TOKEN`
- `LINKEDIN_ADS_REFRESH_TOKEN` for token rotation
- `LINKEDIN_ADS_MCP_WRITE` to enable mutation access when supported

Keep credential-bearing configuration files out of source control. The server requires valid OAuth credentials and at least one configured client with an ad account ID.

## Tools and capabilities

The documented tool examples include:

- `linkedin_ads_get_client_context` for retrieving client configuration context.
- `linkedin_ads_list_campaigns` for listing campaigns for an ad account.
- `linkedin_ads_campaign_performance` for date-bounded campaign performance with a selected time granularity.
- `linkedin_ads_analytics` for pivot-based reporting, including demographic breakdowns.

The server includes seven tools in total. Its supported campaign data model includes statuses such as `DRAFT`, `ACTIVE`, `PAUSED`, and `ARCHIVED`, along with targeting concepts for job titles, seniority, functions, locations, flexible specifications, and exclusions.

For click-through-rate analysis, reports use `landingPageClicks` rather than total `clicks`. Total clicks can include social interactions such as likes, comments, and shares, so the two measures should not be treated as equivalent.

## Limitations and notes

The server currently exposes read-only tools by default. `LINKEDIN_ADS_MCP_WRITE=true` enables the write-mode gate, but mutation tools are intended for future create, update, pause, enable, or remove functionality and are not part of the current read-only tool set.

LinkedIn applies strict API rate limits. The server retries rate-limited requests with exponential backoff, but operators should still avoid unnecessary query frequency and batch work where practical. OAuth tokens can expire, so valid credentials and refresh configuration are important for long-running use.

The project is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/linkedin-ads/readme_

