nspady/google-calendar-mcp
MCP integration for Google Calendar to manage events.
Google Calendar MCP Server
What it is A small Node.js server that implements the Model Context Protocol (MCP) used by Claude (Anthropic’s AI assistant). It lets Claude read and write a user’s Google Calendar – listing events, creating or updating them, checking free‑busy, handling recurring events, and even importing events from images or PDFs.
Key capabilities
- Connect multiple Google accounts (personal, work, etc.) and query them in a single request.
- Merge calendars, detect cross‑account conflicts, and run free‑busy queries.
- Full event lifecycle: list, search, create, update, delete, and respond to invitations.
- Advanced handling of recurring events and bulk creation.
- Optional service‑account mode for headless or containerised deployments (no browser OAuth flow).
- Optional Docker deployment with either stdio or HTTP transport.
- Tool filtering – you can expose only a subset of the available MCP tools to the AI to reduce token usage or limit permissions.
How to get it running
- Google Cloud setup – enable the Calendar API and create OAuth 2.0 Desktop credentials (or a service‑account key).
- Installation – three easy ways:
- npx (recommended for Claude Desktop): add a snippet to
claude_desktop_config.jsonthat runsnpx @cocal/google-calendar-mcpand pointsGOOGLE_OAUTH_CREDENTIALSat your JSON key. - Local clone:
git clone … && npm install && npm run build. - Docker: clone, copy the credential file into the repo, then
docker compose up(seedocs/docker.md).
- npx (recommended for Claude Desktop): add a snippet to
- First use – ask Claude to authenticate with Google Calendar. Claude opens a browser window, you grant consent, and the server stores the refreshed tokens locally.
- Re‑auth – in test mode tokens expire after 7 days; you can either re‑run the auth command or publish the OAuth consent screen to production to get long‑lived tokens.
Running the server
- Default transport is
stdio(works with Claude Desktop). Use--transport httpand--port/--hostto expose an HTTP endpoint (useful for remote or headless setups). - Environment variables control everything: credential paths, token storage location, which tools are enabled, debug flag, etc. The server logs which credential source it used on startup.
Using the MCP tools The server automatically registers a set of tools that Claude can call, e.g.:
list-calendars,list-events,search-eventscreate-event,update-event,delete-eventrespond-to-event(accept/decline invites)get-freebusy,get-current-timemanage‑accounts(always available for adding/removing Google accounts) You can limit the exposed tools with theENABLED_TOOLSenv var or--enable-toolsflag, which helps keep the AI’s context window small and reduces accidental privilege exposure.
Why it matters For AI assistants that need to schedule meetings, check availability, or modify a user’s calendar, a reliable MCP server bridges the gap between the language model and Google Calendar’s API. It handles OAuth flows, token storage, and provides a clean, tool‑based interface that Claude can invoke without the model needing to know HTTP details.
Links
- Hosted demo: Cocal – a visual calendar UI built on top of this MCP server (https://cocal.io)
- Full docs:
docs/(authentication, advanced usage, deployment, architecture) - Sponsorship: https://github.com/sponsors/nspady
Related
- Project
- Project
- Project
- Project
- Project