Token导航 LogoToken导航TokenDH.com
Linkedin Researcher logo
浏览器工具stdio官方级别未说明来源级核验

Linkedin Researcher

MCP Server

一个使用Claude Cookbooks模式和Browser MCP进行LinkedIn研究的智能代理,适用于专业人才搜索和竞争分析。

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
TypeScriptClaude浏览器自动化Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

maree217

提供方

maree217

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

LinkedIn研究代理

使用Claude Cookbooks模式的AI代理+用于LinkedIn研究的浏览器MCP

一个使用Claude Sonnet 4.5研究LinkedIn个人资料的智能代理,使用Browser MCP的33个浏览器自动化工具实现了Claude Cookbooks的编排工作者模式。

体系结构(v2-编排器工作模式)

┌─────────────────────────────────────────────────────────────────┐
│                    LinkedIn Research Agent                       │
│                  (Orchestrator-Workers Pattern)                  │
├─────────────────────────────────────────────────────────────────┤
│  ┌──────────────────┐                                           │
│  │   Orchestrator   │  Analyzes task, breaks into subtasks      │
│  │   (Claude 4.5)   │  Coordinates workers                      │
│  └────────┬─────────┘                                           │
│           │                                                      │
│           ├─────────┬──────────┬──────────┬──────────┐         │
│           ▼         ▼          ▼          ▼          ▼         │
│     ┌─────────┐ ┌──────┐  ┌──────┐  ┌──────┐  ┌──────┐       │
│     │Navigator│ │Searcher│ │Extractor│ │Analyzer│ │Reporter│  │
│     │ Worker  │ │ Worker │ │ Worker  │ │ Worker │ │ Worker │  │
│     └────┬────┘ └───┬────┘ └───┬─────┘ └───┬────┘ └───┬────┘  │
└──────────┼──────────┼──────────┼───────────┼──────────┼────────┘
           │          │          │           │          │
           └──────────┴──────────┴───────────┴──────────┘
                                 │
                    ┌────────────┴────────────┐
                    │                         │
           ┌────────▼────────┐      ┌────────▼────────┐
           │  Browser MCP     │      │  Memory System  │
           │  (33 Tools)      │      │  (File Storage) │
           │  - navigate      │      │  - profiles/    │
           │  - snapshot      │      │  - sessions/    │
           │  - click         │      │  - cache/       │
           │  - evaluate      │      └─────────────────┘
           │  - wait_for      │
           └──────────────────┘

特性

🎯 编排者-工人模式(摘自克劳德·库克斯)

  • 动态任务分解:编排者分析每个任务并创建最佳子任务计划
  • 专业工人:导航器、搜索器、提取器、分析器、报告器
  • 适应性规划:根据特定任务要求选择工人
  • 协同执行:通过XML进行结构化通信

🧠 记忆系统(摘自克劳德·库克斯本)

  • 基于文件的存储:中的配置文件、会话和缓存 /memories
  • 持久状态:研究数据在两次会议之间保留
  • 结构化存储:配置文件的JSON格式
  • 安全:路径验证阻止目录遍历

🔧 浏览器MCP集成

  • 33种可用工具:工作人员可访问的所有浏览器MCP工具
  • 会话保持:登录一次,保持登录状态
  • CDP集成:稳定的元素定位
  • 可访问性树:可靠的元件识别

📊 培训数据收集

  • 闪电特工准备就绪:为APO培训收集编排器+工作人员数据
  • 增强指标:员工绩效、任务分解质量
  • 结构化日志记录:用于ML训练的JSONL格式
  • 绩效追踪:持续时间、成功率、找到的配置文件

🎯 研究能力

  • 使用过滤器(标题、位置、公司)进行个人资料搜索
  • 公司员工调研
  • 跨公司竞争分析
  • 结构化数据提取
  • 专业Excel/PDF报告(通过Skills API)

______________________________________________________________________

安装

1.先决条件

  • Python 3.8+
  • Node.js 18+ (适用于浏览器MCP服务器)
  • 浏览器MCP服务器:必须在 /Users/rammaree/projects/social-browser-mcp

2.安装依赖项

cd linkedin-researcher
pip install -r requirements.txt

3.配置环境

cp .env.example .env

编辑 .env 并设置:

  • ANTHROPIC_API_KEY:您的Anthropic API密钥
  • BROWSER_MCP_PATH:浏览器MCP服务器的路径(默认: ../social-browser-mcp/dist/index.js)

4.验证浏览器MCP服务器

# Make sure Browser MCP is built
cd /Users/rammaree/projects/social-browser-mcp
npm run build

# Verify it works
node dist/index.js

______________________________________________________________________

用法

基本用法

