@maheidem/linkedin-mcp

@maheidem/linkedin-mcp

Integrates with Claude to enable LinkedIn post creation, profile optimization, content generation, and analytics through natural language.

Category
Visit Server

README

@maheidem/linkedin-mcp

npm version License: MIT

A comprehensive LinkedIn API MCP (Model Context Protocol) server that integrates seamlessly with Claude Desktop/Code. This package provides full LinkedIn functionality including post creation, profile optimization, content generation, and analytics - all accessible through Claude's natural language interface.

šŸš€ Quick Start

Install and configure with a single command:

npx @maheidem/linkedin-mcp install

That's it! The installer will:

  • āœ… Install the MCP server
  • āœ… Automatically configure Claude Desktop/Code
  • āœ… Set up token storage
  • āœ… Provide setup instructions

šŸ“‹ Features

✨ Core Functionality

  • šŸš€ LinkedIn Posting: Create and publish posts with full formatting
  • šŸ” Profile Analytics: Get detailed insights and optimization recommendations
  • šŸ“Š Content Analytics: Track post performance and engagement metrics
  • šŸŽÆ Content Generation: AI-powered post creation with industry best practices
  • šŸ‘¤ Profile Management: Update and optimize LinkedIn profiles
  • šŸ” Secure OAuth: Robust token management with automatic refresh

šŸ›  Developer Features

  • šŸ“± Cross-Platform: Works on Windows, macOS, and Linux
  • šŸ”§ CLI Management: Easy installation, configuration, and maintenance
  • šŸ“– Comprehensive API: All LinkedIn REST API endpoints available
  • šŸ”’ Security First: Secure token storage and handling
  • šŸ“š Full Documentation: Complete API reference and examples

šŸ“¦ Installation Methods

Method 1: NPX Install (Recommended)

npx @maheidem/linkedin-mcp install

Method 2: Global Install + Setup

npm install -g @maheidem/linkedin-mcp
linkedin-mcp install

Method 3: Local Install

npm install @maheidem/linkedin-mcp
npx linkedin-mcp install

šŸ”§ CLI Commands

Installation & Setup

# Install and configure for Claude
linkedin-mcp install

# Check installation status  
linkedin-mcp status

# Set up LinkedIn OAuth credentials
linkedin-mcp auth

# Remove configuration
linkedin-mcp uninstall

Usage Examples

# Check if everything is working
linkedin-mcp status

# Set up authentication
linkedin-mcp auth

šŸ” Authentication Setup

After installation, you need to set up LinkedIn OAuth:

  1. Create LinkedIn App:

  2. Configure Redirect URI:

    • Add http://localhost:3000/callback to your app's redirect URIs
  3. Set Up Credentials:

    linkedin-mcp auth
    
  4. Complete OAuth Flow:

    • Use the LinkedIn OAuth flow to get an access token
    • The token will be automatically managed by the MCP server

šŸŽÆ Usage with Claude

Once installed, you can use LinkedIn functionality directly in Claude:

Creating Posts

Create a LinkedIn post about the latest developments in AI, targeting ML engineers and including relevant hashtags.

Profile Optimization

Analyze my LinkedIn profile and provide optimization recommendations for better visibility in the tech industry.

Content Strategy

Generate 5 LinkedIn post ideas about machine learning trends, each with different engagement strategies.

Analytics & Insights

Show me the performance metrics for my last 10 LinkedIn posts and identify the most engaging content types.

šŸ“Š Available Tools

The MCP server provides these tools to Claude:

šŸš€ Posting & Content

  • linkedin_create_post - Create and publish posts
  • linkedin_create_optimized_post - AI-generated optimized posts
  • linkedin_post_profile_update - Announce profile changes

šŸ“Š Analytics & Data

  • linkedin_get_user_posts - Retrieve your posts with pagination
  • linkedin_get_post_details - Detailed post analytics
  • linkedin_get_user_activity - Activity timeline and engagement

šŸ‘¤ Profile Management

  • linkedin_get_user_info - User profile information
  • linkedin_analyze_profile_from_data - Profile optimization analysis
  • linkedin_generate_optimized_content - Content generation for profiles

šŸ” Authentication

  • linkedin_get_auth_url - Generate OAuth URLs
  • linkedin_exchange_code - Handle OAuth token exchange

šŸ”§ Configuration

Claude Configuration Location

The installer automatically detects and configures:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json

Token Storage

Tokens are securely stored at:

  • All Platforms: ~/.linkedin-mcp/tokens/

Example Configuration

{
  "mcpServers": {
    "linkedin-complete": {
      "command": "node",
      "args": ["/path/to/server/linkedin-complete-mcp.js"],
      "env": {
        "LINKEDIN_TOKEN_STORAGE_PATH": "/home/user/.linkedin-mcp/tokens"
      }
    }
  }
}

šŸ› Troubleshooting

Installation Issues

# Check status
linkedin-mcp status

# Reinstall if needed
linkedin-mcp uninstall
linkedin-mcp install

Authentication Problems

# Reset credentials
linkedin-mcp auth

# Check token storage
ls ~/.linkedin-mcp/tokens/

Claude Integration Issues

  1. Restart Claude Desktop/Code after installation
  2. Check configuration file location matches your system
  3. Verify MCP server permissions

Common Solutions

  • "Server not found": Run linkedin-mcp install again
  • "Token expired": The server automatically refreshes tokens
  • "Permission denied": Check file permissions on token directory

šŸ“š API Reference

Core Methods

Creating Posts

// Through Claude's natural language interface:
"Create a post about AI trends with these key points: [points]"

// Direct API usage:
linkedin_create_post({
  text: "Your post content here",
  visibility: "PUBLIC"
})

Profile Analysis

linkedin_analyze_profile_from_data({
  name: "Your Name",
  currentHeadline: "Current headline",
  industry: "Technology"
})

See API_REFERENCE.md for complete documentation.

šŸ”’ Security & Privacy

  • šŸ” Secure Storage: Tokens encrypted and stored locally
  • šŸ”„ Auto-Refresh: Automatic token renewal
  • 🚫 No Data Collection: No analytics or tracking
  • šŸ  Local First: All processing happens on your machine

šŸ¤ Contributing

Contributions welcome! Please see our contributing guidelines.

Development Setup

git clone https://github.com/maheidem/linkedin-mcp
cd linkedin-mcp
npm install
npm run build

Testing & Examples

# Run unit tests
npm test

# Run example scripts
npm run test:examples
npm run test:oauth

# Try the demo
npm run demo

# Development mode
npm run dev

Project Structure

ā”œā”€ā”€ src/                    # TypeScript source code
ā”œā”€ā”€ dist/                   # Compiled JavaScript
ā”œā”€ā”€ examples/               # Usage examples and demos
ā”œā”€ā”€ tests/                  # Test files
ā”œā”€ā”€ docs/                   # Documentation
ā”œā”€ā”€ configs/                # Configuration templates
└── .github/workflows/      # CI/CD workflows

šŸ“„ License

MIT License - see LICENSE file for details.

šŸ™ Acknowledgments

Built with:

šŸ“ž Support


Made with ā¤ļø for the Claude community

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