Content
# linkedin-mcp
MCP server for LinkedIn via Playwright. Exposes tools for job search and messaging history retrieval.
## Setup
```bash
git clone https://github.com/YOUR_USERNAME/linkedin-mcp.git
cd linkedin-mcp
npm install
npx playwright install chromium
npm run build
```
### Authenticate with LinkedIn
Before using the server, log in once interactively:
```bash
npm run login
```
A browser window opens for you to sign in to LinkedIn. After login, credentials are saved to `~/.linkedin-mcp/auth.json` and all subsequent runs are headless.
## Installation
### Claude Code (CLI)
Add to your project-level config (`.mcp.json` in the project root):
```json
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
}
}
}
```
Or add it globally so it's available in all projects — create/edit `~/.claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
}
}
}
```
### Claude Desktop
Open **Settings > Developer > Edit Config** (or edit `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, `%APPDATA%\Claude\claude_desktop_config.json` on Windows):
```json
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
}
}
}
```
Restart Claude Desktop after saving.
### Cursor
Open **Settings > MCP** and add a new server, or edit `.cursor/mcp.json` in your project:
```json
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
}
}
}
```
### Windsurf
Edit `~/.codeium/windsurf/mcp_config.json`:
```json
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
}
}
}
```
### Cline (VS Code)
Open the Cline MCP settings panel in VS Code, or edit `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`:
```json
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
}
}
}
```
### Generic MCP Client
Any MCP-compatible client can run this server over stdio:
```bash
node /absolute/path/to/linkedin-mcp/build/index.js
```
The server communicates via JSON-RPC over stdin/stdout.
## Tools
| Tool | Description |
|------|-------------|
| `search_jobs` | Search LinkedIn jobs by keywords and optional location |
| `get_job` | Get full details for a specific job posting |
| `get_conversations` | List recent messaging conversations |
| `get_messages` | Get messages from a specific conversation |
## Troubleshooting
**"Browser not found" or Playwright errors**
Run `npx playwright install chromium` to install the browser binary.
**Auth expired / login required**
Delete `~/.linkedin-mcp/auth.json` and run `npm run login` again.
**Server not showing up in Claude Desktop**
Make sure you restarted Claude Desktop after editing the config. Check the path to `build/index.js` is absolute and correct.