Get the FREE Ultimate OpenClaw Setup Guide →

linkedin

LinkedIn Ads MCP Server - Connect LinkedIn Ads to AI assistants like Claude Desktop

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio wsofidelhi-linkedin-mcp-server npx linkedin-ads-mcp-server \
  --env LINKEDIN_ACCESS_TOKEN="your_token_here"

How to use

This MCP server connects LinkedIn Ads data to AI assistants like Claude Desktop through the Model Context Protocol. By running the LinkedIn Ads MCP Server, Claude Desktop can request campaign analytics, ad account information, and reporting data from your LinkedIn Marketing API accounts in a structured, context-aware way. The server authenticates requests via a LinkedIn access token and exposes a clean interface for Claude to ask for metrics such as campaign performance, reporting for specific date ranges, and ad account details. When configured in Claude Desktop, it acts as a bridge that translates natural-language prompts into precise LinkedIn API calls and returns structured results that Claude can present to you.

To use it, install the MCP server globally, configure Claude Desktop to point to the server via the provided mcpServers entry, and supply your LinkedIn access token. Typical prompts might be: "Show me my LinkedIn campaign performance", "Get analytics for last 30 days", or "List all my ad accounts". The server handles authentication, fetches data from the LinkedIn Marketing API, and returns findings in a machine-friendly format suitable for chat-based assistants.

The server supports features like campaign analytics and reporting, ad account management, and secure token-based authentication, all designed to integrate seamlessly with Claude Desktop for a smoother, data-driven advertising workflow.

How to install

Prerequisites:

  • Node.js (LTS) and npm installed on your system
  • Access to a LinkedIn Marketing API token with r_ads_reporting and rw_ads scopes

Installation steps:

# 1) Install the MCP server globally
npm install -g linkedin-ads-mcp-server

# 2) Ensure you have a LinkedIn access token ready (NOTE: replace with your token when configuring)

Configure Claude Desktop to use the MCP server (see setup below) and then start using the prompts to fetch LinkedIn data. If you prefer running directly via npx without a global install, you can also invoke the server with:

npx linkedin-ads-mcp-server

Environment variable guidance:

  • LINKEDIN_ACCESS_TOKEN: Your LinkedIn Marketing API access token with r_ads_reporting and rw_ads scopes. Keep this secret and do not commit to source control.

Troubleshooting tips:

  • If you receive authentication errors, re-generating a token with the correct scopes and updating the environment variable usually resolves it.
  • Ensure your LinkedIn app has Marketing API access approved by LinkedIn.
  • Check network access and firewall rules if the server cannot reach LinkedIn endpoints.

Additional notes

Notes and tips:

  • The MCP server expects an environment variable named LINKEDIN_ACCESS_TOKEN containing a valid LinkedIn Marketing API token.
  • When configuring Claude Desktop, use the provided mcpServers entry to point to the server and ensure the token is supplied in the env block.
  • If you rotate tokens, update the token in the Claude Desktop configuration to maintain seamless access.
  • Monitor API rate limits on the LinkedIn Marketing API to avoid throttling during heavy usage.
  • This MCP server focuses on analytics, reporting, and ad account data; for more advanced integration, consider extending the server with additional endpoints or scopes as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers