Linkedin-MCP-Server

imvinayakshukla/Linkedin-MCP-Server

3.2

If you are the rightful owner of Linkedin-MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The LinkedIn AI Agent is an AI-powered tool that integrates with Claude Desktop using Model Context Protocol (MCP) to automate and analyze LinkedIn activities intelligently.

Tools
  1. analyze-network

    Analyze LinkedIn network for specific criteria.

  2. explore-career-paths

    Find career paths between institutions/companies.

  3. research-profile

    Research profile for outreach insights.

  4. send-automated-messages

    Send personalized messages to targets.

  5. automate-connections

    Auto-connect with targeted professionals.

LinkedIn AI Agent

🤖 An AI-powered LinkedIn agent that integrates with Claude Desktop using Model Context Protocol (MCP) for intelligent LinkedIn automation and analysis.

🚀 Features

1. 🕵️‍♂️ Network Analysis

  • Query Example: "Show me GenAI movers in my network"
  • Analyzes LinkedIn connections for career transitions
  • Identifies professionals moving to AI/ML roles
  • Returns structured insights with transition details

2. 🧭 Career Path Explorer

  • Query Example: "Who from IIT Delhi, Flipkart joined OpenAI?"
  • Tracks career paths from specific schools/companies
  • Maps transitions to target organizations
  • Provides actionable networking insights

3. ✉️ Automated Messaging

  • Query Example: "Send messages to product managers at startups"
  • Drafts personalized LinkedIn messages
  • Targets connections based on criteria
  • Includes rate limiting and safety features

4. 👀 Profile Research Assistant

  • Input: LinkedIn profile URL
  • Output:
    • Key career highlights analysis
    • Common interests identification
    • Personalized outreach strategy
    • AI-generated message recommendations

5. ⚡ Connection Automation

  • Query Example: "Connect with 10 AI researchers from Bangalore"
  • Automates connection requests with personalized notes
  • Filters by geography, industry, and expertise
  • Built-in compliance and rate limiting

🛠️ Technology Stack

  • 🔗 Model Context Protocol (MCP): Claude Desktop integration
  • 🌐 Web Scraping: LinkedIn data extraction (Playwright/Puppeteer)
  • 🔍 Vector Search: Semantic search and intelligent filtering
  • 📊 TypeScript: Type-safe development
  • ⚡ Rate Limiting: LinkedIn compliance and safety

📋 Prerequisites

  • Node.js 18+
  • TypeScript 5+

📋 Prerequisites

  • Node.js 18+
  • Claude Desktop (for MCP integration)
  • LinkedIn account credentials

🚀 Quick Start

1. Installation

# Clone the repository
git clone <repository-url>
cd linkedin-ai-agent

# Install dependencies
npm install

# Copy environment template
cp .env.example .env

2. Configuration

Edit .env file with your credentials:

# LinkedIn Credentials (optional - for automation features)
LINKEDIN_EMAIL=your_email@example.com
LINKEDIN_PASSWORD=your_password

# Optional: Rate Limiting
REQUESTS_PER_MINUTE=10
REQUESTS_PER_HOUR=100
REQUESTS_PER_DAY=1000

3. Build & Setup

# Build the project
npm run build

# The MCP server will run automatically when Claude Desktop starts

4. Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "linkedin-ai": {
      "command": "node",
      "args": ["C:\\full\\path\\to\\build\\index.js"]
    }
  }
}

Configuration file locations:

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

🎯 Usage in Claude Desktop

Once configured, you can use these tools directly in Claude Desktop:

Network Analysis

"Show me GenAI movers in my network who transitioned in the last 6 months"

Career Path Exploration

"Who from IIT Delhi or MIT joined OpenAI or Anthropic?"

Profile Research

"Research this LinkedIn profile for a cold outreach strategy: https://linkedin.com/in/example"

Automated Messaging

"Draft personalized messages for 5 product managers at AI startups"

Connection Automation

"Connect with 10 AI researchers from San Francisco with a note about collaboration"
}

} }


### For VS Code

Create `.vscode/mcp.json`:

```json
{
  "servers": {
    "linkedin-ai-agent": {
      "type": "stdio",
      "command": "node",
      "args": ["./build/index.js"]
    }
  }
}

📊 Available MCP Tools

ToolDescriptionParameters
analyze-networkAnalyze LinkedIn network for specific criteriaquery, filters
explore-career-pathsFind career paths between institutions/companiesquery, sourceFilters, targetFilters
research-profileResearch profile for outreach insightsprofileUrl, purpose
send-automated-messagesSend personalized messages to targetstargetCriteria, messageTemplate, maxMessages
automate-connectionsAuto-connect with targeted professionalstargetCriteria, connectionNote, maxConnections

🛡️ Rate Limiting & Safety

  • Built-in rate limiting to comply with LinkedIn's terms
  • Dry-run mode for testing before actual execution
  • Session management to avoid detection
  • Error handling with graceful degradation
  • Configurable delays between requests

🎨 Customization

Adding New Tools

  1. Create new tool in src/tools/
  2. Implement the tool interface
  3. Register with MCP server in src/index.ts

Custom Filters

Modify search criteria in src/types/index.ts:

export interface TargetCriteria {
  roles?: string[];
  companies?: string[];
  industries?: string[];
  locations?: string[];
  keywords?: string[];
  // Add custom filters here
}

📈 Performance & Scaling

  • Concurrent processing for batch operations
  • Caching for frequently accessed profiles
  • Vector search for semantic similarity
  • Optimized scraping with smart selectors

🔐 Security & Privacy

  • Environment variables for sensitive data
  • No credential storage in code
  • Rate limiting to prevent abuse
  • Error logging without exposing secrets

🐛 Troubleshooting

Common Issues

  1. LinkedIn Login Failed

    • Check credentials in .env
    • Ensure 2FA is disabled or use app password
    • Verify no CAPTCHA challenges
  2. Claude API Errors

    • Verify API key is valid
    • Check rate limits on Anthropic dashboard
    • Ensure sufficient credits
  3. MCP Connection Issues

    • Verify TypeScript compilation: npm run build
    • Check MCP server logs
    • Validate configuration files

🤝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the file for details.

⚠️ Legal Notice

This tool is for educational and research purposes. Users are responsible for complying with LinkedIn's Terms of Service and applicable laws. The authors are not responsible for any misuse or violations.

🔗 Links


Built with ❤️ for the AI community