Sign inSign up

vertexcoverlabs/linkedin-mcp

By vertexcoverlabs

•Updated 5 months ago

LinkedIn scraping library with MCP server, CLI, anti-detection, and headless Chrome built-in.

Image
Developer tools
0

1.8K

vertexcoverlabs/linkedin-mcp repository overview

⁠LinkedIn Spider

A Python LinkedIn scraping library with a built-in MCP server, CLI, and anti-detection mechanisms. Runs headless Chrome with stealth mode to extract profiles, companies, posts, connections, and conversations from LinkedIn.

⁠Features

  • Profile Search — Search LinkedIn profiles with filters (location, industry, company, connection degree)
  • Profile Scraping — Extract full profile data: experience, education, skills, contact info
  • Company Scraping — Retrieve company details and metadata
  • Post Search — Search and extract LinkedIn posts with engagement metrics and comments
  • Connections — View and send connection requests
  • Conversations — Access messaging history
  • Anti-Detection — Human-like behavior simulation, stealth JavaScript injection, session persistence
  • MCP Server — Integrates with AI assistants via Model Context Protocol (stdio, SSE, HTTP transports)

⁠Quick Start

docker run -d \
  -e [email protected] \
  -e LINKEDIN_PASSWORD=your_password \
  -e TRANSPORT=sse \
  -p 8080:8080 \
  vertexcover/linkedin-spider

Environment Variables

┌───────────────────┬──────────────────────────────────────────────┬─────────┐
│     Variable      │                 Description                  │ Default │
├───────────────────┼──────────────────────────────────────────────┼─────────┤
│ LINKEDIN_EMAIL    │ LinkedIn account email                       │ —       │
├───────────────────┼──────────────────────────────────────────────┼─────────┤
│ LINKEDIN_PASSWORD │ LinkedIn account password                    │ —       │
├───────────────────┼──────────────────────────────────────────────┼─────────┤
│ LINKEDIN_COOKIE   │ li_at cookie (alternative to email/password) │ —       │
├───────────────────┼──────────────────────────────────────────────┼─────────┤
│ TRANSPORT         │ MCP transport mode: stdio, sse, or http      │ stdio   │
├───────────────────┼──────────────────────────────────────────────┼─────────┤
│ HEADLESS          │ Run browser in headless mode                 │ true    │
├───────────────────┼──────────────────────────────────────────────┼─────────┤
│ HOST              │ Server bind address                          │ 0.0.0.0 │
├───────────────────┼──────────────────────────────────────────────┼─────────┤
│ PORT              │ Server port                                  │ 8080    │
└───────────────────┴──────────────────────────────────────────────┴─────────┘

Docker Compose

services:
  linkedin-spider:
    image: vertexcover/linkedin-spider
    ports:
      - "8080:8080"
    volumes:
      - ./data:/app/data/linkedin_profiles
    env_file:
      - .env
    restart: unless-stopped

Authentication

Supports two authentication methods:

1. Email/Password — Set LINKEDIN_EMAIL and LINKEDIN_PASSWORD
2. Cookie — Set LINKEDIN_COOKIE with your li_at cookie value

Sessions are persisted to /app/data/linkedin_profiles — mount this as a volume to avoid re-authentication.

What's Included

- Python 3.11 slim base image
- Chromium and ChromeDriver pre-installed
- Runs as unprivileged app user
- Headless mode enabled by default

Links

- https://github.com/vertexcover-io/linkedin-spider

Tag summary

Content type

Image

Digest

sha256:2bdf0bf32…

Size

353.4 MB

Last updated

5 months ago

docker pull vertexcoverlabs/linkedin-mcp