# LinkedIn MCP Server
A Model Context Protocol (MCP) server that connects AI assistants to LinkedIn. Access profiles, companies, and job postings through a Docker container.
## Features
- **Profile Access**: Get detailed LinkedIn profile information
- **Company Profiles**: Extract comprehensive company data
- **Job Details**: Retrieve job posting information
- **Job Search**: Search for jobs with keywords and location filters
- **Company Posts**: Get recent posts from a company's LinkedIn feed
## Quick Start
### Option 1: Cookie Authentication (Simplest)
Pass your LinkedIn `li_at` cookie - session will be created and stored automatically.
> **Note:** If you encounter authentication challenges, use Option 2 instead.
```json
{
"mcpServers": {
"linkedin": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "LINKEDIN_COOKIE", "stickerdaniel/linkedin-mcp-server"],
"env": {
"LINKEDIN_COOKIE": "your_li_at_cookie_value"
}
}
}
}
```
### Option 2: Browser Login via uvx
Create a session using the [uvx setup](https://github.com/stickerdaniel/linkedin-mcp-server#-uvx-setup-recommended---universal), then mount it:
```json
{
"mcpServers": {
"linkedin": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-v", "~/.linkedin-mcp:/home/pwuser/.linkedin-mcp",
"stickerdaniel/linkedin-mcp-server:latest"
]
}
}
}
```
> **Note:** Docker containers don't have a display server, so you can't use the `--get-session` command in Docker.
## Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `LINKEDIN_COOKIE` | - | LinkedIn `li_at` session cookie (required if no session file) |
| `LOG_LEVEL` | `WARNING` | Logging level: DEBUG, INFO, WARNING, ERROR |
| `TIMEOUT` | `5000` | Browser timeout in milliseconds |
| `USER_AGENT` | - | Custom browser user agent |
| `TRANSPORT` | `stdio` | Transport mode: stdio, streamable-http |
| `HOST` | `127.0.0.1` | HTTP server host (for streamable-http transport) |
| `PORT` | `8000` | HTTP server port (for streamable-http transport) |
| `HTTP_PATH` | `/mcp` | HTTP server path (for streamable-http transport) |
| `SLOW_MO` | `0` | Delay between browser actions in ms (debugging) |
| `VIEWPORT` | `1280x720` | Browser viewport size as WIDTHxHEIGHT |
| `CHROME_PATH` | - | Path to Chrome/Chromium executable (rarely needed in Docker) |
**Example with custom timeout:**
```json
{
"mcpServers": {
"linkedin": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "LINKEDIN_COOKIE", "-e", "TIMEOUT=10000", "stickerdaniel/linkedin-mcp-server"],
"env": {
"LINKEDIN_COOKIE": "your_li_at_cookie_value"
}
}
}
}
```
## Repository
- **Source**: <https://github.com/stickerdaniel/linkedin-mcp-server>
- **License**: Apache 2.0