LinkedIn scraping library with MCP server, CLI, anti-detection, and headless Chrome built-in.
1.8K
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.
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
Content type
Image
Digest
sha256:2bdf0bf32…
Size
353.4 MB
Last updated
5 months ago
docker pull vertexcoverlabs/linkedin-mcp