Content
# LinkedIn MCP Server
An MCP (Model Context Protocol) server for Claude Desktop that lets you scrape LinkedIn profiles and comment activity.
## Quick Setup
**If you're using Claude, just say:** "Set up the LinkedIn MCP server for my Claude Desktop"
Claude will read the CLAUDE.md file and automatically configure everything.
## Manual Setup
### 1. Clone and Install
```bash
cd ~
git clone https://github.com/TimpiaAI/linkedin-mcp.git
cd linkedin-mcp
python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/playwright install chromium
```
### 2. Create LinkedIn Session
```bash
.venv/bin/python -m linkedin_mcp.create_session
```
This opens a browser - log in to LinkedIn, then close the browser.
### 3. Configure Claude Desktop
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"linkedin": {
"command": "/Users/YOUR_USERNAME/linkedin-mcp/.venv/bin/python",
"args": ["-m", "linkedin_mcp.server"],
"env": {
"LINKEDIN_SESSION": "/Users/YOUR_USERNAME/linkedin-mcp/session.json"
}
}
}
}
```
Replace `YOUR_USERNAME` with your actual username.
### 4. Restart Claude Desktop
Quit (Cmd+Q) and reopen Claude Desktop.
## Usage
Once configured, you can ask Claude things like:
- "Scrape the LinkedIn profile for johndoe"
- "Get the recent comments from linkedin.com/in/satyanadella"
- "What has this person been commenting on LinkedIn recently?"
## Tool
**`scrape_linkedin`**
- `url`: LinkedIn profile URL or username
- `limit`: Max comments to return (default: 20)
## Troubleshooting
**Server won't connect:**
```bash
tail -f ~/Library/Logs/Claude/mcp-server-linkedin.log
```
**Session expired:**
```bash
cd ~/linkedin-mcp
.venv/bin/python -m linkedin_mcp.create_session
```
## License
MIT