
LinkedIn MCP server for scraping profiles, companies, and jobs through AI assistants.
LinkedIn MCP server for scraping profiles, companies, and jobs through AI assistants.
A Model Context Protocol (MCP) server that enables interaction with LinkedIn through Claude and other AI assistants. This server allows you to scrape LinkedIn profiles, companies, jobs, and perform job searches.
https://github.com/user-attachments/assets/eb84419a-6eaf-47bd-ac52-37bc59c83680
get_person_profile
): Get detailed information from LinkedIn profiles including work history, education, skills, and connectionsget_company_profile
): Extract company information with comprehensive detailsget_job_details
): Retrieve specific job posting details using direct LinkedIn job URLsclose_session
): Properly close browser sessions and clean up resourcessearch_jobs
): Currently experiencing ChromeDriver compatibility issues with LinkedIn's search interfaceget_recommended_jobs
): Has Selenium method compatibility issues due to outdated scraping methods# 1. Clone the repository git clone https://github.com/stickerdaniel/linkedin-mcp-server cd linkedin-mcp-server # 2. Install UV if you don't have it curl -LsSf https://astral.sh/uv/install.sh | sh # 3. Install the project and all dependencies uv sync
If you want to contribute or modify the code:
# Install with development dependencies uv sync --group dev # Install pre-commit hooks uv run pre-commit install
ChromeDriver is required for Selenium to interact with Chrome. You need to install the version that matches your Chrome browser.
Check your Chrome version:
Download matching ChromeDriver:
Make ChromeDriver accessible:
/usr/local/bin
on macOS/Linux)export CHROMEDRIVER=/path/to/chromedriver # macOS/Linux # OR set CHROMEDRIVER=C:\path\to\chromedriver.exe # Windows
After installation, run:
# Start the server (first time setup) uv run main.py --no-lazy-init --no-headless
# Normal operation (lazy initialization) uv run main.py # Debug mode with visible browser and direct startup uv run main.py --no-headless --debug --no-lazy-init # Skip setup prompts (for automation) uv run main.py --no-setup
The server will automatically:
Add to Claude Desktop:
Example Claude Desktop configuration:
{ "mcpServers": { "linkedin-scraper": { "command": "uv", "args": ["--directory", "/path/to/linkedin-mcp-server", "run", "main.py", "--no-setup"], "env": { "LINKEDIN_EMAIL": "[email protected]", "LINKEDIN_PASSWORD": "your_password" } } } }
export LINKEDIN_EMAIL=[email protected] export LINKEDIN_PASSWORD=your_password
Configuration values are loaded with the following precedence (highest to lowest):
Command-line arguments:
uv run main.py --no-headless --debug
Environment variables:
export LINKEDIN_EMAIL=[email protected] export LINKEDIN_PASSWORD=your_password export CHROMEDRIVER=/path/to/chromedriver
Note: Environment variables always override credentials stored in the system keychain
System keychain: Securely stored credentials from previous sessions
Default values: Built-in fallback values
Option | Description |
---|---|
--no-headless | Run Chrome with a visible browser window |
--debug | Enable debug mode with additional logging |
--no-setup | Skip configuration setup prompts |
--no-lazy-init | Initialize Chrome driver immediately (instead of on first use) |
Your LinkedIn credentials are stored securely using your system's native keychain/credential manager:
Credentials are managed as follows:
If you need to change your stored credentials, run the application with the --no-lazy-init
flag and when prompted about login failure, select "Yes" to try with different credentials.
The ChromeDriver path is found in this order:
CHROMEDRIVER
environment variableOnce specified, the ChromeDriver path is used for the current session but not stored persistently.
Job Search (search_jobs
) Not Working:
get_job_details
insteadRecommended Jobs (get_recommended_jobs
) Errors:
find_elements_by_class_name
)If you encounter ChromeDriver errors:
If login fails:
--no-headless
to see where the login fails--debug
to see more detailed logsIf Claude cannot connect to the server:
This project is licensed under the MIT License
Note: This tool is for personal use only. Use responsibly and in accordance with LinkedIn's terms of service. Web scraping may violate LinkedIn's terms of service.