AI自动化中心服务

MCP Server based Ai Automation Hub是一个集成Notion和Google Workspace自动化工具的中心化服务平台,提供任务管理、日程安排、邮件处理和表格操作等功能。

  • by Maheshnath09
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 Maheshnath09/MCP-Server-based-Ai-Automation-hub

使用说明

🤖 基于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 sync

2.配置环境

创建 .env 文件:

NOTION_API_KEY=secret_your_notion_integration_token
NOTION_DATABASE_ID=your_database_id

3.添加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许可证-使用❤️ 对于自动化爱好者来说。