# Research 10 Product Managers in Mumbai
python main.py \
  --query "Product Manager" \
  --count 10 \
  --location "Mumbai"

# Research 5 Software Engineers at Google
python main.py \
  --query "Software Engineer" \
  --count 5 \
  --company "Google"

# Save results to custom file
python main.py \
  --query "Data Scientist" \
  --count 20 \
  --location "Bangalore" \
  --output data_scientists.json

Python API

import asyncio
from src.agent import LinkedInResearchAgent
from src.mcp_client import BrowserMCPClient

async def main():
    # Connect to Browser MCP
    mcp_client = BrowserMCPClient("/path/to/social-browser-mcp/dist/index.js")
    await mcp_client.connect()

    # Create agent
    agent = LinkedInResearchAgent(
        api_key="your_anthropic_api_key",
        mcp_client=mcp_client
    )

    # Run research
    result = await agent.research_profiles(
        query="Product Manager",
        count=10,
        location="Mumbai"
    )

    print(result)

    # Cleanup
    await mcp_client.disconnect()

asyncio.run(main())

______________________________________________________________________

运作原理

1.自主代理循环

该代理使用具有工具使用功能的Claude Sonnet 4.5:

1. Receive research task
2. Agent analyzes task and decides which tools to use
3. Agent calls Browser MCP tools (navigate, click, extract, etc.)
4. Agent processes results
5. Agent decides next action (continue or finish)
6. Repeat until task complete

2.工具使用示例

“孟买研究5产品经理”的代理工作流程:

Step 1: browser_navigate → Navigate to www.linkedin.com
Step 2: browser_snapshot → Get page structure
Step 3: browser_click → Click search box
Step 4: browser_type → Type "Product Manager Mumbai"
Step 5: browser_press → Press Enter
Step 6: browser_wait_for → Wait for results
Step 7: browser_snapshot → Get search results
Step 8: browser_click → Click first profile
Step 9: browser_snapshot → Extract profile data
Step 10: browser_navigate → Navigate back to search
... repeat for 5 profiles
Step N: Return structured JSON with all profile data

3.培训数据收集

ENABLE_TRAINING_MODE=true,代理记录:

{
  "task_id": "task_1234567890",
  "timestamp": "2025-11-04T10:30:00Z",
  "query": "Product Manager in Mumbai",
  "task_type": "profile_search",
  "parameters": {"count": 10, "location": "Mumbai"},
  "status": "completed",
  "result": {...},
  "duration_seconds": 45,
  "tools_used": ["browser_navigate", "browser_click", ...]
}

这些数据用于Agent Lightning APO训练。

______________________________________________________________________

特工闪电训练(第5.8阶段)

概述

在收集了50多个训练示例后,使用agent Lightning APO优化代理:

from agent_lightning import APO

# Load training data
training_data = load_training_examples()

# Initialize APO
apo = APO(
    initial_prompt=agent.system_prompt,
    evaluation_dataset=training_data,
    optimization_metric="success_rate"
)

# Optimize (costs ~$5-10)
optimized_prompt = apo.optimize()

# Deploy
agent.system_prompt = optimized_prompt

预期改进

培训前:

  • 成功率:~80%
  • 每项任务的平均配置文件:8/10
  • 平均持续时间:60秒

闪电特工之后:

  • 成功率:~90-95%
  • 每项任务的平均配置文件:9.5/10
  • 平均持续时间:45秒

改进:所有指标的10-20%

______________________________________________________________________

项目结构

linkedin-researcher/
├── src/
│   ├── __init__.py           # Package initialization
│   ├── agent.py              # Claude SDK agent (autonomous loop)
│   ├── mcp_client.py         # Browser MCP connection
│   ├── memory.py             # Memory system (future)
│   └── workflows/
│       └── profile_search.py # Profile search workflow (future)
│
├── config/
│   ├── agent_config.yaml     # Agent configuration
│   └── mcp_config.json       # MCP connection config
│
├── tests/
│   └── test_agent.py         # Unit tests (future)
│
├── training/
│   └── data.jsonl            # Training data for Agent Lightning
│
├── logs/
│   └── agent.log             # Agent logs
│
├── main.py                   # CLI entry point
├── requirements.txt          # Python dependencies
├── .env.example              # Environment template
└── README.md                 # This file

______________________________________________________________________

配置

代理配置(config/agent_config.yaml)

agent:
  model: "claude-sonnet-4-5"
  max_tokens: 4000
  temperature: 0.7
  system_prompt: |
    You are a LinkedIn research specialist...

workflows:
  profile_search:
    max_profiles: 50
    timeout_seconds: 300

MCP配置(config/mcp_config.json)

{
  "mcp_servers": {
    "browser-mcp": {
      "command": "node",
      "args": ["/path/to/social-browser-mcp/dist/index.js"],
      "transport": "stdio"
    }
  }
}

______________________________________________________________________

发展路线图

5.1阶段:项目结构✅ (完成)

  • 已创建目录结构
  • 配置文件
  • 环境设置

第5.2阶段:MCP客户端✅ (完成)

  • stdio传输到浏览器MCP
  • 工具列表和调用
  • 错误处理

阶段5.3:代理实现✅ (完成)

  • 自主代理循环
  • 工具使用集成
  • 培训数据收集

阶段5.4:工作流程(下)

  • 个人资料搜索工作流程
  • 公司研究工作流程
  • 竞争分析工作流程

阶段5.5:存储系统(计划中)

  • Redis用于会话状态
  • PostgreSQL用于研究成果
  • 用于语义搜索的pgvector

第5.6阶段:测试(计划)

  • 单元测试
  • 集成测试
  • E2E测试

第5.7阶段:培训数据收集(计划)

  • 执行50多项研究任务
  • 收集绩效指标
  • 分析故障案例

第5.8阶段:特工闪电训练(计划中)

  • 加载训练数据
  • 运行APO优化
  • A/B测试改进
  • 部署优化的代理

第5.9阶段:生产部署(计划)

  • 容器化
  • API服务器
  • 监控
  • 扩展

______________________________________________________________________

成本分析

研究成本(每项任务)

API克劳德:

  • 输入标记:~5000个标记(研究查询+工具结果)
  • 输出令牌:约2000个令牌(代理思维+结构化响应)
  • 每项任务的成本:约0.15美元(克劳德·十四行诗4.5)

50个配置文件(5个任务×10个配置文件):

  • 总成本:~0.75美元

比较:

  • 人工研究:2-3小时,每小时50美元=100-150美元
  • 代理成本:0.75美元
  • 储蓄: 99%+

培训费用

闪电特工APO:

  • 培训:50项任务约5-10美元
  • 一次性成本

预期投资回报率:

  • 效率提高10-20%
  • 完成~50-100项任务后即可收回成本

______________________________________________________________________

故障排除

浏览器MCP连接问题

# Check if Browser MCP is built
cd /Users/rammaree/projects/social-browser-mcp
npm run build

# Test Browser MCP directly
node dist/index.js

API关键问题

# Verify API key is set
echo $ANTHROPIC_API_KEY

# Or check .env file
cat .env | grep ANTHROPIC_API_KEY

Python依赖关系

# Reinstall dependencies
pip install -r requirements.txt --force-reinstall

______________________________________________________________________

例子

示例1:孟买的研究产品经理

python main.py \
  --query "Product Manager" \
  --count 10 \
  --location "Mumbai" \
  --output pm_mumbai.json

输出 (pm_mumbai.json):

{
  "result": "Found 10 Product Manager profiles in Mumbai",
  "profiles": [
    {
      "name": "John Doe",
      "title": "Senior Product Manager",
      "company": "Google",
      "location": "Mumbai, India",
      "experience_years": 8,
      "education": "MBA, IIM Bangalore",
      "profile_url": "https://www.linkedin.com/in/johndoe"
    },
    ...
  ],
  "iterations": 15,
  "duration_seconds": 45
}

示例2:谷歌的研究软件工程师

python main.py \
  --query "Software Engineer" \
  --count 5 \
  --company "Google" \
  --output google_engineers.json

______________________________________________________________________

与浏览器MCP的主要区别

浏览器MCP(确定性工具)

  • 33个浏览器自动化工具
  • 确定性行为(给定输入→ 固定输出)
  • 会话持续
  • 由代理人使用,本身不可训练

LinkedIn研究代理(可培训代理)

  • 使用浏览器MCP工具
  • 自主决策(何时、如何使用哪些工具)
  • 可使用Agent Lightning/DSPy进行训练
  • 可优化的提示和工作流程

关键见解:RL/DSPy适用于代理(本项目),而不是工具(浏览器MCP)

______________________________________________________________________

许可证

麻省理工学院

______________________________________________________________________

致谢

构建使用:

  • 克劳德·十四行诗4.5:Anthropic的前沿模型
  • 浏览器MCP:33工具浏览器自动化服务器
  • 闪电特工:微软的APO培训框架
  • MCP协议:用于工具集成的模型上下文协议

灵感来自:来自Claude Cookbooks和Azure AI Foundry研究的生产就绪自主代理模式。

目录标签

目录标签

TypeScriptClaude浏览器自动化LinkedIn研究本地部署人才搜索竞争分析AI代理

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP