Skip to main content
Glama
jakub-lapinski

google-calendar-mcp-serviceaccount

README.md
# google-calendar-mcp-serviceaccount

A minimal [MCP](https://modelcontextprotocol.io) server that gives an AI
agent read/write access to one Google Calendar, authenticated as a
**service account** instead of through interactive OAuth.

## Why a service account

Most Google Calendar MCP servers use OAuth: the app asks a human to sign in
and grant consent, the way a real multi-user product would. For a personal
assistant that only ever needs access to *your own* calendar, that's more
ceremony than the job requires — publishing to production, verified domains,
periodic re-consent.

A service account skips all of it: you share your calendar with the service
account's email address, exactly like sharing it with another person. The
credential doesn't expire until you revoke it.

**Trade-off:** it only works for calendars you can explicitly share by email
(personal Google accounts, most Workspace setups) — it can't act broadly
across a user's account the way a full OAuth grant can.

**Cost:** as of this writing, everything in the setup below is free — no
billing account or credit card needs to be attached to the Google Cloud
project. The Calendar API's free quota is far beyond what a personal
assistant will ever use. This could change in the future; check current
Google Cloud pricing if in doubt.

## Tools

| Tool | Purpose |
| --- | --- |
| `list_events` | List upcoming events in the next N days |
| `create_event` | Create an event, optionally recurring (RRULE) |
| `update_event` | Update an existing event's summary or time |

No `delete_event` on purpose — add it yourself if you want an agent able to
delete calendar entries.

## Setup

Setting this up with the help of an AI coding assistant? Point it at
[AGENTS.md](AGENTS.md) — it has the full step-by-step for both the human and
the agent side.

Doing it manually:

1. In Google Cloud Console: create a project, enable the Calendar API,
   create a **service account** (not an OAuth client), download its JSON key
2. Share your Google Calendar with the service account's email address,
   with "Make changes to events" permission. Note the calendar's ID: for
   your own primary calendar this is just your email address; for any other
   calendar, find it under that calendar's Settings → "Integrate calendar" →
   "Calendar ID"
3. `python3 -m venv venv && ./venv/bin/pip install -r requirements.txt`
4. Copy `.env.example` to `.env` and fill in the key path and your calendar ID
5. Register `calendar_server.py` with your MCP client as a stdio server,
   passing those two variables as its environment

## License

MIT — see [LICENSE](LICENSE).

Maintenance

ActivityMaintained
ResponsivenessNo issues