← back to guides
    integrationsbeginner2 minutes
    April 8, 2026

    How to Connect Claude Code to LinkedIn Ads via MCP (2026)

    Connect Claude Code to LinkedIn Campaign Manager in under 2 minutes using Cogny's managed MCP server. OAuth handled for you — no LinkedIn developer app, no API approval wait.

    TL;DR

    Cogny provides a managed, remote MCP server for LinkedIn Ads with built-in OAuth. Connect Claude Code to LinkedIn Campaign Manager without creating a LinkedIn developer app or waiting for Marketing API approval.

    What you get:

    • Single federated MCP server at app.cogny.com/mcp — tools determined by connected accounts
    • Campaign, ad group, and creative performance data
    • B2B audience insights and targeting analysis
    • Automatic token refresh and credential management
    • Works with Claude Code, Claude Desktop, Cursor, Windsurf, and any MCP client

    Time required: 2 minutes | Difficulty: Beginner | Prerequisites: LinkedIn Campaign Manager access


    Why Use a Managed MCP Server?

    The LinkedIn Marketing API has some of the highest barriers to entry:

    1. Create a LinkedIn developer app
    2. Request Marketing API access (requires company verification)
    3. Wait for approval (can take weeks)
    4. Implement OAuth 2.0 with 3-legged flow
    5. Handle token refresh (access tokens expire in 60 days)
    6. Host and maintain the server

    Cogny handles all of this. Sign in with LinkedIn, authorize access, and get a working MCP endpoint in 2 minutes.


    What Can Claude Do With LinkedIn Ads?

    With the LinkedIn Ads MCP server, Claude can:

    • Analyze campaign performance metrics (impressions, clicks, conversions, CPL)
    • Review audience targeting effectiveness
    • Compare ad formats (Sponsored Content, InMail, Text Ads, Video)
    • Identify underperforming campaigns and budget waste
    • Track lead gen form completion rates
    • Benchmark B2B campaign metrics

    Setup in 3 Steps

    Step 1: Create a Cogny Account

    Go to cogny.com, sign up, and create a warehouse.

    Step 2: Connect LinkedIn Ads

    In your dashboard, find LinkedIn Ads under the channels list and click connect.

    Sign in with your LinkedIn account that has Campaign Manager access. Select the ad accounts to connect.

    Step 3: Add to Claude Code

    In your Cogny dashboard, generate an API key. Then add the Cogny MCP server to your Claude Code config. This is the same endpoint for all Cogny integrations — the tools available are determined by which accounts you've connected.

    {
      "mcpServers": {
        "cogny": {
          "type": "http",
          "url": "https://app.cogny.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      }
    }
    

    Done. Claude now has read access to your LinkedIn Ads data — and any other platforms you connect through Cogny.


    Example Prompts

    • "Show me LinkedIn campaign performance for Q1 — CPL, CTR, and conversion rate"
    • "Which audience segments have the lowest cost per lead?"
    • "Compare Sponsored Content vs InMail campaign performance"
    • "Find campaigns spending more than $500/month with zero conversions"
    • "What's the trend in our LinkedIn CPL over the last 6 months?"

    Works With Any MCP Client

    • Claude Code (CLI) / Claude Desktop (Mac/Windows)
    • Cursor / Windsurf / Continue
    • Any custom client built with the MCP SDK

    Standard HTTP+SSE transport.


    Security

    • Read-only by default — Claude cannot modify campaigns
    • OAuth tokens encrypted in Supabase Vault
    • Automatic token refresh before expiry
    • Signed URLs with HMAC-SHA256 (5-minute expiry)
    • Revoke access anytime from Cogny or LinkedIn settings

    Compared to Self-Hosted

    FeatureCogny ManagedSelf-Hosted
    Setup time2 minutesWeeks
    LinkedIn dev appNot neededRequired
    Marketing API approvalNot neededRequired
    Token refreshAutomaticYou build
    Server hostingManagedYou host

    Common Questions

    Q: Do I need LinkedIn Marketing API access? No. Cogny's app already has Marketing API approval.

    Q: Does this work with LinkedIn Lead Gen Forms? Yes. Lead gen form data and completion metrics are accessible.

    Q: Can I analyze multiple ad accounts? Yes. Connect all accounts through Cogny — accessible via one MCP endpoint.


    Next Steps


    About Cogny MCP Servers

    Cogny provides managed, remote MCP servers for 12+ marketing and business platforms with built-in OAuth, token management, and enterprise-grade security.

    Last Updated: April 2026

    get started

    Try Cogny free

    Connect your marketing platforms to Claude Code in under 2 minutes. No credit card required.