tutorialgoogle-calendarclaudemcp

How to Connect Google Calendar to Claude

Step-by-step guide comparing self-hosted and hosted approaches. Includes actual code snippets for both methods.

Sarah Chen
Developer Relations, CalendarMCP ·

Every Claude user eventually wants the same thing: for Claude to see their calendar. Can I make Thursday work? What am I doing next week? Book me something for Wednesday afternoon.

The good news is that this works, and it works well. The less good news is that most tutorials make it seem harder than it needs to be. This guide covers two paths: the self-hosted route using the popular open-source nspady/google-calendar-mcp repo, and the hosted route using CalendarMCP. Both work. They have different tradeoffs.

Option 1: Self-Hosted (nspady/google-calendar-mcp)

The nspady repo has around 1,100 GitHub stars and is the most widely referenced open-source calendar MCP server. Here is what setting it up actually looks like.

Step 1: Set up Google Cloud

You need a Google Cloud project with the Calendar API enabled and OAuth 2.0 credentials. If you have never done this before, budget 15-20 minutes.

  • Go to console.cloud.google.com
  • Create a new project
  • Enable the Google Calendar API
  • Configure an OAuth consent screen (app name, support email, scopes)
  • Create OAuth 2.0 credentials, choosing "Desktop app" as the type
  • Download the credentials.json file

If your account has Google Advanced Protection enabled, stop here. That flow will not work with this approach. See the dedicated GAP guide instead.

Step 2: Clone, install, and authenticate

git clone https://github.com/nspady/google-calendar-mcp
cd google-calendar-mcp
npm install
npm run auth

The npm run auth step opens a browser window for you to authorize the app. It saves a token.json file. This token expires. If your consent screen is not published, tokens expire after 7 days and you will get auth errors.

Step 3: Configure Claude Desktop

Find your Claude Desktop config file:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the server config:

{
  "mcpServers": {
    "google-calendar": {
      "command": "node",
      "args": ["/absolute/path/to/google-calendar-mcp/dist/index.js"],
      "env": {
        "GOOGLE_OAUTH_CREDENTIALS": "/absolute/path/to/credentials.json",
        "GOOGLE_CALENDAR_CREDENTIALS": "/absolute/path/to/token.json"
      }
    }
  }
}

Restart Claude Desktop. If it worked, you will see a tools count increase in the interface.

The friction points

Self-hosted works, but there are real limitations worth knowing upfront:

  • Works only with Claude Desktop, not Claude.ai or Claude Code
  • Your machine must be on and running for the server to respond
  • Tokens expire on a 7-day cycle unless you publish your consent screen
  • No batch operations, so bulk updates require one API call per event
  • Completely blocked if you use Google Advanced Protection

Option 2: Hosted (CalendarMCP)

CalendarMCP is a hosted version of a Google Calendar MCP server. No credentials.json. No local server. No token management. Here is the full setup:

Step 1: Connect your calendar

Go to calendarmcp.ai and click Connect with Google. Authorize the app. You land on the dashboard with an API key that looks like cmcp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.

Step 2 (optional): Connect additional accounts

A single CalendarMCP API key can hold multiple Google accounts. From the dashboard, click + Add account and either sign in with another Google account via OAuth, or share a calendar with our service account email (the only path for Google Advanced Protection users). Every connected calendar gets a row in the Calendar access matrix, where you can tick Read and/or Write per calendar. Your agent can list_events across everything in one call.

Step 3: Add to Claude Code

claude mcp add calendar https://calendarmcp.ai/api/mcp \
  --header "Authorization: Bearer cmcp_your_api_key"

Step 3 (alt): Add to Claude.ai

  1. Go to Settings, then Connectors
  2. Add a new MCP connector
  3. Enter https://calendarmcp.ai/api/mcp as the URL
  4. Set the authorization header: Authorization: Bearer cmcp_your_api_key

Step 3 (alt): Add to Cursor or any HTTP MCP client

{
  "mcpServers": {
    "calendar": {
      "url": "https://calendarmcp.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer cmcp_your_api_key"
      }
    }
  }
}

Comparison

Self-hosted
  • Setup: 20-30 minutes
  • Cost: free
  • Runs locally, machine must be on
  • Claude Desktop only
  • Token management is your problem
  • No batch operations
  • Blocked by Google Advanced Protection
CalendarMCP (hosted)
  • Setup: about 2 minutes
  • Cost: free to start
  • Runs in the cloud, always available
  • Works with Claude.ai, Claude Code, Cursor, and any HTTP MCP client
  • Auth managed for you, no token expiry issues
  • Batch operations (up to 50 events per call)
  • Multiple Google accounts under one API key with a per-calendar Read/Write matrix
  • Google Advanced Protection supported via service accounts (and AP accounts live alongside OAuth accounts on the same key)

Which should you use?

Use self-hosted if you want full control over your credentials, do not want your auth tokens stored on any external server, and only need Claude Desktop.

Use CalendarMCP if you want it to just work, need to access calendar tools from Claude.ai or Claude Code, want batch operations, or have Google Advanced Protection enabled.

Most people should start with CalendarMCP. The hosted version supports more clients and more features, and the tradeoff is that CalendarMCP holds an OAuth refresh token on your behalf, scoped only to Google Calendar.

Ready to get started?

Connect your Google Calendar to Claude and any MCP client in about two minutes.

Connect Google Calendar