Sponsored by Deepsite.site

LinkedIn MCP Server

Created By
hardiksharmmaaaa6 months ago
This Repo contain the MCP servers I am making initially, Tho most of the MCP servers are present opensource, but its for my practice to code them as per my usecase
Content

LinkedIn MCP Server

A Model Context Protocol (MCP) server for LinkedIn automation that provides three powerful tools for job searching, networking, and contact management.

🚀 Features

1. Job Search Tool (find_job_openings)

  • Searches for the latest job openings based on your skills
  • Filters by location, experience level, and job type
  • Returns formatted job listings with company details and direct links

2. Auto Connect & Outreach Tool (auto_connect_and_outreach)

  • Automatically finds and connects with relevant professionals
  • Sends personalized outreach messages
  • Targets specific roles and companies
  • Rate-limited to avoid LinkedIn restrictions

3. Contact Scraper Tool (scrape_contacts_to_excel)

  • Scrapes contact information from LinkedIn profiles
  • Exports data to Excel spreadsheets
  • Supports both direct profile URLs and search queries
  • Collects names, titles, companies, and available contact info

📁 Project Structure

linkedin-mcp-server/
├── src/
│   ├── index.js                 # Main MCP server implementation
│   └── linkedin-automation.js   # Core LinkedIn automation logic
├── package.json                 # Dependencies and scripts
├── config.example.env          # Environment configuration template
└── README.md                   # This documentation

🛠️ Installation

Prerequisites

  • Node.js 18.0.0 or higher
  • npm or yarn
  • A LinkedIn account

Setup Steps

  1. Clone and install dependencies:

    npm install
    
  2. Configure environment (optional):

    cp config.example.env .env
    # Edit .env with your preferences
    
  3. Start the server:

    npm start
    

🔧 How It Works

Architecture Flow:

  1. MCP Server Setup (src/index.js)

    • Initializes the MCP server with tool definitions
    • Handles incoming tool requests and routes them to appropriate functions
    • Returns formatted responses back to the MCP client
  2. LinkedIn Automation (src/linkedin-automation.js)

    • Uses Puppeteer to control a Chrome browser
    • Handles LinkedIn login (manual for security)
    • Implements web scraping and interaction logic
    • Manages rate limiting and error handling
  3. Tool Execution Flow:

    MCP Client → MCP Server → LinkedIn Automation → Browser → LinkedIn → Results
    

Security & Privacy:

  • Manual login required - No password storage
  • Rate limiting - Prevents account restrictions
  • Headless mode option - For production use
  • Error handling - Graceful failure management

📖 Tool Usage

1. Find Job Openings

{
  "name": "find_job_openings",
  "arguments": {
    "skills": ["JavaScript", "React", "Node.js"],
    "location": "San Francisco",
    "experience_level": "mid",
    "job_type": "full-time"
  }
}

Parameters:

  • skills (required): Array of your skills to match against job postings
  • location (optional): Preferred job location (default: "Remote")
  • experience_level (optional): "entry", "mid", "senior", or "executive"
  • job_type (optional): "full-time", "part-time", "contract", or "internship"

2. Auto Connect & Outreach

{
  "name": "auto_connect_and_outreach",
  "arguments": {
    "target_roles": ["Software Engineer", "Frontend Developer"],
    "company_names": ["Google", "Microsoft", "Apple"],
    "message_template": "Hi {name}, I'm interested in opportunities at {company}. Would love to connect!",
    "max_connections": 15
  }
}

Parameters:

  • target_roles (required): Array of job titles/roles to target
  • company_names (optional): Specific companies to focus on
  • message_template (optional): Custom message with {name} and {company} placeholders
  • max_connections (optional): Maximum connections to send (default: 10, max: 50)

3. Scrape Contacts to Excel

{
  "name": "scrape_contacts_to_excel",
  "arguments": {
    "search_query": "Product Manager at Tech Companies",
    "excel_filename": "product_managers.xlsx"
  }
}

Or with specific profile URLs:

{
  "name": "scrape_contacts_to_excel",
  "arguments": {
    "profile_urls": [
      "https://www.linkedin.com/in/johndoe/",
      "https://www.linkedin.com/in/janedoe/"
    ],
    "excel_filename": "specific_contacts.xlsx"
  }
}

Parameters:

  • profile_urls (optional): Array of LinkedIn profile URLs to scrape
  • excel_filename (optional): Name of Excel file to save (default: "linkedin_contacts.xlsx")
  • search_query (optional): Search query to find profiles automatically

⚠️ Important Notes

LinkedIn Terms of Service

  • This tool is for educational and personal use
  • Respect LinkedIn's rate limits and terms of service
  • Use responsibly to avoid account restrictions
  • Consider LinkedIn's Premium features for enhanced functionality

Limitations

  • Contact Information: Email/phone numbers are often protected by LinkedIn's privacy settings
  • Rate Limiting: LinkedIn enforces strict limits on automated actions
  • Selector Changes: LinkedIn may update their website structure, requiring code updates
  • Account Security: Use manual login to maintain account security

Best Practices

  1. Start Small: Test with low limits first (5-10 connections)
  2. Add Delays: Respect rate limits to avoid detection
  3. Personalize Messages: Use meaningful connection requests
  4. Monitor Results: Check success rates and adjust accordingly
  5. Stay Updated: LinkedIn may change their interface

🛠️ Development

Running in Development Mode

npm run dev

Testing

npm test

Browser Configuration

  • Set HEADLESS_MODE=true in .env for production
  • Browser will open for manual login on first run
  • Session persists until server restart

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

📄 License

MIT License - See LICENSE file for details

🔮 Future Enhancements

  • Support for LinkedIn Sales Navigator
  • Advanced message templates with AI
  • Integration with CRM systems
  • Automated follow-up sequences
  • Analytics and reporting dashboard
  • Multi-account management
  • Webhook integrations

Disclaimer: This tool is for educational purposes. Users are responsible for complying with LinkedIn's Terms of Service and applicable laws.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
DeepChatYour AI Partner on Desktop
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Tavily Mcp
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
ChatWiseThe second fastest AI chatbot™
Serper MCP ServerA Serper MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.