LinkedIn工作搜索与消息服务

一个基于Playwright的LinkedIn MCP服务器,提供工作搜索和消息历史检索功能。

  • by Sureiya
  • TypeScript
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 Sureiya/linkedin-mcp

使用说明

linkedin mcp

通过Playwright为LinkedIn提供MCP服务器。公开用于求职和消息历史检索的工具。

设置

git clone https://github.com/YOUR_USERNAME/linkedin-mcp.git
cd linkedin-mcp
npm install
npx playwright install chromium
npm run build

通过LinkedIn进行身份验证

在使用服务器之前,请以交互方式登录一次:

npm run login

一个浏览器窗口打开,供您登录LinkedIn。登录后,凭据将保存到 ~/.linkedin-mcp/auth.json 所有后续运行都是无头的。

安装

克劳德代码(CLI)

添加到项目级配置(.mcp.json 在项目根目录中):

{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
    }
  }
}

或者将其全局添加,以便在所有项目中都可用--创建/编辑 ~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
    }
  }
}

克劳德桌面

打开 设置>开发人员>编辑配置 (或编辑 ~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上, %APPDATA%\Claude\claude_desktop_config.json 在Windows上):

{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
    }
  }
}

保存后重新启动Claude Desktop。

光标

打开 设置>MCP 添加新服务器或编辑 .cursor/mcp.json 在您的项目中:

{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
    }
  }
}

帆板运动

编辑 ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
    }
  }
}

Cline(VS代码)

在VS Code中打开Cline MCP设置面板,或编辑 ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json:

{
  "mcpServers": {
    "linkedin": {
      "command": "node",
      "args": ["/absolute/path/to/linkedin-mcp/build/index.js"]
    }
  }
}

通用MCP客户端

任何兼容MCP的客户端都可以通过stdio运行此服务器:

node /absolute/path/to/linkedin-mcp/build/index.js

服务器通过JSON-RPC在stdin/stdout上进行通信。

工具

工具 说明
search_jobs 按关键字和可选位置搜索LinkedIn职位
get_job 获取特定职位发布的完整详细信息
get_conversations 列出最近的消息对话
get_messages 从特定对话中获取消息

故障排除

“找不到浏览器”或剧作家错误 跑 npx playwright install chromium 安装浏览器二进制文件。

身份验证已过期/需要登录 删除 ~/.linkedin-mcp/auth.json 然后跑 npm run login 再一次。

服务器未显示在Claude Desktop中 请确保在编辑配置后重新启动了Claude Desktop。检查路径 build/index.js 是绝对和正确的。