npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@maheidem/linkedin-mcp

v2.2.0

Published

Comprehensive LinkedIn API MCP server with automatic Claude configuration

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