MCP HubMCP Hub
fredericbarthelet

linkedin-mcp-server

by: fredericbarthelet

An MCP Server for Linkedin API

25created 13/03/2025
Visit
LinkedIn
API

📌Overview

Purpose: To provide a server framework for interfacing with the LinkedIn Community Management API through the Model Context Protocol (MCP).

Overview: The LinkedIn MCP Server facilitates the integration with LinkedIn's Community Management API, allowing developers to manage community interactions easily. It supports both local and remote hosting options and implements a third-party authorization flow based on MVP specifications.

Key Features:

  • User Info Retrieval: Enables fetching details of the currently logged-in user, including name, headline, and profile picture to enhance user experience and provide personalized content.

  • Post Creation: Allows users to create new posts on LinkedIn, facilitating engagement and content sharing within communities.


Linkedin MCP Server

MCP server for interacting with the Linkedin Community Management API.

This MCP server:

  • Can be hosted locally or remotely, using HTTP+SSE transport defined in MCP.
  • Implements the Draft Third-Party Authorization Flow from MCP specs to delegate authorization to LinkedIn's OAuth authorization server.

⚠️ Disclaimer: The Third-Party Authorization Flow proposal status is currently in draft. The only MCP client currently implementing this specification of the protocol is the MCP Inspector.

Features

Tools

  • user-info - Get current logged-in user info (name, headline, and profile picture)
  • create-post - Create a new post on LinkedIn

Installation

Follow these instructions to run Linkedin MCP server on your host. You will need your own Linkedin client.

Requirements

  • Node 22 (lts/jod)
  • pnpm 10
  • A Linkedin client with Community Management API product installed and http://localhost:3001/callback added to authorized redirect URLs

Instructions

  • Install dependencies:
pnpm install
  • Create .env file and populate with your Linkedin client credentials and a random string secret value for JWT_SECRET:
cp .env.template .env && vi .env
  • Run the server:
pnpm run dev
  • Configure your MCP client to use this new server:
{
  "mcpServers": {
    "linkedin": {
      "url": "http://localhost:3001/sse"
    }
  }
}

Debugging

Start the MCP Inspector to debug this server (available as a package script):

pnpm run inspector

Access the inspector in your browser at http://localhost:5173

Acknowledgment