The Google Calendar MCP Server is an implementation of the Model Context Protocol (MCP) that enables seamless integration between Google Calendar and Claude Desktop. This project allows users to interact with their Google Calendar through natural language commands, facilitating event management directly within Claude Desktop.
colorId
.This project is built using:
- TypeScript: Ensures type-safe code development.
- MCP SDK: Facilitates integration with Claude Desktop.
- Google API: Provides access to Google Calendar.
- Zod: Implements schema validation for data integrity.
- Express: Powers the HTTP server implementation.
- Helmet.js: Enhances security with HTTP headers.
- AES-256-GCM: Secures token encryption.
- Jest: Manages unit testing and coverage.
- GitHub Actions: Automates CI/CD processes.
getEvents
Retrieves calendar events with filtering options.
Parameters:
- calendarId
(optional): Calendar ID (defaults to primary calendar).
- timeMin
(optional): Start time for event retrieval (ISO 8601 format).
- timeMax
(optional): End time for event retrieval (ISO 8601 format).
- maxResults
(optional): Maximum number of events to retrieve (default: 10).
- orderBy
(optional): Sort order ("startTime" or "updated").
createEvent
Creates a new calendar event.
Parameters:
- calendarId
(optional): Calendar ID (defaults to primary calendar).
- event
: Event details object containing:
- summary
(required): Event title.
- description
(optional): Event description.
- location
(optional): Event location.
- start
: Start time object with dateTime
, date
, and timeZone
.
- end
: End time object (same format as start
).
- attendees
(optional): Array of attendees with email and optional displayName
.
- colorId
(optional): Event color ID (1-11).
updateEvent
Updates an existing calendar event.
Parameters:
- calendarId
(optional): Calendar ID (defaults to primary calendar).
- eventId
(required): ID of the event to update.
- event
: Event details object containing fields to update.
deleteEvent
Deletes a calendar event.
Parameters:
- calendarId
(optional): Calendar ID (defaults to primary calendar).
- eventId
(required): ID of the event to delete.
.env
file:GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_REDIRECT_URI=http://localhost:3000/oauth2callback
TOKEN_ENCRYPTION_KEY=32-byte-hex-key
Add the server to your claude_desktop_config.json
:
{
"mcpServers": {
"google-calendar": {
"command": "npx",
"args": ["-y", "@takumi0706/google-calendar-mcp"],
"env": {
"GOOGLE_CLIENT_ID": "your_client_id",
"GOOGLE_CLIENT_SECRET": "your_client_secret",
"GOOGLE_REDIRECT_URI": "http://localhost:3000/oauth2callback"
}
}
}
}
prompt: 'consent'
parameter for better token management.git clone https://github.com/takumi0706/google-calendar-mcp.git
cd google-calendar-mcp
npm install
npm run dev
npm test
npm test -- --coverage
MIT