Linkedin Ads Mcp

SSE

by danielpopamd

410 downloads Not rated yet

About

Access and analyze your LinkedIn Ads data. Built for marketers, founders, and growth teams who want to leverage AI for campaign optimization, performance reporting, and data-driven advertising decisions.

Details

Transport
SSE

Explore

- 14 Specialized Tools - Covering accounts, campaigns, creatives, audiences, conversions, and analytics
- Comprehensive Metrics - Every report includes: Spend, Impressions, Clicks, CTR, Reach, Frequency, Engagements, Engagement Rate, CPM, CPC, Conversions, Conversion Rate, Cost per Conversion, and Audience Penetration
- Single OAuth Authentication - Authenticate once and access all your LinkedIn ad accounts
- Automatic Token Refresh - Tokens refresh automatically before expiration
- Rate Limit Handling - Built-in exponential backoff for API rate limits
- Human-Readable Names - Demographic data shows actual names (not IDs) for seniorities, job functions, industries, and more

---

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Linkedin Ads Mcp
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository


Don't want to deal with technical stuff? Just copy one of the prompts below and paste it into Claude. The AI will do everything for you!

---

If you have Claude Code installed, just copy and paste this entire prompt:

<details>
<summary><strong>Click to expand the Claude Code installation prompt</strong></summary>


I want you to install the LinkedIn Ads MCP server so I can analyze my LinkedIn advertising data. Please do the following:

1. FIRST, check if Node.js is installed by running node --version. If not installed, tell me to install it from https://nodejs.org first.

2. Clone the repository to my home directory:
- cd ~
- git clone https://github.com/danielpopamd/linkedin-ads-mcp.git
- cd linkedin-ads-mcp

3. Install dependencies and build:
- npm install
- npm run build

4. Create the .env file with placeholder values:
- cp .env.example .env

5. NOW IMPORTANT - Ask me for my LinkedIn API credentials:
- Ask: "Please provide your LinkedIn Client ID (from https://www.linkedin.com/developers/apps)"
- Ask: "Please provide your LinkedIn Client Secret"

6. Update the .env file with the credentials I provide.

7. Set up Claude Desktop configuration:
- Read the current Claude Desktop config file:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%/Claude/claude_desktop_config.json
- Add the linkedin-ads MCP server to mcpServers (merge with existing config if any):
{
"mcpServers": {
"linkedin-ads": {
"command": "node",
"args": ["<FULL_PATH_TO>/linkedin-ads-mcp/dist/index.js"],
"env": {
"LINKEDIN_CLIENT_ID": "<MY_CLIENT_ID>",
"LINKEDIN_CLIENT_SECRET": "<MY_CLIENT_SECRET>"
}
}
}
}
- Replace <FULL_PATH_TO> with the actual path (e.g., /Users/username)
- Replace the env values with my actual credentials

8. Run the authentication flow:
- npm run auth
- This will open my browser - tell me to authorize the app with LinkedIn

9. Tell me to restart Claude Desktop to activate the MCP server.

10. After restart, confirm setup by telling me to ask Claude: "List my LinkedIn ad accounts"

If you don't have my LinkedIn API credentials yet, first explain how to get them:
- Go to https://www.linkedin.com/developers/apps
- Create a new app (need a LinkedIn Company Page)
- Go to Products tab and request "Advertising API" access
- Go to Auth tab and add redirect URL: http://localhost:3000/callback
- Copy the Client ID and Client Secret

Start now!


</details>

---

If you're using Claude Desktop directly (without Claude Code), copy this prompt to start a guided setup:

<details>
<summary><strong>Click to expand the Claude Desktop guided setup prompt</strong></summary>


I want to install the LinkedIn Ads MCP server to analyze my LinkedIn advertising data with Claude. I'm not technical, so please guide me step by step with simple instructions.

Please walk me through:

