> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.scaleabm.org/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.scaleabm.org/_mcp/server.

# MCP Server

> Expose 60+ LinkedIn tools to any MCP-compatible AI agent via the Model Context Protocol

# MCP Server

Voyager ships an MCP server that exposes 60+ LinkedIn tools over the [Model Context Protocol](https://modelcontextprotocol.io). Any MCP-compatible client — Claude Code, Claude Desktop, Cursor, or your own agent — can call LinkedIn and Sales Navigator through natural tool use.

The MCP server is the **primary agent surface** for Voyager. REST is available, but if you're building on top of an LLM, MCP is what you want.

## Setup

### One-command install (recommended)

The Voyager dashboard's **Connect MCP** card gives you a ready-to-paste `claude_desktop_config.json` snippet — it includes your tenant API key and default user ID, so it's zero-config after paste. See [li.scaleabm.org/dashboard.html](https://li.scaleabm.org/dashboard.html).

### Manual install

Clone the repo, install deps, and point your MCP client at the stdio server:

```bash
git clone https://github.com/algomo/linkedin-voyager
cd linkedin-voyager && bun install
```

Then add to your client's MCP config:

```json
{
  "mcpServers": {
    "voyager": {
      "command": "bun",
      "args": ["run", "src/mcp-server.ts"],
      "cwd": "/path/to/linkedin-voyager",
      "env": {
        "VOYAGER_API_URL": "https://li.scaleabm.org",
        "VOYAGER_API_KEY": "voy_your_api_key_here",
        "VOYAGER_USER_ID": "your-user-id"
      }
    }
  }
}
```

| Env var           | Required | Description                                                             |
| ----------------- | -------- | ----------------------------------------------------------------------- |
| `VOYAGER_API_KEY` | Yes      | Tenant API key (`voy_` prefix) — create one in the dashboard            |
| `VOYAGER_API_URL` | No       | API base URL (default: `https://li.scaleabm.org`)                       |
| `VOYAGER_USER_ID` | No       | Default LinkedIn user ID. Multi-user tenants can override per tool call |

> **Tip**
>
> Smoke test before wiring into your client:
>
> ```bash
> VOYAGER_API_KEY=voy_xxx bun src/mcp-server.ts
> ```
>
> The server speaks JSON-RPC over stdio — no network ports are opened.

## Tool Categories

The catalogue lives in `src/services/mcp-tools.ts` and is the authoritative list. High-level breakdown:

### Profile (4)

`get_my_profile`, `get_profile`, `get_profile_viewers`, `get_member_badges`

### Search (5)

`search_people`, `search_companies`, `search_jobs`, `search_groups`, `search_content`

### Messaging (9)

`get_conversations`, `get_conversation_messages`, `send_message`, `mark_conversation_read`, `delete_message`, `edit_message`, `react_to_message`, `forward_message`, `get_affiliated_mailboxes`

### Connections & network (6)

`send_connection_request`, `get_received_connections`, `accept_connection`, `get_relationship_status`, `follow_profile`, `withdraw_connection`

### Engagement & posts (9)

`like_post`, `comment_on_post`, `create_post`, `delete_comment`, `delete_post`, `get_notifications`, `get_post_reactions`, `get_post_comments`, `get_posts`

### Feed (2)

`get_feed`, `get_post`

### Companies (4)

`get_company`, `get_company_employees`, `find_employee_by_title`, `get_company_posts`

### Groups (2)

`get_groups`, `get_group_members`

### Batch (2)

`batch_read_profiles`, `batch_read_relationships`

### Capabilities & session (5)

`list_account_capabilities`, `get_account_capability`, `get_session_capabilities`, `get_network_summary`, `get_session_activity`

### Profile editing (3)

`edit_my_profile`, `get_my_followers`, `get_my_following`

### Webhooks (2)

`list_webhooks`, `get_webhook_deliveries`

### Sales Navigator (7)

`salesnav_search`, `salesnav_get_lead`, `salesnav_typeahead`, `salesnav_get_account`, `salesnav_get_account_employees`, `salesnav_save_lead`, `salesnav_search_companies`

> **Note**
>
> Sales Navigator tools require `li_a` and `li_ep_auth_context` cookies synced in your session. See the [SalesNav guide](/guides/core-concepts/sales-nav) for details.

## Tool Annotations

The `DESTRUCTIVE_TOOLS` set in `src/mcp-server.ts` flags mutations with `destructiveHint: true` so MCP clients (Claude Code, Claude Desktop) can prompt before running them. Current list:

* `send_message`
* `send_connection_request`
* `accept_connection`
* `follow_profile`
* `withdraw_connection`
* `like_post`
* `comment_on_post`
* `create_post`
* `delete_post`
* `delete_comment`

Every other MCP tool carries `readOnlyHint: true`.

> **Warning**
>
> A few write-shaped tools (`mark_conversation_read`, `edit_my_profile`, `salesnav_save_lead`) are currently annotated as read-only because they're not in `DESTRUCTIVE_TOOLS`. Treat them as mutations in your agent logic and gate them with your own confirmation — don't rely on the MCP client prompting.

> **Warning**
>
> Destructive tools perform real actions on LinkedIn. There is no undo for sent messages, connection requests, or published posts. Your agent should still confirm with the human before calling these — MCP hints are a second line of defence, not the only one.

## Architecture

The MCP server (`src/mcp-server.ts`) is a thin adapter over the REST API:

1. Loads the `MCP_TOOLS` catalogue from `src/services/mcp-tools.ts`
2. Registers each tool with the `@modelcontextprotocol/sdk` `McpServer` class
3. Routes tool calls to the Voyager HTTP API using your `VOYAGER_API_KEY`
4. Returns result JSON as the tool's text content

```
AI Client (Claude Code, etc.)
    │
    │ stdin/stdout (JSON-RPC)
    ▼
MCP Server  ──▶  Voyager REST API  ──▶  LinkedIn
```

## Example Session

With the MCP server configured, you can describe intent in natural language:

```
You: Find CTOs at fintech startups in Berlin

Claude: I'll search SalesNav for CTOs at fintech startups in Berlin.

[Tool call: salesnav_search]
  filters: CURRENT_TITLE="CTO", INDUSTRY="Financial Services",
           REGION="Berlin", COMPANY_HEADCOUNT="1-50"

Found 47 leads matching your criteria:
  1. Anna Mueller — CTO at PayFlow (Berlin)
  2. ...
```

The LLM picks tools, chains them, and formats results — you never write an API call by hand.