Back to Guides

How to Connect LinkedIn to ChatGPT

Connect the LinkedIn API to ChatGPT via MCP. Analyze company pages, posts, and follower analytics with natural language using AnythingMCP.

Analyze Your LinkedIn Presence with ChatGPT

LinkedIn has no official MCP connector. With AnythingMCP, you can convert LinkedIn's Marketing and Community Management APIs into an MCP server and let ChatGPT analyze your company page performance.

Step-by-Step Guide

Step 1: Deploy AnythingMCP

git clone https://github.com/HelpCode-ai/anythingmcp.git
cd anythingmcp && docker compose up -d

Step 2: Get LinkedIn API Access

Create an app at https://www.linkedin.com/developers/. Request the Marketing APIs product. Generate an OAuth 2.0 access token with r_organization_social and r_organization_followers scopes.

Step 3: Create a REST Connector

Create a REST connector with base URL https://api.linkedin.com/v2. Set Bearer token authentication and add X-Restli-Protocol-Version: 2.0.0 header.

Step 4: Expose Key Endpoints

  • GET /organizationalEntityFollowerStatistics — Follower demographics
  • GET /organizationalEntityShareStatistics — Post performance
  • GET /shares — Published posts
  • GET /organizationPageStatistics — Page views and visitors

Step 5: Connect ChatGPT

{
  "mcpServers": {
    "linkedin": {
      "url": "http://localhost:4000/mcp"
    }
  }
}

Step 6: Analyze Your LinkedIn Performance

  • "How many new followers did our company page gain this month?"
  • "Which posts had the highest engagement?"
  • "What industries are our followers from?"
  • "Compare our page performance this quarter vs last quarter"

Next Steps