Skip to main content
Glama
timetree-mcp
by ap311036

TimeTree MCP

TimeTree MCP は、非公式の Model Context Protocol server です。HTTPS 経由で TimeTree カレンダーにアクセスします。デフォルトでは Python direct client を使用し、ブラウザを起動しません。browser transport は互換性のための予備としてのみ残っています。session cookie と CSRF token は MCP process のメモリ内にのみ存在します。

重要: TimeTree 公式の Connect App/API は終了しました。本プロジェクトは TimeTree Web の非公開 endpoint を使用しているため、サービスが変更された場合に動作しなくなる可能性があります。自己責任でリスクを評価し、TimeTree の規約とポリシーを守ってください。

機能

  • calendars、events、memos、comments、labels と members を読み取ります。

  • events と memos の作成、更新、削除を行います。

  • event comments の追加、更新、削除を行います。

  • calendar labels を merge 方式で更新します。

  • calendar の変更をバックグラウンドで監視し、MCP notifications を送信します。

  • すべての書き込み操作では、confirm: true を明示的に渡す必要があります。

  • credentials を MCP tool arguments に入れず、authenticated session はメモリ内にのみ保持します。

Related MCP server: Apple Calendar MCP

要件

  • Python 3.10 以降。

  • TimeTree アカウント。

  • Keychain helper は macOS でのみ使用できます。他のプラットフォームでは環境変数または password file を使用できます。

インストール

git clone <repository-url>
cd timetree-mcp
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --editable .

Runtime が使用するのは Python standard library のみです。インストール後は timetree-mcp と timetree-credentials コマンドが提供されます。

NPM wrapper の使用

NPM wrapper には Node.js 18+ と Python 3.10+ が必要です。package 内の Python MCP server を起動し、 MCP の stdin/stdout を転送します:

npx --yes timetree-mcp

グローバルにインストールすることもできます:

npm install --global timetree-mcp
timetree-mcp

credentials の設定

macOS では Keychain の使用を強く推奨します。設定時、パスワードはターミナル上で隠して入力されるだけで、 shell history、MCP tool arguments、ソースコードに入ることはありません。

./scripts/setup_timetree_keychain.sh
timetree-credentials status

MCP は Keychain に保存された email/password を自動的に読み取ります。status は存在するかどうかのみを報告し、 値を返しません。2 つの Keychain item を削除する場合:

timetree-credentials clear

Keychain を使わない場合、環境変数でも対応できます:

export TIMETREE_EMAIL='your-email@example.com'
export TIMETREE_PASSWORD='your-password'

さらに推奨されるのは、権限を 600 に設定した password file を使うことです:

chmod 600 /absolute/path/to/timetree-password
export TIMETREE_EMAIL='your-email@example.com'
export TIMETREE_PASSWORD_FILE='/absolute/path/to/timetree-password'

Codex への登録

/absolute/path/to/timetree-mcp を checkout の場所に置き換えてください。同じ名前 timetree server がすでに存在する場合は、一度削除してから再度追加してください:

codex mcp remove timetree
codex mcp add timetree \
  --env TIMETREE_EMAIL=your-email@example.com \
  --env TIMETREE_PASSWORD_FILE=/absolute/path/to/timetree-password \
  -- python3 /absolute/path/to/timetree-mcp/src/timetree_mcp/server.py

実際の password は shell history、MCP tool arguments、README やソースコードに置かないでください。

NPM wrapper を使って登録する場合は、server command を次のように変更してください:

codex mcp add timetree \
  --env TIMETREE_EMAIL=your-email@example.com \
  --env TIMETREE_PASSWORD_FILE=/absolute/path/to/timetree-password \
  -- npx --yes timetree-mcp

MCP tools

ログインと読み取り

  • timetree_login、timetree_logout、timetree_status

  • timetree_keychain_status

  • timetree_list_calendars、timetree_list_events、timetree_list_memos

  • timetree_list_event_comments

  • timetree_get_calendar_labels、timetree_get_calendar_members、 timetree_get_calendar_virtual_members

書き込み

  • timetree_create_event、timetree_update_event、timetree_delete_event

  • timetree_create_memo、timetree_update_memo、timetree_delete_memo

  • timetree_add_event_comment、timetree_update_event_comment、 timetree_delete_event_comment

  • timetree_update_calendar_labels

時刻は ISO-8601 文字列または Unix milliseconds で渡せます。すべての書き込みツールには confirm: true を明示する必要があります。メンバーの招待/削除 endpoint はまだ検証されていないため、意図的に追加していません。

一部の古い calendar で TimeTree sync endpoint が -425 を返す場合、events クエリはその calendar をスキップし、skipped_calendars フィールドで報告されます。他の読み取り可能な calendars が一括で失敗することはありません。

バックグラウンド監視

  • timetree_start_monitor:バックグラウンド polling(間隔 30–3600 秒)を開始します。

  • timetree_monitor_status:監視状態、前回の polling、エラー、通知数を確認します。

  • timetree_stop_monitor:監視を停止します。

最初の polling は baseline を構築するだけです。その後の追加・変更・削除を検出すると、server は MCP notifications/message を送信します。監視は MCP process に依存しており、client が終了すると監視も停止します。

プロジェクト構造

src/timetree_mcp/          Python package 與 MCP server
bin/                       NPM wrapper launcher
scripts/                   本機設定輔助腳本
tests/                     standard-library unittest 測試
test/                      NPM wrapper 測試
.github/workflows/ci.yml   Continuous integration

テスト

python3 -m unittest discover -s tests -v
npm test

舊的 browser transport は互換性の予備として src/timetree_mcp/browser.py に残っていますが、server のデフォルトでは読み込まれません。

License

本プロジェクトは MIT License の下で公開されています。

Available Tools

29 tools
timetree_add_event_commentA

Add a comment to a TimeTree event. Requires confirm=true. Passes TimeTree's silent flag, whose notification effects are unverified; it does not guarantee notification suppression.

Inputs: confirm (required), content (required), event_uuid (required), calendar_id (required), +1 more.

timetree_create_eventB

Create a TimeTree event. Requires confirm=true and writes to the real calendar. The silent argument is unsupported; upstream notifications may occur.

Inputs: title (required), end_at (required), confirm (required), start_at (required), +15 more.

timetree_create_memoC

Create a TimeTree memo. Requires confirm=true.

Inputs: title (required), confirm (required), calendar_id (required), url, +6 more.

timetree_delete_eventA
DestructiveIdempotent

Delete a TimeTree event. This cannot be undone and requires confirm=true.

Inputs: confirm (required), event_uuid (required), calendar_id (required).

timetree_delete_event_commentC
DestructiveIdempotent

Delete a TimeTree event comment. Requires confirm=true.

Inputs: confirm (required), comment_id (required), event_uuid (required), calendar_id (required).

timetree_delete_memoB
DestructiveIdempotent

Delete a TimeTree memo. This cannot be undone and requires confirm=true.

Inputs: confirm (required), memo_uuid (required), calendar_id (required).

timetree_get_calendar_labelsC
Read-onlyIdempotent

Read all labels for a TimeTree calendar.

Inputs: calendar_id (required).

timetree_get_calendar_membersB
Read-onlyIdempotent

Read active members of a TimeTree calendar, optionally including deactivated members.

Inputs: calendar_id (required), include_deactivated.

timetree_get_calendar_virtual_membersB
Read-onlyIdempotent

Read virtual members of a TimeTree calendar, optionally including deactivated members.

Inputs: calendar_id (required), include_deactivated.

timetree_get_occurrence_for_editA
Read-onlyIdempotent

Read and validate one timed DAILY/WEEKLY occurrence in Asia/Taipei, Asia/Tokyo, Asia/Kolkata, America/New_York or Europe/London. Start/end timezones must match. Returns a calendar revision and timezone; unsafe DST/metadata is rejected and unverified parent links mark it uneditable. No calendar writes.

Inputs: event_uuid (required), calendar_id (required), occurrence_start_at (required).

timetree_keychain_statusA
Read-onlyIdempotent

Report whether the macOS Keychain contains TimeTree email/password items; never returns their values.

Inputs: no named parameters.

timetree_list_calendarsA
Read-onlyIdempotent

Read the calendars available in the authenticated TimeTree account.

Inputs: no named parameters.

timetree_list_event_commentsC
Read-onlyIdempotent

Read comments attached to a TimeTree event.

Inputs: event_uuid (required), calendar_id (required).

timetree_list_eventsC
Read-onlyIdempotent

Read TimeTree events overlapping a date range. This tool is read-only.

Inputs: limit, query, end_date, start_date, +1 more.

timetree_list_memosC
Read-onlyIdempotent

Read category-2 TimeTree memos from a calendar.

Inputs: calendar_id (required), limit, updated_after.

timetree_list_occurrencesA
Read-onlyIdempotent

Read dated occurrences overlapping an explicit window of at most 93 days, including a narrow DAILY/WEEKLY/MONTHLY/YEARLY rule subset. Requires a complete selected-calendar snapshot; unsupported rules, unsafe DST, or truncation mark complete=false. Does not establish edit eligibility or prove a time is free.

Inputs: end_at (required), start_at (required), calendar_id (required), limit, +1 more.

timetree_loginA

Login to TimeTree over direct HTTPS using one complete configured credential source: explicit integration settings, environment/password file, or macOS Keychain. Partial explicit settings fail without mixing sources. Do not pass credentials as tool arguments; browser sessions are not imported.

Inputs: no named parameters.

timetree_logoutA
DestructiveIdempotent

Clear the in-memory TimeTree session cookie and CSRF token.

Inputs: no named parameters.

timetree_monitor_statusA
Read-onlyIdempotent

Read monitor activity, last successful baseline, incomplete-check errors, and pending notification states. Unknown delivery blocks automatic sending; notifications_sent counts completed transport writes, not client receipts. State is memory-only.

Inputs: no named parameters.

timetree_move_occurrenceA
Destructive

Move ONLY one preflighted occurrence, preserving duration/metadata. Requires confirm=true, revision and operation_id. TWO NON-ATOMIC writes: create child then exclude original. Partial/uncertain operations remain durably blocked; never retry with a new ID or delete/rollback automatically.

Inputs: confirm (required), event_uuid (required), calendar_id (required), new_start_at (required), +3 more.

timetree_occurrence_operation_statusA
Read-onlyIdempotent

Read the local occurrence journal by operation_id, including the last dispatch phase and known child UUID. Does not query TimeTree, resume, retry, or unlock an uncertain operation.

Inputs: operation_id (required).

timetree_start_monitorB
Idempotent

Start process-local polling of complete calendar snapshots. Changes use MCP notifications/message; transport writes do not prove client receipt. Uncertain notifications remain pending without automatic retry. Baselines and pending state are memory-only.

Inputs: calendar_id, interval_seconds.

timetree_statusA
Read-onlyIdempotent

Read the current direct HTTPS TimeTree authentication status.

Inputs: no named parameters.

timetree_stop_monitorA
DestructiveIdempotent

Request stopping the monitor without clearing baselines or pending notifications. Inspect stopping and poll_in_flight: an in-progress read may still be finishing, and restart is refused until it stops.

Inputs: no named parameters.

timetree_timezone_statusA
Read-onlyIdempotent

Diagnose installed IANA timezone data locally without credentials, calendar reads, or writes. Checks the five supported occurrence zones by default, or one requested IANA zone. Availability does not imply that occurrence tools support the requested zone.

Inputs: timezone.

timetree_update_calendar_labelsA
Destructive

Merge-update TimeTree label names/colors. Requires confirm=true; omitted labels are preserved.

Inputs: labels (required), confirm (required), calendar_id (required).

timetree_update_eventC
Destructive

Update selected fields of a TimeTree event. Requires confirm=true. The silent argument is unsupported; upstream notifications may occur.

Inputs: confirm (required), event_uuid (required), calendar_id (required), url, +16 more.

timetree_update_event_commentB
Destructive

Update a TimeTree event comment. Requires confirm=true.

Inputs: confirm (required), content (required), comment_id (required), event_uuid (required), +1 more.

timetree_update_memoC
Destructive

Update a TimeTree memo. Requires confirm=true.

Inputs: confirm (required), memo_uuid (required), calendar_id (required), url, +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 29 tools

    Disambiguation3/5

    Most families are distinct (events, comments, memos, labels, members, monitors, auth), but the event/occurrence split is ambiguous: timetree_list_events, timetree_list_occurrences, and timetree_get_occurrence_for_edit all read event data over a date window and an agent could easily misselect. The cluster of status tools (status, keychain_status, timezone_status, monitor_status, occurrence_operation_status) is differentiated only by long descriptions, which helps but does not fully disambiguate.

    Naming Consistency4/5

    Nearly all tools use a timetree_ prefix plus snake_case verb_noun form (list_calendars, create_event, update_memo, delete_event_comment), which is predictable. The deviation is the noun-only status tools (timetree_status, timetree_keychain_status, timetree_timezone_status, timetree_occurrence_operation_status) that drop the verb, but the pattern remains readable.

    Tool Count3/5

    At 29 tools the surface is heavy and sits at the upper end of the rubric, though the breadth is largely earned by a wide domain (events, occurrences, comments, memos, labels, members, monitoring, auth). Some thinning is possible—several status/diagnostic tools could be consolidated—but nothing is obviously redundant padding.

    Completeness3/5

    Core lifecycle coverage is strong: full CRUD for events, comments, and memos, plus labels update, member reads, occurrence moves, and operation recovery. However, calendar-level create/delete is absent and members are read-only (no invite/remove), leaving notable gaps in calendar administration.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers