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

  1. Google Cloud setup – enable the Calendar API and create OAuth 2.0 Desktop credentials (or a service‑account key).
  2. Installation – three easy ways:
    • npx (recommended for Claude Desktop): add a snippet to claude_desktop_config.json that runs npx @cocal/google-calendar-mcp and points GOOGLE_OAUTH_CREDENTIALS at 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 (see docs/docker.md).
  3. 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.
  4. 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 http and --port/--host to 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-events
  • create-event, update-event, delete-event
  • respond-to-event (accept/decline invites)
  • get-freebusy, get-current-time
  • manage‑accounts (always available for adding/removing Google accounts) You can limit the exposed tools with the ENABLED_TOOLS env var or --enable-tools flag, 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

Related

  • Project
  • Project
  • Project
  • Project
  • Project