🤖 基于MCP服务器的Ai自动化中心
您的Notion和Google Workspace自动化中央指挥中心。
*通过8个强大的自动化工具弥合人工智能助手和生产力工具之间的差距。*
______________________________________________________________________
🏗️ 建筑
flowchart TB
subgraph Client["🖥️ MCP Client"]
Claude["Claude Desktop / Cursor"]
end
subgraph Server["⚡ Automation Hub MCP Server"]
MCP["FastMCP Server"]
Auth["OAuth Handler"]
subgraph Tools["🛠️ 8 Automation Tools"]
direction LR
Notion["📝 Notion\n• add_task\n• get_tasks"]
Calendar["📅 Calendar\n• create_event\n• get_events"]
Gmail["📧 Gmail\n• send_email\n• get_unread"]
Sheets["📊 Sheets\n• add_row\n• read_data"]
end
end
subgraph APIs["☁️ External APIs"]
NotionAPI["Notion API"]
GoogleAPI["Google APIs"]
end
Claude |"stdio"| MCP
MCP --> Tools
Auth --> GoogleAPI
Notion --> NotionAPI
Calendar --> GoogleAPI
Gmail --> GoogleAPI
Sheets --> GoogleAPI______________________________________________________________________
✨ 特性
| 集成 | 工具 | 说明 |
|---|---|---|
| 📝 概念 | add_notion_task, get_notion_tasks | 从Notion数据库中创建和检索任务 |
| 📅 日历 | create_calendar_event, get_upcoming_events | 安排会议并检查议程 |
| 📧 Gmail | send_gmail, get_unread_emails | 发送电子邮件并获取未读邮件摘要 |
| 📊 表格 | add_google_sheet_row, read_google_sheet | 记录数据并读取电子表格范围 |
______________________________________________________________________
🛠️ 先决条件
- Python 3.10+
- 紫外线 包管理器(推荐)
- 谷歌云项目 启用API后:
- 谷歌网页API - 谷歌日历API - Gmail API
- 概念整合 具有数据库访问权限
______________________________________________________________________
⚙️ 快速设置
1.安装依赖项
git clone https://github.com/Maheshnath09/ai-automation-hub.git
cd ai-automation-hub
uv sync2.配置环境
创建 .env 文件:
NOTION_API_KEY=secret_your_notion_integration_token
NOTION_DATABASE_ID=your_database_id3.添加Google凭据
从下载OAuth 2.0客户端ID 谷歌云控制台 并另存为 credentials.json.
4.运行服务器
uv run run_server.py首次运行: 将打开一个浏览器窗口进行Google OAuth身份验证。
______________________________________________________________________
🔗 Claude桌面集成
添加到 claude_desktop_config.json:
{
"mcpServers": {
"automation_hub": {
"command": "uv",
"args": [
"--directory",
"C:\\path\\to\\ai-automation-hub",
"run",
"run_server.py"
]
}
}
}然后启用 automation_hub 在克劳德桌面→ 设置→ 连接器。
______________________________________________________________________
🧪 测试
uv run src/test_integration.py验证:
- ✅ 概念任务创建和检索
- ✅ 谷歌日历事件管理
- ✅ Gmail未读电子邮件提取
______________________________________________________________________
🐳 Docker支持
# Build
docker build -t automation-hub .
# Run
docker run -i --rm \
-v ${PWD}/.env:/app/.env \
-v ${PWD}/credentials.json:/app/credentials.json \
-v ${PWD}/token.json:/app/token.json \
automation-hub______________________________________________________________________
📁 项目结构
ai-automation-hub/
├── src/
│ ├── server.py # FastMCP server with 8 tools
│ ├── auth.py # Google OAuth handling
│ ├── google_services.py # Calendar, Gmail, Sheets clients
│ ├── notion.py # Notion API client
│ └── main.py # Module entry point
├── run_server.py # Standalone server entry
├── credentials.json # Google OAuth config
├── .env # Notion credentials
└── pyproject.toml # Dependencies______________________________________________________________________
📜 许可证
MIT许可证-使用❤️ 对于自动化爱好者来说。
