LinkedIn MCP Server

LinkedIn MCP Server

MCP server for posting to LinkedIn, managing drafts, scheduling, commenting, and reacting, all from the terminal.

Category
Visit Server

README

LinkedIn MCP Server

An MCP (Model Context Protocol) server that lets Claude Code post to LinkedIn, manage drafts, schedule posts, comment, react, and more — all from your terminal.

What It Does

16 tools with a two-step safety system (every publish/delete requires explicit confirmation):

Tool What it does Safety
linkedin_auth OAuth login via browser
linkedin_status Check connection, token expiry, DB health Read-only
linkedin_drafts_list List all drafts (filter by tag) Read-only
linkedin_drafts_get Get full draft details Read-only
linkedin_posts_history View published post history Read-only
linkedin_schedule_list List scheduled posts Read-only
linkedin_drafts_save Save/update a draft Requires "CONFIRM"
linkedin_drafts_delete Delete a draft Requires "CONFIRM"
linkedin_schedule_add Schedule a draft for publishing Requires "CONFIRM"
linkedin_schedule_remove Cancel a scheduled post Requires "CONFIRM"
linkedin_react React to a post (LIKE, CELEBRATE, etc.) Requires "CONFIRM"
linkedin_comment Comment on a post Requires "CONFIRM"
linkedin_post Publish a post to LinkedIn Requires "POST IT"
linkedin_drafts_publish Publish a saved draft Requires "POST IT"
linkedin_delete Delete a published post Requires "DELETE IT"
linkedin_confirm Confirm any pending action

Setup (5 minutes)

1. Create a LinkedIn Developer App

  1. Go to linkedin.com/developers/apps
  2. Click Create app
  3. Fill in:
    • App name: anything (e.g. "My Claude MCP")
    • LinkedIn Page: link any company page you admin (or create one)
    • App logo: any image
  4. Under Auth tab:
    • Add redirect URL: http://localhost:8585/callback
  5. Under Products tab:
    • Request access to Share on LinkedIn and Sign In with LinkedIn using OpenID Connect
  6. Copy your Client ID and Client Secret from the Auth tab

2. Clone & Build

git clone <this-repo-url> ~/linkedin-mcp-server
cd ~/linkedin-mcp-server
npm install
npm run build

3. Add to Claude Code

Open your Claude Code settings and add the MCP server. You can do this by running:

claude mcp add linkedin -- node /path/to/linkedin-mcp-server/dist/index.js

Or manually add to your Claude Code settings (~/.claude.json or via the Claude Code UI):

{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/full/path/to/linkedin-mcp-server/dist/index.js"],
      "env": {
        "LINKEDIN_CLIENT_ID": "your_client_id_here",
        "LINKEDIN_CLIENT_SECRET": "your_client_secret_here"
      }
    }
  }
}

Replace /full/path/to/ with the actual path where you cloned the repo.

4. Authenticate

Restart Claude Code, then say:

"authenticate with linkedin"

Claude will call linkedin_auth, which opens a browser window for OAuth. Authorize, and you're done. Token is stored locally at ~/.linkedin-mcp-tokens.json (file permissions: 600).

Usage

Just talk to Claude naturally:

  • "Post this to LinkedIn: [your text]"
  • "Save this as a draft: [text]"
  • "Show me my drafts"
  • "Schedule draft X for tomorrow at 3pm"
  • "What's my LinkedIn connection status?"
  • "React to [post-urn] with CELEBRATE"

Every action that touches LinkedIn requires you to confirm with a keyword. Nothing gets published without your explicit "POST IT".

How It Works

  • OAuth 2.0: Starts a local server on port 8585, opens LinkedIn auth in browser, catches the callback
  • SQLite storage: Drafts, scheduled posts, and post history stored in ~/.linkedin-mcp/data.db
  • Config: Stored in ~/.linkedin-mcp/config.json (scopes, API tier)
  • Token: Stored in ~/.linkedin-mcp-tokens.json (auto-expires)
  • Safety middleware: Two-step confirmation for all write operations. High-risk actions (post, delete) need specific keywords ("POST IT", "DELETE IT")

Configuration

The server auto-creates ~/.linkedin-mcp/config.json on first run:

{
  "scopes": ["openid", "profile", "w_member_social"],
  "api_tier": "consumer"
}

If you have Community Management API access, change api_tier to "community_management" to unlock comment and reaction tools beyond your own posts.

Requirements

  • Node.js 18+
  • Claude Code (or any MCP-compatible client)
  • A LinkedIn account with a Developer App

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