Skip to main content
Glama
README.md
# @striderlabs/mcp-linkedin

A Model Context Protocol (MCP) server for LinkedIn automation, powered by [Playwright](https://playwright.dev/) and [Browserbase](https://www.browserbase.com/).

## Features

| Tool | Description |
|------|-------------|
| `get_profile` | Get a LinkedIn user profile (name, headline, experience, education) |
| `search_jobs` | Search job listings by title, location, and company |
| `get_job_details` | Get full details of a specific job posting |
| `get_connections` | List your LinkedIn connections with optional name filter |
| `get_messages` | Get recent messages and InMail conversations |
| `send_connection_request` | Send a connection request with an optional personalised note |

## Requirements

- Node.js 18+
- A [Browserbase](https://www.browserbase.com/) account with a CDP-enabled session URL
- LinkedIn account (the browser session must already be logged in to LinkedIn)

## Installation

```bash
npm install @striderlabs/mcp-linkedin
```

Or install from a local tarball:

```bash
npm install ./striderlabs-mcp-linkedin-1.0.0.tgz
```

## Configuration

Set the following environment variable before starting the server:

| Variable | Required | Description |
|----------|----------|-------------|
| `BROWSERBASE_CDP_URL` | Yes | Browserbase CDP WebSocket endpoint URL |

### Getting your Browserbase CDP URL

1. Create a session in the [Browserbase dashboard](https://www.browserbase.com/) or via their API.
2. The session will expose a CDP WebSocket URL, typically in the format:
   ```
   wss://connect.browserbase.com?apiKey=YOUR_API_KEY&sessionId=SESSION_ID
   ```
3. Ensure the browser session is logged into LinkedIn before invoking LinkedIn tools.

## Usage

### Running the MCP server

```bash
BROWSERBASE_CDP_URL="wss://connect.browserbase.com?apiKey=..." npx @striderlabs/mcp-linkedin
```

### Claude Desktop configuration

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "linkedin": {
      "command": "npx",
      "args": ["-y", "@striderlabs/mcp-linkedin"],
      "env": {
        "BROWSERBASE_CDP_URL": "wss://connect.browserbase.com?apiKey=YOUR_KEY&sessionId=YOUR_SESSION"
      }
    }
  }
}
```

## Tool Reference

### `get_profile`

Fetch a LinkedIn profile summary.

```json
{
  "profile_url": "https://www.linkedin.com/in/username"
}
```

Omit `profile_url` to fetch the currently logged-in user's own profile.

---

### `search_jobs`

Search for job listings.

```json
{
  "title": "Software Engineer",
  "location": "San Francisco",
  "company": "Anthropic",
  "limit": 10
}
```

All fields are optional. `limit` defaults to 10 (max 25).

---

### `get_job_details`

Get full details of a job posting.

```json
{
  "job_url": "https://www.linkedin.com/jobs/view/1234567890"
}
```

---

### `get_connections`

List your connections.

```json
{
  "limit": 20,
  "search": "Alice"
}
```

`search` is optional. `limit` defaults to 20 (max 50).

---

### `get_messages`

Get recent message conversations.

```json
{
  "limit": 10
}
```

`limit` defaults to 10 (max 20).

---

### `send_connection_request`

Send a connection request.

```json
{
  "profile_url": "https://www.linkedin.com/in/username",
  "note": "Hi! I'd love to connect and discuss opportunities."
}
```

`note` is optional and must be 300 characters or fewer (LinkedIn limit).

## Important Notes

- **Authentication**: This server does not handle LinkedIn login. Your Browserbase session must already be authenticated with LinkedIn.
- **Rate limits**: LinkedIn may rate-limit or flag automated activity. Use responsibly.
- **Selectors**: LinkedIn frequently updates its UI. If scraping breaks, the CSS selectors in `src/index.ts` may need updating.
- **LinkedIn ToS**: Automated access to LinkedIn may violate their Terms of Service. Use for personal productivity and authorised use cases only.

## Development

```bash
# Install dependencies
npm install

# Build TypeScript
npm run build

# Run in development mode
npm run dev
```

## License

MIT — Copyright (c) 2024 Strider Labs

TDQS

A3.6/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct purpose targeting different LinkedIn resources: connections, job details, messages, profiles, job search, and connection requests. There is no overlap in functionality, making it easy for an agent to select the right tool.

Naming Consistency5/5

All tools follow a consistent verb_noun naming pattern (e.g., get_connections, search_jobs, send_connection_request). The verbs are appropriate and descriptive, with no deviations in style or convention.

Tool Count5/5

With 6 tools, the server is well-scoped for LinkedIn interactions, covering key areas like profiles, connections, jobs, and messaging. Each tool earns its place without being overwhelming or insufficient for the domain.

Completeness4/5

The tool set covers core LinkedIn functionalities well, including reading (profiles, connections, jobs, messages) and writing (connection requests). Minor gaps exist, such as no tools for updating profiles, managing connections (e.g., removing), or interacting with posts, but agents can still handle common workflows effectively.

Maintenance

ActivityInactive
ResponsivenessNo issues