1. Check Prerequisites
- Do I have Node.js installed? (Tell me how to check and where to download if needed)
- Do I have a LinkedIn Developer App? (If not, guide me through creating one at https://www.linkedin.com/developers/apps)

2. Get LinkedIn API Access
Walk me through:
- Creating a LinkedIn Developer App
- Requesting Advertising API access (Products tab)
- Adding the redirect URL: http://localhost:3000/callback (Auth tab)
- Finding my Client ID and Client Secret

3. Download and Install
Give me the exact commands to run in my terminal (one at a time):
- How to open Terminal (Mac) or Command Prompt (Windows)
- Clone the repository
- Install dependencies
- Build the project

4. Configure Claude Desktop
- Tell me exactly where the config file is located
- Give me the exact JSON to add (with placeholders for my credentials)
- Show me how to edit the file

5. Authenticate with LinkedIn
- What command to run
- What to do when the browser opens

6. Test the Setup
- Tell me to restart Claude Desktop
- Give me a test question to ask

Please start with step 1 and wait for my response before moving to the next step. Use simple language and assume I've never used a terminal before.


</details>

---

Before using either installation method, you'll need:

1. Node.js (version 18 or higher) - Download here
2. A LinkedIn Company Page - Required to create a developer app
3. LinkedIn Developer App with Advertising API access - Create one here

1. Go to LinkedIn Developer Portal
2. Click "Create App"
3. Fill in:
- App name: "My LinkedIn Ads Analytics" (or anything you want)
- LinkedIn Page: Select your company page
- App logo: Upload any square image
4. After creating, go to "Products" tab → Request "Advertising API" (approval takes 1-5 days)
5. Go to "Auth" tab → Add redirect URL: http://localhost:3000/callback
6. Copy your Client ID and Client Secret - you'll need these!

---

If you prefer to install manually or want more control, follow the instructions below.

---

1. Go to the "Auth" tab in your app
2. Add this redirect URL: http://localhost:3000/callback
3. Verify these OAuth 2.0 scopes are available:
- r_ads - Read ad accounts
- r_ads_reporting - Read reporting data
- r_organization_social - Read organization posts (for creative content)

---

npm install

cp .env.example .env

Edit .env with your LinkedIn credentials:

LINKEDIN_CLIENT_ID=your_client_id
LINKEDIN_CLIENT_SECRET=your_client_secret

---

Run the authentication flow to get your access tokens:

npm run auth

This will:
1. Open your browser to LinkedIn's OAuth page
2. Ask you to authorize the application
3. Store your tokens locally in ~/.linkedin-ads-mcp/tokens.json
4. Tokens are valid for 60 days and auto-refresh

---

Add this to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "linkedin-ads": {
      "command": "node",
      "args": ["/full/path/to/linkedin-ads-mcp/dist/index.js"],
      "env": {
        "LINKEDIN_CLIENT_ID": "your_client_id",
        "LINKEDIN_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

Important: Replace /full/path/to/linkedin-ads-mcp with the actual path where you cloned this repository.

After updating the config, restart Claude Desktop for the changes to take effect.

---

npm run auth
```

---

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "linkedin ads mcp": {
            "linkedin-ads": {
                "command": "node",
                "args": [
                    "/full/path/to/linkedin-ads-mcp/dist/index.js"
                ],
                "env": {
                    "LINKEDIN_CLIENT_ID": "your_client_id",
                    "LINKEDIN_CLIENT_SECRET": "your_client_secret"
                }
            }
        }
    }
}

McpServers

{
    "linkedin-ads": {
        "command": "node",
        "args": [
            "/full/path/to/linkedin-ads-mcp/dist/index.js"
        ],
        "env": {
            "LINKEDIN_CLIENT_ID": "your_client_id",
            "LINKEDIN_CLIENT_SECRET": "your_client_secret"
        }
    }
}

License: MIT
Node.js Version
MCP Compatible

An MCP (Model Context Protocol) server that enables Claude AI to access and analyze your LinkedIn Ads data. Built for marketers, founders, and growth teams who want to leverage AI for campaign optimization, performance reporting, and data-driven advertising decisions.

---

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.