google-calendar

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Calendar

Google Calendar

Lightweight Google Calendar integration with standalone OAuth authentication. No MCP server required.
⚠️ Requires Google Workspace account. Personal Gmail accounts are not supported.
轻量级Google Calendar集成,具备独立OAuth认证,无需MCP服务器。
⚠️ 需使用Google Workspace账户。不支持个人Gmail账户。

First-Time Setup

首次设置

Authenticate with Google (opens browser):
bash
python scripts/auth.py login
Check authentication status:
bash
python scripts/auth.py status
Logout when needed:
bash
python scripts/auth.py logout
通过Google进行认证(会打开浏览器):
bash
python scripts/auth.py login
检查认证状态:
bash
python scripts/auth.py status
需要时登出:
bash
python scripts/auth.py logout

Commands

命令

All operations via
scripts/gcal.py
. Auto-authenticates on first use if not logged in.
所有操作通过
scripts/gcal.py
执行。如果未登录,首次使用时会自动进行认证。

List Calendars

列出日历

bash
python scripts/gcal.py list-calendars
bash
python scripts/gcal.py list-calendars

List Events

列出事件

bash
undefined
bash
undefined

List events from primary calendar (default: next 30 days)

列出主日历中的事件(默认:未来30天)

python scripts/gcal.py list-events
python scripts/gcal.py list-events

List events with specific time range

列出特定时间范围内的事件

python scripts/gcal.py list-events --time-min 2024-01-15T00:00:00Z --time-max 2024-01-31T23:59:59Z
python scripts/gcal.py list-events --time-min 2024-01-15T00:00:00Z --time-max 2024-01-31T23:59:59Z

List events from a specific calendar

列出特定日历中的事件

python scripts/gcal.py list-events --calendar "work@example.com"
python scripts/gcal.py list-events --calendar "work@example.com"

Limit results

限制结果数量

python scripts/gcal.py list-events --max-results 10
undefined
python scripts/gcal.py list-events --max-results 10
undefined

Get Event Details

获取事件详情

bash
python scripts/gcal.py get-event EVENT_ID
python scripts/gcal.py get-event EVENT_ID --calendar "work@example.com"
bash
python scripts/gcal.py get-event EVENT_ID
python scripts/gcal.py get-event EVENT_ID --calendar "work@example.com"

Create Event

创建事件

bash
undefined
bash
undefined

Basic event

基础事件

python scripts/gcal.py create-event "Team Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z"
python scripts/gcal.py create-event "Team Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z"

Event with description and location

带描述和地点的事件

python scripts/gcal.py create-event "Team Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z"
--description "Weekly sync" --location "Conference Room A"
python scripts/gcal.py create-event "Team Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z"
--description "Weekly sync" --location "Conference Room A"

Event with attendees

带参会者的事件

python scripts/gcal.py create-event "Team Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z"
--attendees user1@example.com user2@example.com
python scripts/gcal.py create-event "Team Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z"
--attendees user1@example.com user2@example.com

Event on specific calendar

特定日历中的事件

python scripts/gcal.py create-event "Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z"
--calendar "work@example.com"
undefined
python scripts/gcal.py create-event "Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z"
--calendar "work@example.com"
undefined

Update Event

更新事件

bash
undefined
bash
undefined

Update event title

更新事件标题

python scripts/gcal.py update-event EVENT_ID --summary "New Title"
python scripts/gcal.py update-event EVENT_ID --summary "New Title"

Update event time

更新事件时间

python scripts/gcal.py update-event EVENT_ID --start "2024-01-15T14:00:00Z" --end "2024-01-15T15:00:00Z"
python scripts/gcal.py update-event EVENT_ID --start "2024-01-15T14:00:00Z" --end "2024-01-15T15:00:00Z"

Update multiple fields

更新多个字段

python scripts/gcal.py update-event EVENT_ID
--summary "Updated Meeting" --description "New agenda" --location "Room B"
python scripts/gcal.py update-event EVENT_ID
--summary "Updated Meeting" --description "New agenda" --location "Room B"

