Skip to main content
Glama
rcreech93

LinkedIn MCP

by rcreech93
README.md
# LinkedIn MCP

This is a simple implementation of an MCP LinkedIn server using a Selenium and Chromedriver based scraper in the background.

At the moment it only support profile scraping and profile search.

## Pre-requisites

Please install `uv`.

Create a virtual environment and sync the libraries.

```
uv venv
uv sync
```

Then install Chromedriver: https://developer.chrome.com/docs/chromedriver/get-started

The whole parsing of the LinkedIn webpage is based on Chromedriver.

## Environment

Make sure you have all of these variables in your .env file:

```
LINKEDIN_USER_1=<user>
LINKEDIN_PASSWORD_1=<pass>

LINKEDIN_USER_2=<user>
LINKEDIN_PASSWORD_2=<pass>

COOKIE_DIR=/var/linkedin/cookies

MCP_HOST=0.0.0.0
MCP_PORT=8050
# Either sse or stdio or streamable-http
MCP_TRANSPORT=streamable-http
MCP_TIMEOUT=150
```

You can use multiple LinkedIn username and password combinations.

### Run in dev mode with MCP Inspector

```
mcp dev ./src/linkedin_mcp/server/server.py
```

### Run with stdio

```
python ./src/linkedin_mcp/client/client_stdio.py
```

### Run the server

```
uv run ./src/linkedin_mcp/server/server.py
```

**Note:** If you're experiencing issues with code changes not being picked up, clear the Python cache first:
```powershell
# Windows PowerShell
.\clear_cache.ps1

# Or manually:
Get-ChildItem -Path . -Filter __pycache__ -Recurse -Directory | Remove-Item -Recurse -Force
```

Then restart the server. Alternatively, use Python's `-B` flag to skip bytecode generation:
```
uv run python -B ./src/linkedin_mcp/server/server.py
```

## Integration with Gemini CLI

This is a modified `.settings.json` of the Gemini CLI with which you can use for connecting and using the MCP:

```
{
  "general": {
    "preferredEditor": "vscode"
  },
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  },
  "ui": {
    "theme": "Default"
  },
  "mcpServers": {
    "linkedin-scraper": {
      "httpUrl": "http://0.0.0.0:8050/mcp/",
      "transport": "streamable-http"
    }
  }
}
```

TDQS

A4/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one extracts a full profile from a URL or username, while the other searches for profiles by name. There is no overlap or ambiguity in their intended use.

Naming Consistency3/5

The tool names do not follow a consistent verb_noun pattern. 'linkedin_profile' is a noun phrase, while 'profile_search' places the verb at the end. This is a minor inconsistency, but both names are descriptive and readable.

Tool Count3/5

With only 2 tools, the server feels slightly thin for a comprehensive LinkedIn integration. However, the two tools cover the core search-and-retrieve workflow, so the count is borderline appropriate for a focused profile-scraping server.

Completeness4/5

The tool set covers the main workflow of finding a profile via search and then retrieving its full details. Missing features like connections or posts are not critical for the apparent purpose of profile extraction, so the coverage is solid with only minor gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues