Automatic Calendar in Python
mcp-name: io.github.danielsousaoliveira/cal-auto-python
An MCP server that connects your GitHub Projects backlog to Google Calendar and Google Tasks. Point your assistant at it and ask it to show what's on your calendar, list your backlog, plan a week of work into your free time, or turn that plan into real events and to-dos.
Install
$ pip install cal-auto-python
This installs the cal-auto-python command, which runs both the CLI and the MCP server.
One-off authorisation
Before the server can read or write your calendar, you authorise it once against your Google account:
$ cal-auto-python authorize
This opens a browser window, asks you to sign in and grant calendar/tasks access, and stores the
resulting token on disk (token.json in the config directory below). Do this before starting the
server for the first time, and again any time authorisation expires — see
Troubleshooting.
Authorisation needs a Google OAuth client:
- In the Google Cloud Console, create a project (or reuse one) and enable the Google Calendar API and Google Tasks API.
- Under APIs & Services → Credentials, create an OAuth client ID of type Desktop app, and download the resulting JSON.
- Save it as
credentials.jsonin the config directory (see Configuration for where that is and how to change it).
Connect it to your assistant
The server speaks MCP over stdio by default, which is what these clients expect. Every capability behaves the same regardless of client.
Claude Desktop / Claude Code
Add to claude_desktop_config.json (Desktop) or run claude mcp add (Claude Code), or paste this
into either client's MCP settings:
{
"mcpServers": {
"auto-calendar": {
"command": "cal-auto-python",
"args": ["server"],
"env": {
"GITHUB_TOKEN": "your_github_token_here",
"GITHUB_PROJECT_ID": "PVT_xxxxxxxxxx",
"CAL_AUTO_TIMEZONE": "Europe/Lisbon"
}
}
}
}
Cursor
Add to .cursor/mcp.json in your project (or the global ~/.cursor/mcp.json):
{
"mcpServers": {
"auto-calendar": {
"command": "cal-auto-python",
"args": ["server"],
"env": {
"GITHUB_TOKEN": "your_github_token_here",
"GITHUB_PROJECT_ID": "PVT_xxxxxxxxxx",
"CAL_AUTO_TIMEZONE": "Europe/Lisbon"
}
}
}
}
Generic (any stdio-capable MCP client)
{
"command": "cal-auto-python",
"args": ["server"],
"env": {
"GITHUB_TOKEN": "your_github_token_here",
"GITHUB_PROJECT_ID": "PVT_xxxxxxxxxx",
"CAL_AUTO_TIMEZONE": "Europe/Lisbon"
}
}
Web-based clients, or anyone wanting to run the server on one machine and talk to it from another, can't launch a stdio child process. For them, run the server over HTTP instead:
$ cal-auto-python server --transport http --host 127.0.0.1 --port 8000
HTTP mode is single-user and intended for local use only. The server reads one person's stored
Google authorisation from disk and has no notion of separate users; it adds no authorisation of its
own on top of the HTTP endpoint. Exposing it on a shared or public network would hand everyone who
can reach it access to that one calendar, so only bind it to 127.0.0.1 or a private, trusted
network.
Prerequisites
- A GitHub personal access token with read access to the Projects V2 board you want to
schedule from: a classic token with the
read:projectscope (plusrepoif the board tracks items in private repositories), or a fine-grained token granted read access to Projects. Set it asGITHUB_TOKEN. - The board's Projects V2 node ID, e.g.
PVT_xxxxxxxxxx. Find it by querying the GitHub GraphQL API for the project, or from its URL and the Projects API docs. Set it asGITHUB_PROJECT_ID. - A Google OAuth client (Desktop app type) as described in One-off authorisation above.
Capabilities
| Tool | Arguments | What it does |
|---|---|---|
status |
— | Reports which integrations are configured and whether Google authorisation is present. Reveals no secrets. |
list_calendar_entries |
start, end (YYYY-MM-DD, inclusive) |
Lists calendar events and all-day items in the date range. |
list_todos |
— | Lists outstanding (not completed) items from the configured Google Tasks list. |
list_tracker_items |
statuses (optional list, e.g. ["Backlog", "In Progress"]) |
Lists work items from the GitHub Projects board, optionally filtered by status. Omit to list everything. |
plan_week |
items, start_date, end_date, working_day_start, working_day_end, timezone (optional), commitments (optional) |
Plans work into free working-hour slots for the given items and existing commitments. Pure computation — does not touch any configured account. |
sync_backlog |
start_date, end_date, apply (default false) |
Fetches the schedulable backlog, fits it around existing calendar commitments, and returns the result. Previews by default; pass apply=true to create the events and to-dos. Already-scheduled items are skipped. |
create_calendar_entry |
summary, start, end, timezone, description (optional), attendees (optional) |
Creates one calendar event. Does not schedule or deduplicate. |
create_todo |
title, note (optional), due (optional) |
Creates one Google Task. Does not deduplicate. |
The CLI exposes the same scheduling logic directly:
$ cal-auto-python sync --start 2026-08-17 --end 2026-08-21 --apply
sync previews by default; pass --apply to create events and tasks, and --start/--end
(YYYY-MM-DD) or --working-day-start/--working-day-end (HH:MM) to override the default
range (today plus the next two days) and working hours.
Configuration
Every variable below is optional except GITHUB_TOKEN, GITHUB_PROJECT_ID, and
CAL_AUTO_TIMEZONE, which has no default and must be set. Copy .env.example to .env if you use
an environment loader.
| Variable | Default | Purpose |
|---|---|---|
GITHUB_TOKEN |
(required) | GitHub token used to query the Projects board. |
GITHUB_PROJECT_ID |
(required) | GitHub Projects V2 node ID of the board to read. |
CAL_AUTO_TIMEZONE |
(required) | IANA timezone name used to schedule events, e.g. Europe/Lisbon. |
CAL_AUTO_CONFIG_DIR |
%APPDATA%\cal-auto-python (Windows), $XDG_CONFIG_HOME/cal-auto-python, or ~/.config/cal-auto-python |
Directory holding credentials.json and token.json. |
CAL_AUTO_WORKING_DAY_START |
09:00 |
Start of the working day, HH:MM. |
CAL_AUTO_WORKING_DAY_END |
17:00 |
End of the working day, HH:MM. |
CAL_AUTO_CALENDAR_ID |
primary |
Google Calendar ID to schedule events into. |
CAL_AUTO_TASK_LIST_ID |
@default |
Google Tasks list ID to create tasks in. |
CAL_AUTO_ATTENDEES |
(none) | Comma-separated email addresses to invite to scheduled events. |
CAL_AUTO_SCHEDULABLE_STATUSES |
Backlog |
Comma-separated GitHub Project status names to schedule. Must match the board's status names exactly. |
CAL_AUTO_COUNT_ALL_DAY_EVENTS |
false |
Whether all-day events count against free/busy slots. |
Troubleshooting
Authorisation error / "Google account has not been authorised"
Run cal-auto-python authorize again. This also fixes an expired authorisation that couldn't be
refreshed automatically (Google revokes a refresh token after long inactivity or if access is
revoked from your Google Account settings) — the server reports this explicitly rather than
failing silently.
Events show up at unexpected times
Check CAL_AUTO_TIMEZONE. It must be a valid IANA name (e.g. Europe/Lisbon, not CET or a UTC
offset) and must match the timezone you actually work in — the scheduler places events using this
value, not your system timezone.
list_tracker_items or sync_backlog return nothing, even though the board has cards
CAL_AUTO_SCHEDULABLE_STATUSES (default Backlog) must match your board's status column names
exactly, including case. Open the board and copy the status name verbatim, or pass an explicit
statuses argument to list_tracker_items to confirm what the board actually reports.
Roadmap
[x] Retrieve project data from github
[x] Add events and tasks to google calendar
[x] Schedule based on priority
[x] Fix duplicated events and tasks
[x] Replace the hardcoded entry point with a real CLI
[x] Run as an MCP server ( cal-auto-python server)
[x] Optimize event distribution
[x] Update or move an event when the plan changes
Contributing
Adding another task tracker or calendar backend? See docs/ARCHITECTURE.md for the layers and a walkthrough, and CONTRIBUTING.md for how to run the tests, linter, and type checker.
References
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cal_auto_python-0.0.1.tar.gz.
File metadata
- Download URL: cal_auto_python-0.0.1.tar.gz
- Upload date:
- Size: 37.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2d6808c40c4d943c65679bb183dc5d721c340a0401cc4d0662c198d3ff9a549
|
|
| MD5 |
09bad32757cba725d1a930e3f972ee0a
|
|
| BLAKE2b-256 |
ce0a9226ea116199b6e90b01f0d04d317feb25a89bb2de644570398355d96eae
|
Provenance
The following attestation bundles were made for cal_auto_python-0.0.1.tar.gz:
Publisher:
release.yml on danielsousaoliveira/auto-calendar-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cal_auto_python-0.0.1.tar.gz -
Subject digest:
e2d6808c40c4d943c65679bb183dc5d721c340a0401cc4d0662c198d3ff9a549 - Sigstore transparency entry: 2767911474
- Sigstore integration time:
-
Permalink:
danielsousaoliveira/auto-calendar-python@4b82ccd39e05f4aa344251c00af9c07c49ee9f74 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/danielsousaoliveira
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4b82ccd39e05f4aa344251c00af9c07c49ee9f74 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cal_auto_python-0.0.1-py3-none-any.whl.
File metadata
- Download URL: cal_auto_python-0.0.1-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17ce08752b68e752d00c37b7996327b60326b71d34ea96e58d8fe332aa7718c6
|
|
| MD5 |
5b00e338c9da057cfa531eee87e71a39
|
|
| BLAKE2b-256 |
5447468ef703fde2df69fa36944930c6103eafe35c716c69ce793bd0d5aaf046
|
Provenance
The following attestation bundles were made for cal_auto_python-0.0.1-py3-none-any.whl:
Publisher:
release.yml on danielsousaoliveira/auto-calendar-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cal_auto_python-0.0.1-py3-none-any.whl -
Subject digest:
17ce08752b68e752d00c37b7996327b60326b71d34ea96e58d8fe332aa7718c6 - Sigstore transparency entry: 2767911508
- Sigstore integration time:
-
Permalink:
danielsousaoliveira/auto-calendar-python@4b82ccd39e05f4aa344251c00af9c07c49ee9f74 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/danielsousaoliveira
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4b82ccd39e05f4aa344251c00af9c07c49ee9f74 -
Trigger Event:
push
-
Statement type: