An MCP server to interface with the Google Calendar API. Based on TypeScript.
Empowering LLMs with Real-Time Calendar Access via the Model Context Protocol
The Google Calendar MCP Server bridges the gap between Large Language Models (LLMs) like Claude and the ubiquitous Google Calendar, enabling sophisticated AI-driven calendar management. By adhering to the Model Context Protocol (MCP), this server provides a standardized and secure interface for LLMs to access, modify, and interpret calendar data, unlocking a new realm of possibilities for intelligent assistants and automated workflows.
This server empowers LLMs to:
The Google Calendar MCP Server offers a comprehensive suite of features, meticulously engineered for performance, security, and seamless integration:
The server's architecture is designed for modularity, scalability, and maintainability:
@modelcontextprotocol/sdk
to streamline communication and adherence to the MCP standard.googleapis
library to simplify interactions with the Google Calendar API.dotenv
for flexible and secure configuration management.Helmet.js
to protect against common web vulnerabilities.Jest
for comprehensive unit testing and GitHub Actions
for continuous integration and deployment.The Google Calendar MCP Server exposes a powerful set of tools that enable LLMs to perform a wide range of calendar-related tasks:
getEvents
: Intelligent Event RetrievalRetrieves calendar events based on flexible filtering criteria.
Parameters:
calendarId
(optional): Specifies the calendar to query. Defaults to the user's primary calendar.timeMin
(optional): Filters events to those starting after this date/time (ISO 8601 format, e.g., "2025-03-01T00:00:00Z").timeMax
(optional): Filters events to those starting before this date/time (ISO 8601 format).maxResults
(optional): Limits the number of events returned (default: 10).orderBy
(optional): Specifies the sort order of the results ("startTime" or "updated").Example Use Case:
"Find my next 3 meetings after tomorrow."
createEvent
: Seamless Event CreationCreates new calendar events with detailed specifications.
Parameters:
calendarId
(optional): Specifies the calendar to create the event in. Defaults to the user's primary calendar.event
: An object containing the event details:
summary
(required): The event title.description
(optional): A detailed description of the event.location
(optional): The event location.start
: An object specifying the event start time:
dateTime
(optional): ISO 8601 format (e.g., "2025-03-15T09:00:00+09:00").date
(optional): YYYY-MM-DD format for all-day events.timeZone
(optional): The time zone for the event (e.g., "Asia/Tokyo").end
: An object specifying the event end time (same format as start
).attendees
(optional): An array of attendee objects, each with email
and optional displayName
.colorId
(optional): A numeric ID (1-11) representing the event color.Example Use Case:
"Schedule a meeting with John Smith and Jane Doe next Tuesday at 2 PM to discuss the Q3 report."
updateEvent
: Precise Event ModificationUpdates existing calendar events with granular control. This function intelligently merges updates with existing event data, preserving unspecified fields.
Parameters:
calendarId
(optional): Specifies the calendar containing the event. Defaults to the user's primary calendar.eventId
(required): The ID of the event to update.event
: An object containing the fields to update (all fields are optional). Only specified fields will be modified; unspecified fields will retain their original values.Key Feature: Partial Updates
This function supports partial updates, allowing you to modify specific event attributes without affecting other details.
Example Use Case:
"Change the location of my meeting with John Smith to Conference Room B."
deleteEvent
: Effortless Event RemovalDeletes a calendar event.
Parameters:
calendarId
(optional): Specifies the calendar containing the event. Defaults to the user's primary calendar.eventId
(required): The ID of the event to delete.Example Use Case:
"Cancel my meeting with John Smith tomorrow."
Our development process is guided by the following principles:
src/
: The root directory for all source code.
auth/
: Contains code related to authentication and authorization.config/
: Contains configuration settings and environment variables.mcp/
: Contains the core MCP server implementation.tools/
: Contains the Google Calendar tool implementations.utils/
: Contains utility functions and helper classes.The Google Calendar MCP Server is published on npm as @takumi0706/google-calendar-mcp
.
npx @takumi0706/google-calendar-mcp@latest
# Create a .env file with your Google OAuth credentials GOOGLE_CLIENT_ID=your_client_id GOOGLE_CLIENT_SECRET=your_client_secret GOOGLE_REDIRECT_URI=http://localhost:4153/oauth2callback # Optional: Token encryption key (auto-generated if not provided) TOKEN_ENCRYPTION_KEY=32-byte-hex-key # Optional: Auth server port and host (default port: 4153, host: localhost) AUTH_PORT=4153 AUTH_HOST=localhost # Optional: MCP server port and host (default port: 3000, host: localhost) PORT=3000 HOST=localhost
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:4153/oauth2callback" } } } }
Security is paramount. The Google Calendar MCP Server incorporates multiple layers of security to protect user data:
For more detailed information, please refer to SECURITY.md.
~/.google-calendar-mcp/logs/
) for easy troubleshooting.If you encounter any issues, please follow these steps:
~/.google-calendar-mcp/logs/
for error messages.To contribute to this project:
# Clone the repository git clone https://github.com/takumi0706/google-calendar-mcp.git cd google-calendar-mcp # Install dependencies npm install # Run in development mode npm run dev
To run the tests:
# Run all tests npm test # Run tests with coverage report npm test -- --coverage
This project is licensed under the MIT License.
๐ ๐ ๐ Allows to read notes and tags for the Bear Note taking app, through a direct integration with Bear's sqlitedb.
๐ An MCP server for basic local taskwarrior usage (add, update, remove tasks)
๐ ๐ An MCP server to list and launch applications on MacOS
๐ โ๏ธ A Model Context Protocol (MCP) server that integrates with Notion's API to manage personal todo lists efficiently.