MCP LinkedIn Sales Navigator
Enables AI assistants to search leads, view profiles, manage lists, send InMails, and export data from LinkedIn Sales Navigator through browser automation.
README
MCP LinkedIn Sales Navigator
MCP server for LinkedIn Sales Navigator — Browser automation via Playwright.
LinkedIn Sales Navigator doesn't provide a public API. This MCP server uses browser automation (Playwright) to control Sales Navigator through an authenticated browser session. It enables AI assistants to search leads, view profiles, manage lists, send InMails, and export data — all through the standard Model Context Protocol.
⚠️ Important Disclaimers
- This tool requires an active LinkedIn Sales Navigator subscription
- Browser automation: This operates by controlling a real browser — no API hacking
- Session required: You must be logged into LinkedIn in the browser instance
- Rate limiting: Use responsibly. LinkedIn may restrict accounts that perform excessive automation
- Terms of Service: Review LinkedIn's ToS before using automation tools
- No credentials stored: This tool never stores or handles LinkedIn passwords
Features
| Tool | Description |
|---|---|
linkedin_search_leads |
Search leads with filters (title, company, location, industry, seniority, etc.) |
linkedin_get_lead_profile |
Get detailed profile information for a lead |
linkedin_save_lead |
Save a lead to a list |
linkedin_list_lead_lists |
List all lead lists |
linkedin_create_lead_list |
Create a new lead list |
linkedin_send_inmail |
Send an InMail message (with dry-run support) |
linkedin_export_leads |
Export leads to JSON or CSV format |
Quick Start
Prerequisites
- Node.js ≥ 20
- LinkedIn Sales Navigator subscription with active session
- A browser with an active LinkedIn login (Chrome recommended)
Install
npm install globodai-mcp-linkedin-sales-navigator
Or clone and build from source:
git clone https://github.com/globodai-group/mcp-linkedin-sales-navigator.git
cd mcp-linkedin-sales-navigator
npm install
npm run build
Configuration
The server is configured via environment variables:
| Variable | Default | Description |
|---|---|---|
LSN_AUTH_METHOD |
cdp |
Authentication method: cdp, session, or cookies |
LSN_CDP_ENDPOINT |
http://localhost:9222 |
Chrome DevTools Protocol endpoint |
LSN_USER_DATA_DIR |
— | Path to Chrome user data directory (for session method) |
LSN_COOKIES_PATH |
— | Path to cookies JSON file (for cookies method) |
LSN_HEADLESS |
false |
Run browser in headless mode |
LSN_VIEWPORT_WIDTH |
1280 |
Browser viewport width |
LSN_VIEWPORT_HEIGHT |
900 |
Browser viewport height |
LSN_NAVIGATION_TIMEOUT |
30000 |
Navigation timeout in ms |
LSN_ACTION_TIMEOUT |
10000 |
Action timeout in ms |
Authentication Methods
1. CDP (Chrome DevTools Protocol) — Recommended
Connect to an already-running Chrome browser with an active LinkedIn session.
Start Chrome with remote debugging:
# macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--remote-debugging-port=9222
# Linux
google-chrome --remote-debugging-port=9222
# Windows
chrome.exe --remote-debugging-port=9222
Then log into LinkedIn Sales Navigator manually. The MCP server connects to this browser.
LSN_AUTH_METHOD=cdp LSN_CDP_ENDPOINT=http://localhost:9222 npx globodai-mcp-linkedin-sales-navigator
2. User Data Directory
Use an existing Chrome profile that's already logged into LinkedIn:
LSN_AUTH_METHOD=session LSN_USER_DATA_DIR=/path/to/chrome/profile npx globodai-mcp-linkedin-sales-navigator
3. Cookie-Based
Export your LinkedIn cookies and provide them as a JSON file:
LSN_AUTH_METHOD=cookies LSN_COOKIES_PATH=/path/to/linkedin-cookies.json npx globodai-mcp-linkedin-sales-navigator
Clawdbot / CORTX Integration
This MCP server is designed to work seamlessly with Clawdbot browser relay:
{
"mcpServers": {
"linkedin-sales-navigator": {
"command": "npx",
"args": ["globodai-mcp-linkedin-sales-navigator"],
"env": {
"LSN_AUTH_METHOD": "cdp",
"LSN_CDP_ENDPOINT": "http://localhost:9222"
}
}
}
}
When using Clawdbot's browser relay, the AI assistant can directly control a browser tab where you're logged into Sales Navigator — no additional setup needed.
Tool Examples
Search for leads
{
"tool": "linkedin_search_leads",
"arguments": {
"title": "VP of Engineering",
"location": "San Francisco Bay Area",
"companySize": "201-500",
"industry": "Computer Software"
}
}
Get a lead's profile
{
"tool": "linkedin_get_lead_profile",
"arguments": {
"profileUrl": "https://www.linkedin.com/sales/lead/ACwAAAxxxxxx"
}
}
Send an InMail (with dry run)
{
"tool": "linkedin_send_inmail",
"arguments": {
"profileUrl": "https://www.linkedin.com/sales/lead/ACwAAAxxxxxx",
"subject": "Quick question about your team",
"body": "Hi, I noticed your team is growing...",
"dryRun": true
}
}
Export leads to CSV
{
"tool": "linkedin_export_leads",
"arguments": {
"source": "current_search",
"format": "csv",
"limit": 50
}
}
Architecture
┌─────────────────────────────────────────────────┐
│ AI Assistant (Claude, GPT, etc.) │
│ ↕ MCP Protocol (stdio) │
├─────────────────────────────────────────────────┤
│ MCP Server (this package) │
│ ├── Tools (search, leads, inmails, lists, etc.)│
│ ├── Browser Controller (Playwright) │
│ └── Selectors & Auth │
├─────────────────────────────────────────────────┤
│ Playwright → Chromium / Chrome │
│ ↕ CDP or Direct │
├─────────────────────────────────────────────────┤
│ LinkedIn Sales Navigator (web app) │
└─────────────────────────────────────────────────┘
Development
# Install dependencies
npm install
# Install Playwright browsers
npx playwright install chromium
# Development mode (watch)
npm run dev
# Build
npm run build
# Lint
npm run lint
# Type check
npm run typecheck
Selector Maintenance
LinkedIn periodically updates their DOM structure. If tools stop working:
- Open Sales Navigator in Chrome DevTools
- Inspect the elements that changed
- Update selectors in
src/browser/selectors.ts - Submit a PR with the updated selectors
License
MIT — see LICENSE
Disclaimer
This project is not affiliated with, endorsed by, or sponsored by LinkedIn Corporation. LinkedIn and Sales Navigator are trademarks of LinkedIn Corporation. Use this tool responsibly and in accordance with LinkedIn's Terms of Service.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。