🚀 MCP 日历服务器
本项目实现了一个MCP服务器,它借助 Server-Sent Events (SSE) 技术,将 Google Calendar 与 n8n 进行集成,为用户提供便捷的日历服务。
🚀 快速开始
先决条件
- Node.js 18+ 版本
- 拥有启用了 Google Calendar API 的 Google Cloud Console 账户
- 具备 Easypanel(或其他 Docker 环境)用于服务托管
- 安装了
n8n-nodes-mcp
包的 n8n
在 Google Cloud Console 中的配置
- 登录 Google Cloud Console,创建一个新的项目。
- 启用 Google Calendar API:
- 进入“APIs & Services” > “Library”。
- 搜索“Google Calendar API”,并点击“Enable”。
- 创建 OAuth 2.0 客户端:
- 进入“APIs & Services” > “Credentials”。
- 点击“Create Credentials” > “OAuth 2.0 Client IDs”。
- 选择“Web application”。
- 在“Authorized redirect URIs”中添加
redirect_uri
(例如:https://sua-url/auth/callback
)。
- 复制
Client ID
和 Client Secret
备用。
📦 安装指南
在 Easypanel 中的安装步骤
- 克隆项目仓库:
git clone https://github.com/2BX-git/mcp-calendar-server.git
cd mcp-calendar-server
- 在 Easypanel 中配置环境变量:
BASE_URL=https://sua-url
GOOGLE_CLIENT_ID=seu-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=seu-client-secret
PORT=3001
- 部署服务:
- 配置服务以使用 Dockerfile。
- 点击“Deploy”完成部署。