介绍
# Calendly Skill
通过 MCP 生成的 CLI 与 Calendly 日程安排进行交互。
> **注意:**日程安排 API 功能(list-event-types、get-event-type-availability、schedule-event)将在 calendly-mcp-server v2.0.0 发布到 npm 后可用。当前的 CLI 使用 v1.0.0 以确保可移植性。
## 快速开始
```bash # Get your Calendly profile (returns user URI) calendly get-current-user
# List RECENT events (always use --min-start-time for recent queries!) calendly list-events --user-uri "<YOUR_USER_URI>" --min-start-time "2026-01-20T00:00:00Z"
# Get event details calendly get-event --event-uuid <UUID>
# Cancel an event calendly cancel-event --event-uuid <UUID> --reason "Rescheduling needed" ```
## 可用命令
### 用户信息 - `get-current-user` - 获取已认证用户的详细信息
### 事件 - `list-events` - 列出已安排的事件(需要 --user-uri) - `get-event` - 获取事件详细信息(需要 --event-uuid) - `cancel-event` - 取消事件(需要 --event-uuid,可选 --reason)
### 与会者 - `list-event-invitees` - 列出事件的与会者(需要 --event-uuid)
### 组织 - `list-organization-memberships` - 列出组织成员身份
## 配置
API 密钥可以存储在您的环境变量或 `.env` 文件中: ```bash export CALENDLY_API_KEY="<your-pat-token>" # Or in ~/.moltbot/.env or ~/.clawdbot/.env ```
从以下网址获取您的个人访问令牌:https://calendly.com/integrations/api_webhooks
## 在 Moltbot 中的使用
当用户询问以下内容时: - "我有哪些会议?" → 使用 `--min-start-time` 调用 `list-events`(使用最近的日期!) - "取消我下午 2 点的会议" → 先通过 `list-events`(按时间筛选)查找,然后调用 `cancel-event` - "谁参加了 X 会议?" → 调用 `list-event-invitees`
**注意:** 首次使用时,请运行 `calendly get-current-user` 以获取您的 User URI。
## 获取您的 User URI
运行 `calendly get-current-user` 以获取您的 user URI。示例: ```json { "resource": { "uri": "https://api.calendly.com/users/<YOUR_USER_UUID>", "scheduling_url": "https://calendly.com/<your-username>" } } ```
## 示例
```bash # List next 10 events calendly list-events \ --user-uri "<YOUR_USER_URI>" \ -o json | jq .
# Get event details calendly get-event \ --event-uuid "<EVENT_UUID>" \ -o json
# Cancel with reason calendly cancel-event \ --event-uuid "<EVENT_UUID>" \ --reason "Rescheduling due to conflict" ```
## 即将推出:日程安排 API (v2.0)
一旦 calendly-mcp-server v2.0.0 发布,以下命令将可用:
### 日程安排工作流 ```bash # 1. List available event types calendly list-event-types
# 2. Check availability for a specific event type calendly get-event-type-availability --event-type "<EVENT_TYPE_URI>"
# 3. Schedule a meeting (requires paid Calendly plan) calendly schedule-event \ --event-type "<EVENT_TYPE_URI>" \ --start-time "2026-01-25T19:00:00Z" \ --invitee-email "[email protected]" \ --invitee-name "John Smith" \ --invitee-timezone "America/New_York" ```
**日程安排 API 要求:** - calendly-mcp-server v2.0.0+(截至 2026-01-21 尚未发布) - 付费的 Calendly 套餐(Standard 或更高)
当 v2.0 发布后进行升级: ```bash cd ~/clawd/skills/calendly MCPORTER_CONFIG=./mcporter.json npx mcporter@latest generate-cli --server calendly --output calendly ```
## 重要提示:时间筛选
**查询最近事件时务必使用 `--min-start-time`!**
API 默认按从旧到新的顺序返回事件,并且不支持通过 CLI 进行分页。如果没有时间筛选,您将会收到几年前的旧事件。
```bash # Last 7 days calendly list-events --user-uri "<URI>" --min-start-time "$(date -u -d '7 days ago' +%Y-%m-%dT00:00:00Z)"
# This week calendly list-events --user-uri "<URI>" --min-start-time "2026-01-20T00:00:00Z" --max-start-time "2026-01-27T23:59:59Z"
# Future events only calendly list-events --user-uri "<URI>" --min-start-time "$(date -u +%Y-%m-%dT%H:%M:%SZ)" ```
## 备注
- API 响应中的所有时间均为 UTC(显示时请转换为太平洋时间) - 事件 UUID 可以在 `list-events` 的输出中找到 - 提供 OAuth 工具,但在使用个人访问令牌时并非必需 - CLI 中不支持分页 - 请改用时间筛选
---
**生成时间:** 2026-01-20 **更新时间:** 2026-01-21(npm v1.0.0 便携式 CLI;v2.0 日程安排功能等待上游发布) **来源:** meAmitPatil/calendly-mcp-server via mcporter