Skip to main content
Glama

LinkedIn Scraper MCP Server

by superyuser

LinkedIn Scraper MCP Server

A Model Context Protocol (MCP) server that provides LinkedIn profile scraping capabilities with manual credential input. This server allows you to extract comprehensive profile data including experience, education, skills, and contact information.

Features

  • Manual Credential Input: No need for environment variables - provide LinkedIn credentials directly in tool calls
  • Comprehensive Data Extraction: Scrapes name, headline, location, about section, experience, education, skills, and contact info
  • Multiple Transport Methods: Supports both HTTP (production) and STDIO (development) transports
  • Browser Automation: Uses Selenium WebDriver with Chrome for reliable scraping
  • Anti-Detection: Includes human-like delays and browser settings to avoid detection

Installation

  1. Install dependencies:
npm install
  1. Install Chrome browser (if not already installed):
    • The server uses Chrome WebDriver which will be automatically managed
    • Ensure Chrome browser is installed on your system
  2. Build the project:
npm run build

Usage

Start the server with HTTP transport:

npm start # or node dist/index.js

The server will start on http://localhost:8080 by default.

STDIO Transport (Development)

For local development with STDIO transport:

npm run start:stdio # or node dist/index.js --stdio

Command Line Options

  • --port <PORT>: Specify HTTP server port (default: 8080)
  • --stdio: Use STDIO transport instead of HTTP
  • --help: Show help message

MCP Client Configuration

Add this to your MCP client configuration:

{ "mcpServers": { "linkedin-scraper": { "url": "http://localhost:8080/mcp" } } }

Available Tools

scrape_linkedin_profile

Scrapes a LinkedIn profile and returns comprehensive profile data.

Parameters:

  • url (required): LinkedIn profile URL (e.g., "https://www.linkedin.com/in/username/")
  • email (required): LinkedIn account email for authentication
  • password (required): LinkedIn account password for authentication
  • headless (optional): Run browser in headless mode (default: false)

Example Usage:

{ "tool": "scrape_linkedin_profile", "arguments": { "url": "https://www.linkedin.com/in/johndoe/", "email": "your-email@example.com", "password": "your-password", "headless": false } }

Response Format:

{ "success": true, "timestamp": "2024-01-01T12:00:00.000Z", "profile": { "url": "https://www.linkedin.com/in/johndoe/", "name": "John Doe", "headline": "Software Engineer at Tech Company", "location": "San Francisco, CA", "about": "Passionate software engineer...", "experience_count": 3, "experiences": [...], "education_count": 2, "education": [...], "skills_count": 15, "skills": [...], "websites": [...], "email": "john@example.com" } }

Development

Project Structure

src/ ├── index.ts # Main entry point ├── cli.ts # Command-line argument parsing ├── config.ts # Configuration management ├── server.ts # Server instance creation ├── client.ts # LinkedIn scraper client ├── types.ts # TypeScript type definitions ├── tools/ │ ├── index.ts # Tool exports │ └── linkedin.ts # LinkedIn scraping tool └── transport/ ├── index.ts # Transport exports ├── http.ts # HTTP transport └── stdio.ts # STDIO transport

Building

npm run build # Build once npm run watch # Build and watch for changes

Running in Development

npm run dev # Build and run HTTP transport npm run dev:stdio # Build and run STDIO transport

Security Considerations

  • Credential Handling: LinkedIn credentials are passed directly in tool calls and not stored
  • Rate Limiting: The scraper includes human-like delays to avoid being blocked
  • Browser Settings: Uses realistic browser settings to minimize detection
  • Session Management: Each scraping session is isolated and cleaned up properly

Troubleshooting

Common Issues

  1. Chrome Driver Issues: The server automatically manages Chrome WebDriver, but ensure Chrome browser is installed
  2. LinkedIn Authentication: If authentication fails:
    • Verify your LinkedIn credentials are correct
    • Check if your account has two-factor authentication enabled
    • Try logging in manually first to resolve any security challenges
  3. Scraping Failures: If scraping fails:
    • Try running with headless: false to see what's happening
    • Check if LinkedIn has updated their page structure
    • Ensure stable internet connection
  4. Port Conflicts: If port 8080 is in use:
    node dist/index.js --port 3000

Environment Variables

Optional environment variables:

  • PORT: HTTP server port (default: 8080)
  • NODE_ENV: Set to 'production' for production mode

License

This project is for educational and research purposes. Please respect LinkedIn's Terms of Service and use responsibly.

Contributing

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

Disclaimer

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

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Enables extraction of comprehensive LinkedIn profile data including experience, education, skills, and contact information through browser automation. Requires manual LinkedIn credentials input and uses anti-detection measures for reliable scraping.

  1. Features
    1. Installation
      1. Usage
        1. HTTP Transport (Recommended)
        2. STDIO Transport (Development)
        3. Command Line Options
      2. MCP Client Configuration
        1. Available Tools
          1. scrape_linkedin_profile
        2. Development
          1. Project Structure
          2. Building
          3. Running in Development
        3. Security Considerations
          1. Troubleshooting
            1. Common Issues
            2. Environment Variables
          2. License
            1. Contributing
              1. Disclaimer

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  A FastMCP-based server that enables programmatic LinkedIn automation and data extraction through browser automation, offering secure authentication and tools for profile operations and post interactions while respecting LinkedIn's rate limits.
                  Last updated -
                  42
                  • Linux
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A powerful LinkedIn Profile Analyzer that seamlessly integrates with Claude AI to fetch and analyze public LinkedIn profiles, enabling users to extract, search, and analyze posts data through RapidAPI's LinkedIn Data API.
                  Last updated -
                  19
                  MIT License
                • -
                  security
                  F
                  license
                  -
                  quality
                  A server that enables AI assistants to interact with LinkedIn programmatically for job searching, resume/cover letter generation, and managing job applications through standardized JSON-RPC requests.
                  Last updated -
                  9
                • -
                  security
                  A
                  license
                  -
                  quality
                  Enables users to fetch, analyze, and manage LinkedIn posts data through tools that retrieve profiles, search posts by keywords, filter by date, and identify top-performing content based on engagement metrics.
                  Last updated -
                  MIT License

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/superyuser/linkedin-scraper-mcp'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server