LinkedIn MCP Server

LinkedIn MCP Server

Enables AI agents with read/write access to LinkedIn API, including profile, posts, media, organizations, comments, reactions, and analytics.

Category
Visit Server

README

LinkedIn MCP Server

npm version License: MIT

A Model Context Protocol (MCP) server that provides AI agents with read/write access to the LinkedIn API.

Features

  • Profile Tools: Fetch user profile and email.
  • Post Tools: Create text, link, image, and document posts. Delete posts.
  • Media Tools: Upload images and documents to LinkedIn.
  • Organization Tools: Fetch organization details, post on behalf of an organization, fetch and delete org posts.
  • Social Action Tools: Fetch, create, and delete comments on posts. Add or remove reactions (like, celebrate, etc.).
  • Organization Analytics Tools: Get organization page, follower, and share statistics.

Prerequisites

You need a LinkedIn Access Token. Create an app on the LinkedIn Developer Portal, then either:

  • Use the built-in OAuth flow (see Development Setup), or
  • Generate a token manually from the developer portal.

Quick Start (npm — recommended)

The easiest way to use this server is via the published npm package. No cloning required.

Install globally

npm install -g @himanshu31shr/linkedin-mcp-server

Then run it:

LINKEDIN_ACCESS_TOKEN=your-token linkedin-mcp-server

Or run directly with npx

LINKEDIN_ACCESS_TOKEN=your-token npx -y @himanshu31shr/linkedin-mcp-server

MCP Client Configuration

Claude Desktop

Add the following to your claude_desktop_config.json:

Using npx (no install needed):

{
  "mcpServers": {
    "linkedin": {
      "command": "npx",
      "args": ["-y", "@himanshu31shr/linkedin-mcp-server"],
      "env": {
        "LINKEDIN_ACCESS_TOKEN": "your-linkedin-access-token"
      }
    }
  }
}

Using a global install:

{
  "mcpServers": {
    "linkedin": {
      "command": "linkedin-mcp-server",
      "env": {
        "LINKEDIN_ACCESS_TOKEN": "your-linkedin-access-token"
      }
    }
  }
}

Using a local clone:

{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/path/to/linkedin-mcp-server/dist/index.js"],
      "env": {
        "LINKEDIN_ACCESS_TOKEN": "your-linkedin-access-token"
      }
    }
  }
}

Cursor

In Cursor's Settings > AI > MCP Servers, add a new server:

  • Type: command
  • Name: linkedin
  • Command: npx -y @himanshu31shr/linkedin-mcp-server
  • Environment Variables: Add LINKEDIN_ACCESS_TOKEN with your token.

Antigravity / Windsurf / Other MCP Clients

Use the same pattern — point the MCP client to:

npx -y @himanshu31shr/linkedin-mcp-server

And set the LINKEDIN_ACCESS_TOKEN environment variable.

Available Tools

Tool Description
get_profile Fetch the authenticated user's LinkedIn profile
get_email Fetch the authenticated user's email address
create_text_post Create a text-only post
create_link_post Create a post with a link attachment
create_image_post Create a post with an image
create_document_post Create a post with a document (PDF, etc.)
delete_post Delete a post by URN
upload_image Upload an image to LinkedIn
get_organization Fetch organization details
create_org_post Create a post on behalf of an organization
get_org_posts Fetch recent posts for an organization
delete_org_post Delete an organization post
get_post_comments Fetch comments on a post
create_comment Add a comment to a post
delete_comment Delete a comment
add_reaction Add a reaction to a post
remove_reaction Remove a reaction from a post
get_org_page_statistics Get organization page statistics
get_org_follower_statistics Get organization follower statistics
get_org_share_statistics Get organization share statistics

Development Setup

If you want to contribute or run from source:

  1. Clone and install:

    git clone https://github.com/himanshu31shr/linkedin-mcp-server.git
    cd linkedin-mcp-server
    npm install
    
  2. Build:

    npm run build
    
  3. Get a LinkedIn Access Token (automated OAuth flow):

    npm run auth
    

    Follow the prompts — this will save your LINKEDIN_ACCESS_TOKEN to the .env file automatically.

  4. Run locally:

    npm run dev
    

Scripts

Script Description
npm run build Compile TypeScript to JavaScript
npm run dev Run in development mode with tsx
npm run auth Run the OAuth token flow
npm test Run tests with Vitest
npm run test:coverage Run tests with coverage report
npm run lint Type-check with TypeScript
npm run inspect Launch MCP Inspector for debugging

Releasing a New Version

The CD pipeline automatically publishes to npm when a version tag is pushed.

# Bump version (creates commit + tag automatically)
npm version patch   # or: npm version minor / npm version major

# Push commit and tag to trigger publish
git push origin main --tags

The pipeline will:

  1. Validate the tag matches package.json version
  2. Run lint, tests, and build
  3. Publish to npm with provenance
  4. Create a GitHub Release with auto-generated notes

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured