Lead Gen MCP服务器

一个免费的MCP服务器,在Claude对话中运行完整的B2B出站管道。
键入一句话。获取报废的线索→ 谷歌表格→ 立即进行广告活动,无需离开您的聊天室。
You: Scrape 30 HVAC companies in Austin TX, create a campaign called
"HVAC Austin | Free Audit", and push the leads.
Claude: Done.
→ 28 qualified leads saved: https://docs.google.com/spreadsheets/d/...
→ Campaign created (ID: a1b2c3)
→ 28 leads uploaded. Ready to launch in Instantly.它做什么
| 工具 | 说明 |
|---|---|
scrape_leads | 谷歌地图→ 合格潜在客户→ 谷歌表格(通过Apify) |
read_sheet | 从任何现有的谷歌表格中加载潜在客户 |
create_instantly_campaign | 创建新的即时电子邮件活动,返回活动ID |
push_to_instantly | 将潜在客户阵列上传到即时活动 |
先决条件
安装
git clone https://github.com/Sourav333444/lead-gen-mcp
cd lead-gen-mcp
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # Mac/Linux
pip install "mcp[cli]" apify-client gspread google-auth google-auth-oauthlib requests python-dotenv配置
创建一个 .env 项目根目录中的文件:
APIFY_API_TOKEN=apify_api_...
INSTANTLY_API_KEY=your_instantly_v2_keyGoogle表格身份验证(一次性)
从下载OAuth凭据 谷歌云控制台 → API和服务→ 凭证→ 创建OAuth 2.0客户端ID(桌面应用程序)。另存为 credentials.json 在项目根中。
然后运行:
python -c "
from google_auth_oauthlib.flow import InstalledAppFlow
flow = InstalledAppFlow.from_client_secrets_file('credentials.json', [
'https://www.googleapis.com/auth/spreadsheets',
'https://www.googleapis.com/auth/drive'
])
creds = flow.run_local_server(port=0)
open('token.json', 'w').write(creds.to_json())
"这节省了 token.json --除非令牌过期,否则您不需要再次执行此操作。
连接到克劳德代码
添加到您的 .mcp.json 在项目根目录中:
{
"mcpServers": {
"lead-gen-toolkit": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["/absolute/path/to/server.py"]
}
}
}在Windows上:
{
"mcpServers": {
"lead-gen-toolkit": {
"command": "C:\\path\\to\\.venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\server.py"]
}
}
}重新启动克劳德代码。跑 /mcp 确认 lead-gen-toolkit 已连接。
用法
连接后,只需与Claude交谈:
Scrape 30 roofing contractors in Denver CO and save to a sheet called "Denver Roofers"Read the leads from [sheet URL] and push them to Instantly campaign [campaign_id]Create an Instantly campaign called "Plumbers NYC | Free Estimate" and give me the campaign ID成本
| 组件 | 成本 |
|---|---|
| 优化谷歌地图 | 每条线索约0.01-0.02美元 |
| 立即 | 您的计划发送限制 |
| 谷歌表格 | 免费 |
100条线索≈1.50-2.50美元。
文件结构
server.py # MCP server (the thing you're installing)
execution/
gmaps_lead_pipeline.py # Google Maps scraper + Sheet writer
.env # Your API keys (never commit this)
credentials.json # Google OAuth credentials (never commit this)
token.json # Google OAuth token (never commit this)故障排除
“Google令牌丢失或已过期” --重新运行上面的auth命令。
“未设置INSTANTLY_API_KEY” --将您的密钥添加到 .env.立即获取→ 设置→ 集成→ API密钥→ 选择 all:all 范围。
Apify抓取返回0个结果 --在您的查询中包括城市: "HVAC in Austin TX" 不仅仅 "HVAC".
