
LinkedIn MCP server for scraping profiles, companies, and jobs through AI assistants.
LinkedIn MCP server for scraping profiles, companies, and jobs through AI assistants.
Through this LinkedIn MCP server, AI assistants like Claude can connect to your LinkedIn. Give access to profiles and companies, get your recommended jobs, or search for keywords. All from a Docker container on your machine.
https://github.com/user-attachments/assets/eb84419a-6eaf-47bd-ac52-37bc59c83680
What are my recommended jobs I can apply to?
Research the background of this candidate https://www.linkedin.com/in/stickerdaniel/
Get this company profile for partnership discussions https://www.linkedin.com/company/inframs/
Suggest improvements for my CV to target this job posting https://www.linkedin.com/jobs/view/4252026496
[!TIP]
- Profile Scraping (
get_person_profile
): Get detailed information from a LinkedIn profile including work history, education, skills, and connections- Company Analysis (
get_company_profile
): Extract comprehensive company information from a LinkedIn company profile name- Job Details (
get_job_details
): Retrieve specific job posting details using LinkedIn job IDs- Job Search (
search_jobs
): Search for jobs with filters like keywords and location- Recommended Jobs (
get_recommended_jobs
): Get personalized job recommendations based on your profile- Session Management (
close_session
): Properly close browser session and clean up resources
[!NOTE] July 2025: All tools are currently functional and actively maintained. If you encounter any issues, please report them in the GitHub issues.
Prerequisites: Make sure you have Docker installed and running.
Client Configuration:
{ "mcpServers": { "linkedin": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "LINKEDIN_COOKIE", "stickerdaniel/linkedin-mcp-server:latest" ], "env": { "LINKEDIN_COOKIE": "li_at=YOUR_COOKIE_VALUE" } } } }
li_at
LINKEDIN_COOKIE
in the configurationRun the server with the --get-cookie
flag:
docker run -it --rm \ stickerdaniel/linkedin-mcp-server:latest \ --get-cookie
Copy the cookie from the output and set it as LINKEDIN_COOKIE
in your client configuration. If this fails with a captcha challenge, use the method above.
[!NOTE] The cookie will expire during the next 30 days. Just get the new cookie and update your client config. There are also many cookie manager extensions that you can use to quickly copy the cookie.
Transport Modes:
CLI Options:
--log-level {DEBUG,INFO,WARNING,ERROR}
- Set logging level (default: WARNING)--no-lazy-init
- Login to LinkedIn immediately instead of waiting for the first tool call--transport {stdio,streamable-http}
- Set transport mode--host HOST
- HTTP server host (default: 127.0.0.1)--port PORT
- HTTP server port (default: 8000)--path PATH
- HTTP server path (default: /mcp)--get-cookie
- Attempt to login with email and password and extract the LinkedIn cookie--cookie {cookie}
- Pass a specific LinkedIn cookie for login--user-agent {user_agent}
- Specify custom user agent string to prevent anti-scraping detectionHTTP Mode Example (for web-based MCP clients):
docker run -it --rm \ -e LINKEDIN_COOKIE="li_at=YOUR_COOKIE_VALUE" \ -p 8080:8080 \ stickerdaniel/linkedin-mcp-server:latest \ --transport streamable-http --host 0.0.0.0 --port 8080 --path /mcp
Test with mcp inspector:
bunx @modelcontextprotocol/inspector
Streamable HTTP
as Transport Type
URL
to http://localhost:8080/mcp
Docker issues:
docker ps
Login issues:
Prerequisites: Claude Desktop and Docker installed
One-click installation for Claude Desktop users:
li_at
LINKEDIN_COOKIE
in the configurationRun the server with the --get-cookie
flag:
docker run -it --rm \ stickerdaniel/linkedin-mcp-server:latest \ --get-cookie
Copy the cookie from the output and set it as LINKEDIN_COOKIE
in your client configuration. If this fails with a captcha challenge, use the method above.
[!NOTE] The cookie will expire during the next 30 days. Just get the new cookie and update your client config. There are also many cookie manager extensions that you can use to quickly copy the cookie.
Docker issues:
docker ps
Login issues:
Prerequisites: Make sure you have uv installed.
Run directly from GitHub without cloning:
# Run directly from GitHub (latest version) uvx --from git+https://github.com/stickerdaniel/linkedin-mcp-server linkedin-mcp-server --help # Run with your LinkedIn cookie uvx --from git+https://github.com/stickerdaniel/linkedin-mcp-server linkedin-mcp-server --cookie "li_at=YOUR_COOKIE_VALUE"
li_at
LINKEDIN_COOKIE
in the configurationRun the server with the --get-cookie
flag:
uvx --from git+https://github.com/stickerdaniel/linkedin-mcp-server \ linkedin-mcp-server --get-cookie
Copy the cookie from the output and set it as LINKEDIN_COOKIE
in your client configuration. If this fails with a captcha challenge, use the method above.
[!NOTE] The cookie will expire during the next 30 days. Just get the new cookie and update your client config. There are also many cookie manager extensions that you can use to quickly copy the cookie.
Client Configuration:
{ "mcpServers": { "linkedin": { "command": "uvx", "args": [ "--from", "git+https://github.com/stickerdaniel/linkedin-mcp-server", "linkedin-mcp-server" ], "env": { "LINKEDIN_COOKIE": "li_at=YOUR_COOKIE_VALUE" } } } }
Transport Modes:
CLI Options:
--log-level {DEBUG,INFO,WARNING,ERROR}
- Set logging level (default: WARNING)--no-lazy-init
- Login to LinkedIn immediately instead of waiting for the first tool call--transport {stdio,streamable-http}
- Set transport mode--host HOST
- HTTP server host (default: 127.0.0.1)--port PORT
- HTTP server port (default: 8000)--path PATH
- HTTP server path (default: /mcp)--get-cookie
- Attempt to login with email and password and extract the LinkedIn cookie--cookie {cookie}
- Pass a specific LinkedIn cookie for login--user-agent {user_agent}
- Specify custom user agent string to prevent anti-scraping detectionBasic Usage Examples:
# Run with cookie from environment variable LINKEDIN_COOKIE="YOUR_COOKIE_VALUE" uvx --from git+https://github.com/stickerdaniel/linkedin-mcp-server linkedin-mcp-server # Run with cookie via flag uvx --from git+https://github.com/stickerdaniel/linkedin-mcp-server linkedin-mcp-server --cookie "YOUR_COOKIE_VALUE" # Run with debug logging uvx --from git+https://github.com/stickerdaniel/linkedin-mcp-server linkedin-mcp-server --log-level DEBUG # Extract cookie with credentials uvx --from git+https://github.com/stickerdaniel/linkedin-mcp-server linkedin-mcp-server --get-cookie
HTTP Mode Example (for web-based MCP clients):
uvx --from git+https://github.com/stickerdaniel/linkedin-mcp-server linkedin-mcp-server \ --transport streamable-http --host 127.0.0.1 --port 8080 --path /mcp
Test with mcp inspector:
bunx @modelcontextprotocol/inspector
Streamable HTTP
as Transport Type
URL
to http://localhost:8080/mcp
Installation issues:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv --version
(should be 0.4.0 or higher)Cookie issues:
--cookie
flag or LINKEDIN_COOKIE
environment variableLogin issues:
Prerequisites: Chrome browser and Git installed
ChromeDriver Setup:
/usr/local/bin
on macOS/Linux)export CHROMEDRIVER_PATH=/path/to/chromedriver
# 1. Clone repository git clone https://github.com/stickerdaniel/linkedin-mcp-server cd linkedin-mcp-server # 2. Install UV package manager curl -LsSf https://astral.sh/uv/install.sh | sh uv python # install python if you don't have it # 3. Install dependencies and dev dependencies uv sync uv sync --group dev # 4. Install pre-commit hooks uv run pre-commit install # 5. Start the server once manually # You will be prompted to enter your LinkedIn credentials, and they will be securely stored in your OS keychain # Once logged in, your cookie will be stored in your OS keychain and used for subsequent runs until it expires uv run -m linkedin_mcp_server --no-headless --no-lazy-init
CLI Options:
--no-headless
- Show browser window (debugging)--log-level {DEBUG,INFO,WARNING,ERROR}
- Set logging level (default: WARNING)--no-lazy-init
- Login to LinkedIn immediately instead of waiting for the first tool call--get-cookie
- Login with email and password and extract the LinkedIn cookie--clear-keychain
- Clear all stored LinkedIn credentials and cookies from system keychain--cookie {cookie}
- Pass a specific LinkedIn cookie for login--user-agent {user_agent}
- Specify custom user agent string to prevent anti-scraping detection--transport {stdio,streamable-http}
- Set transport mode--host HOST
- HTTP server host (default: 127.0.0.1)--port PORT
- HTTP server port (default: 8000)--path PATH
- HTTP server path (default: /mcp)--help
- Show helpHTTP Mode Example (for web-based MCP clients):
uv run -m linkedin_mcp_server --transport streamable-http --host 127.0.0.1 --port 8000 --path /mcp
Claude Desktop:
{
"mcpServers": {
"linkedin": {
"command": "uv",
"args": ["--directory", "/path/to/linkedin-mcp-server", "run", "-m", "linkedin_mcp_server"]
}
}
}
Login/Scraping issues:
--no-headless
to see browser actions (captcha challenge, LinkedIn mobile app 2fa, ...)--no-lazy-init
to attempt to login to LinkedIn immediately instead of waiting for the first tool call--log-level DEBUG
to see more detailed loggingChromeDriver issues:
CHROMEDRIVER_PATH
in your envPython issues:
uv python --version
(should be 3.12+)uv sync --reinstall
Feel free to open an issue or PR!
Built with LinkedIn Scraper by @joeyism and FastMCP.
⚠️ Use in accordance with LinkedIn's Terms of Service. Web scraping may violate LinkedIn's terms. This tool is for personal use only.
This project is licensed under the Apache 2.0 license.