一个模型上下文协议(MCP)服务器,用于将Claude AI与Google Sheets连接,以实现收入追踪、潜在客户管理及业务运营的自动化。
特点/功能
- 📊 表格、数据图表 仪表盘实时收入指标和关键绩效指标(KPIs)
- 🎯(目标/瞄准) 潜在客户线索(或销售漏斗中的潜在客户)从首次接触开始追踪潜在客户直至成交
- 📧(电子邮件) Gmail 集成搜索电子邮件并自动化外展联系
- 📅 日期/日历 日历同步跟踪会议及后续跟进情况
- 📝(一个带有笔的图标,通常用于表示笔记或书写) 知识矩阵带时间戳跟踪的开发日志
- ✅ 任务管理优先处理并跟踪项目任务
- 📈 表示“上升趋势”或“增长”。 分析(或分析学)每日指标和性能跟踪
先决条件
- Node.js 18.0.0或更高版本
- Google 账户 提供Sheets和Gmail访问权限
- Claude Desktop(可译为“Claude桌面版”或根据具体语境简化为“Claude桌面”) 或兼容的MCP客户端
- Google Apps 脚本 (对于后端API)
- 剧作家 (用于浏览器自动化)
安装
1. 克隆仓库```bash
git clone https://github.com/yourusername/ziggy-mcp.git
cd ziggy-mcp
### 2. 安装依赖项```bash
npm run setup
# This installs Node packages AND Playwright browsers
手动替代方案:```bash
npm install
npx playwright install chromium
### 3. 设置Google Sheets后端
1. 创建一个新 Google 表格
1. 首选 **扩展 > Apps Script**
1. 删除所有现有代码
1. 复制所有文件自 `/apps-script` 目录:
- `Code.js` - 表格设置脚本
- `API.js` 主API处理程序
- `calendarSync.js` - 日历集成
- `appsscript.json` - 表现;展示
1. 点击 **保存** (磁盘图标)
1. 点击 **运行 > 设置收入引擎**
1. 当提示时授权脚本
1. 等待30-60秒以完成
1. 作为网络应用部署:
- 点击 **部署 > 新部署**
- 类型: **网页应用**
- 执行方式为: **我**
- 谁可以访问: **任何人**
- 点击 **部署**
- 复制 **网页应用URL**
### 4. 配置MCP服务器
编辑 `index.js` 并更新API URL:```javascript
const API_URL = "YOUR_GOOGLE_APPS_SCRIPT_WEB_APP_URL";
5. 连接到Claude桌面版
添加到您的Claude桌面配置中(~/Library/Application Support/Claude/claude_desktop_config.json (在 macOS 上):```json
{
"mcpServers": {
"ziggy": {
"command": "node",
"args": ["/absolute/path/to/ziggy-mcp/index.js"]
}
}
}
替换 `/absolute/path/to/ziggy-mcp/` 使用您实际的安装路径。
### 6. 重启Claude桌面应用
退出并重新打开 Claude Desktop 以加载 MCP 服务器。
______________________________________________________________________
## 浏览器自动化设置
### 设置认证会话
对于Upwork、LinkedIn及其他平台:
**步骤1:以可见模式打开浏览器**```
Open Upwork in browser with visible mode
步骤2:我将打开一个浏览器窗口 - 您手动登录
步骤3:保存会话```
Save browser session as "upwork"
**步骤4:进行测试**```
Browse upwork.com using saved session
支持的平台
- ✅ 表示“正确”或“完成”。 Upwork(一个在线自由职业者和外包工作平台) - 搜寻工作,提交提案
- ✅ 领英 - 个人资料研究,发送连接请求
- ✅ 任何网站 - 自定义抓取与自动化
安全注意事项
- 会话数据本地存储在
sessions/文件夹 - 永不 将会话文件提交到 Git 中
- 会话中包含您的身份验证令牌
- 大约30天后过期
- 在需要时重新进行身份验证
使用方法
基本命令
获取仪表盘:```
Show me my revenue dashboard
**查看管道:**```
What leads are in my pipeline?
添加一个潜在客户:```
Add a new lead: Acme Corp, contact John Smith, email john@acme.com
**检查Gmail:**```
Search my unread emails
日志开发工作:```
Log to knowledge matrix: Fixed authentication bug in Gmail integration [45m]
### 知识矩阵
知识矩阵是一个结构化的开发日志,用于追踪:
- 🧪 表示“实验器材”或“实验”的意思。 **测试结果** - 测试结果
- 🎯(目标) **决策与方向** - 战略选择
- 📚 书籍或学习资料的符号 **文档更新** - 文档更改
**撰写条目:**```
Write matrix entry for Bugs & Fixes: "3:45pm EST 🐛[BUG-001] Fixed Gmail auth timeout [30m]"
查询矩阵:```
Search matrix for "authentication"
**每日总结:**```
Generate matrix summary for today
浏览器自动化
截图```
Take a screenshot of competitor-site.com
**提取数据:**```
Extract pricing from acme.com/pricing
填写表格:```
Fill the contact form at example.com with lead data for John Doe
**研究:**```
Browse to linkedin.com/company/acme and extract company info
自动化外展 (会话设置后):```
Search Upwork for "web automation" jobs and show top 5
______________________________________________________________________
## 项目结构```
ziggy-mcp/
├── index.js # Main MCP server
├── package.json # Node dependencies
├── browser/ # Browser automation
│ ├── playwright.js # Core browser functions
│ ├── upwork.js # Upwork automation
│ └── linkedin.js # LinkedIn automation
├── apps-script/ # Google Apps Script files
│ ├── Code.js # Sheet setup
│ ├── API.js # API endpoints
│ ├── calendarSync.js # Calendar integration
│ └── appsscript.json # Manifest
├── sessions/ # Saved browser sessions (gitignored)
├── screenshots/ # Captured screenshots (gitignored)
├── docs/ # Documentation
│ ├── MATRIX.md # Knowledge Matrix guide
│ ├── BUG-TRACKING.md # Bug tracking system
│ └── BROWSER-GUIDE.md # Browser automation guide
└── README.md # This file
安全与隐私
- 所有数据均存储在 你的 Google 表格
- 通过Google Apps Script进行身份验证的API调用
- 不使用外部数据库或第三方服务
- 文件系统访问仅限于项目目录
- Gmail 只读访问权限(发送需明确批准)
故障排除
MCP服务器无法连接
- 检查Claude Desktop的配置路径是否正确
- 验证 Node.js 版本:
node --version(应为 ≥18.0.0) - 检查控制台:
Cmd+Shift+I在Claude Desktop中 - 验证API_URL是否已正确设置
index.js
Google Apps Script 问题
- 确保脚本以Web应用的形式部署
- 检查执行权限(应为“任何人”)
- 如需重新授权:运行 > setupRevenueEngine
- 检查 Apps Script 日志:查看 > 日志
Gmail 集成
- 确保在Apps Script中已启用Gmail API
- 检查OAuth作用域
appsscript.json - 如果权限发生更改,请重新授权
发展
本地运行```bash
node index.js
### 管理 Apps Script
安装用于本地 Apps Script 开发的夹子(或:安装本地 Apps Script 开发环境):```bash
npm install -g @google/clasp
clasp login
clasp pull # Download from Google
clasp push # Upload to Google
调试
启用调试日志记录 index.js:javascript
const DEBUG = true;
写入日志至 debug.log 在项目目录中。
路线图
- [ ] 添加Slack集成
- [ ] 将报告导出为PDF格式
- [ ] 基于人工智能的潜在客户评分
- [ ] 自动化后续提醒
- [ ] 发票生成
- [ ] 团队协作功能
做出贡献
- 为仓库创建分支(或“克隆仓库”)
- 创建一个特性分支:
git checkout -b feature/amazing-feature - 提交更改:
git commit -m 'Add amazing feature' - 推送至分支:
git push origin feature/amazing-feature - 提交拉取请求(或合并请求)
许可证
MIT 许可证 - 详情请参见 LICENSE 文件
支持
- 📧 电子邮件:support@example.com
- 💬 问题: GitHub Issues(GitHub问题)
- 📖 文档: 维基
致谢
- 构建于 模型上下文协议
- 通过Apps Script集成Google Sheets
专为自由职业者和小团队打造,倾注爱心之作