Update attendees

更新参会者

python scripts/gcal.py update-event EVENT_ID --attendees user1@example.com user3@example.com
undefined
python scripts/gcal.py update-event EVENT_ID --attendees user1@example.com user3@example.com
undefined

Delete Event

删除事件

bash
python scripts/gcal.py delete-event EVENT_ID
python scripts/gcal.py delete-event EVENT_ID --calendar "work@example.com"
bash
python scripts/gcal.py delete-event EVENT_ID
python scripts/gcal.py delete-event EVENT_ID --calendar "work@example.com"

Find Free Time

查找空闲时间

Find the first available slot for a meeting with specified attendees:
bash
undefined
查找与指定参会者的首个可用会议时段:
bash
undefined

Find 30-minute slot for yourself

为自己查找30分钟的时段

python scripts/gcal.py find-free-time
--attendees me
--time-min "2024-01-15T09:00:00Z"
--time-max "2024-01-15T17:00:00Z"
--duration 30
python scripts/gcal.py find-free-time
--attendees me
--time-min "2024-01-15T09:00:00Z"
--time-max "2024-01-15T17:00:00Z"
--duration 30

Find 60-minute slot with multiple attendees

为多位参会者查找60分钟的时段

python scripts/gcal.py find-free-time
--attendees me user1@example.com user2@example.com
--time-min "2024-01-15T09:00:00Z"
--time-max "2024-01-19T17:00:00Z"
--duration 60
undefined
python scripts/gcal.py find-free-time
--attendees me user1@example.com user2@example.com
--time-min "2024-01-15T09:00:00Z"
--time-max "2024-01-19T17:00:00Z"
--duration 60
undefined

Respond to Event Invitation

回复事件邀请

bash
undefined
bash
undefined

Accept an invitation

接受邀请

python scripts/gcal.py respond-to-event EVENT_ID accepted
python scripts/gcal.py respond-to-event EVENT_ID accepted

Decline an invitation

拒绝邀请

python scripts/gcal.py respond-to-event EVENT_ID declined
python scripts/gcal.py respond-to-event EVENT_ID declined

Mark as tentative

标记为暂定

python scripts/gcal.py respond-to-event EVENT_ID tentative
python scripts/gcal.py respond-to-event EVENT_ID tentative

Respond without notifying organizer

回复但不通知组织者

python scripts/gcal.py respond-to-event EVENT_ID accepted --no-notify
undefined
python scripts/gcal.py respond-to-event EVENT_ID accepted --no-notify
undefined

Date/Time Format

日期/时间格式

All times use ISO 8601 format with timezone:
  • UTC:
    2024-01-15T10:30:00Z
  • With offset:
    2024-01-15T10:30:00-05:00
    (EST)
所有时间使用带时区的ISO 8601格式:
  • UTC:
    2024-01-15T10:30:00Z
  • 带偏移量:
    2024-01-15T10:30:00-05:00
    (美国东部标准时间)

Calendar ID Format

日历ID格式

  • Primary calendar: Use
    primary
    or omit the
    --calendar
    flag
  • Other calendars: Use the calendar ID from
    list-calendars
    (usually an email address)
  • 主日历:使用
    primary
    或省略
    --calendar
    参数
  • 其他日历:使用
    list-calendars
    命令返回的日历ID(通常为邮箱地址)

Token Management

令牌管理

Tokens stored securely using the system keyring:
  • macOS: Keychain
  • Windows: Windows Credential Locker
  • Linux: Secret Service API (GNOME Keyring, KDE Wallet, etc.)
Service name:
google-calendar-skill-oauth
Tokens are automatically refreshed when expired using Google's cloud function.
令牌通过系统密钥环安全存储:
  • macOS:钥匙串(Keychain)
  • Windows:Windows凭据管理器
  • Linux:Secret Service API(GNOME Keyring、KDE Wallet等)
服务名称:
google-calendar-skill-oauth
令牌过期时会通过Google云函数自动刷新。