Integrates with Google Calendar to enable natural language querying, event creation, and calendar management using the G...
Created byApr 22, 2025
Google Calendar MCP Server
This is a Model Context Protocol (MCP) server that provides integration with Google Calendar. It allows LLMs to read, create, update and search for calendar events through a standardized interface.
Example Usage
Along with the normal capabilities you would expect for a calendar integration you can also do really dynamic, multi-step processes like:
Add events from screenshots and images:Supported image formats: PNG, JPEG, GIF
Images can contain event details like date, time, location, and description
Calendar analysis:
Check attendance:
Auto coordinate events:
Provide your own availability:
Requirements
Node.js (Latest LTS recommended)
TypeScript 5.3 or higher
A Google Cloud project with the Calendar API enabled
OAuth 2.0 credentials (Client ID and Client Secret)
Enable the Google Calendar API for your project. Ensure that the right project is selected from the top bar before enabling the API.
Create OAuth 2.0 credentials:
Installation
Clone the repository
Install dependencies (this also builds the js via postinstall):
Download your Google OAuth credentials from the Google Cloud Console (under "Credentials") and rename the file to gcp-oauth.keys.json and place it in the root directory of the project.
Available Scripts
npm run build - Build the TypeScript code (compiles src to build)
npm run typecheck - Run TypeScript type checking without compiling
npm run start - Start the compiled MCP server (using node build/index.js)
npm run auth - Manually run the Google OAuth authentication flow.
npm test - Run the unit/integration test suite using Vitest
npm run test:watch - Run tests in watch mode
npm run coverage - Run tests and generate a coverage report
Authentication
The server handles Google OAuth 2.0 authentication to access your calendar data.
Automatic Authentication Flow (During Server Start)
Ensure gcp-oauth.keys.json is correctly named and placed in the project root.
Start the MCP server: npm start.
The server will check for existing, valid authentication tokens in .gcp-saved-tokens.json.
If valid tokens are found, the server starts normally.
If no valid tokens are found:
Manual Authentication Flow
If you need to re-authenticate or prefer to handle authentication separately:
Run the command: npm run auth
This script performs the same browser-based authentication flow described above.
Your browser will open, you authorize, and you'll see the success page indicating where tokens were saved.
The script will exit automatically upon successful authentication.
Token Management
Authentication tokens are stored in .gcp-saved-tokens.json in the project root.
This file is created automatically and should not be committed to version control (it's included in .gitignore).
The server attempts to automatically refresh expired access tokens using the stored refresh token.
If the refresh token itself expires (e.g., after 7 days if the Google Cloud app is in testing mode) or is revoked, you will need to re-authenticate using either the automatic flow (by restarting the server) or the manual npm run auth command.
Testing
Unit and integration tests are implemented using Vitest.
Run tests: npm test
Run tests in watch mode: npm run test:watch
Generate coverage report: npm run coverage
Tests mock external dependencies (Google API, filesystem) to ensure isolated testing of server logic and handlers.
Security Notes
The server runs locally and requires OAuth authentication.
OAuth credentials (gcp-oauth.keys.json) and saved tokens (.gcp-saved-tokens.json) should never be committed to version control. Ensure they are added to your .gitignore file.
For production use, consider getting your OAuth application verified by Google.
Usage with Claude Desktop
Add this configuration to your Claude Desktop config file. E.g. /Users/<user>/Library/Application Support/Claude/claude_desktop_config.json:Note: Replace <absolute-path-to-project-folder> with the actual path to your project directory.
Restart Claude Desktop
Development
Troubleshooting
Authentication Errors / Connection Reset on Callback:
Tokens Expire Weekly:
Build Errors:
License
MIT
Google Calendar MCP Server
This is a Model Context Protocol (MCP) server that provides integration with Google Calendar. It allows LLMs to read, create, update and search for calendar events through a standardized interface.
Example Usage
Along with the normal capabilities you would expect for a calendar integration you can also do really dynamic, multi-step processes like:
Add events from screenshots and images:Supported image formats: PNG, JPEG, GIF
Images can contain event details like date, time, location, and description
Calendar analysis:
Check attendance:
Auto coordinate events:
Provide your own availability:
Requirements
Node.js (Latest LTS recommended)
TypeScript 5.3 or higher
A Google Cloud project with the Calendar API enabled
OAuth 2.0 credentials (Client ID and Client Secret)
Enable the Google Calendar API for your project. Ensure that the right project is selected from the top bar before enabling the API.
Create OAuth 2.0 credentials:
Installation
Clone the repository
Install dependencies (this also builds the js via postinstall):
Download your Google OAuth credentials from the Google Cloud Console (under "Credentials") and rename the file to gcp-oauth.keys.json and place it in the root directory of the project.
Available Scripts
npm run build - Build the TypeScript code (compiles src to build)
npm run typecheck - Run TypeScript type checking without compiling
npm run start - Start the compiled MCP server (using node build/index.js)
npm run auth - Manually run the Google OAuth authentication flow.
npm test - Run the unit/integration test suite using Vitest
npm run test:watch - Run tests in watch mode
npm run coverage - Run tests and generate a coverage report
Authentication
The server handles Google OAuth 2.0 authentication to access your calendar data.
Automatic Authentication Flow (During Server Start)
Ensure gcp-oauth.keys.json is correctly named and placed in the project root.
Start the MCP server: npm start.
The server will check for existing, valid authentication tokens in .gcp-saved-tokens.json.
If valid tokens are found, the server starts normally.
If no valid tokens are found:
Manual Authentication Flow
If you need to re-authenticate or prefer to handle authentication separately:
Run the command: npm run auth
This script performs the same browser-based authentication flow described above.
Your browser will open, you authorize, and you'll see the success page indicating where tokens were saved.
The script will exit automatically upon successful authentication.
Token Management
Authentication tokens are stored in .gcp-saved-tokens.json in the project root.
This file is created automatically and should not be committed to version control (it's included in .gitignore).
The server attempts to automatically refresh expired access tokens using the stored refresh token.
If the refresh token itself expires (e.g., after 7 days if the Google Cloud app is in testing mode) or is revoked, you will need to re-authenticate using either the automatic flow (by restarting the server) or the manual npm run auth command.
Testing
Unit and integration tests are implemented using Vitest.
Run tests: npm test
Run tests in watch mode: npm run test:watch
Generate coverage report: npm run coverage
Tests mock external dependencies (Google API, filesystem) to ensure isolated testing of server logic and handlers.
Security Notes
The server runs locally and requires OAuth authentication.
OAuth credentials (gcp-oauth.keys.json) and saved tokens (.gcp-saved-tokens.json) should never be committed to version control. Ensure they are added to your .gitignore file.
For production use, consider getting your OAuth application verified by Google.
Usage with Claude Desktop
Add this configuration to your Claude Desktop config file. E.g. /Users/<user>/Library/Application Support/Claude/claude_desktop_config.json:Note: Replace <absolute-path-to-project-folder> with the actual path to your project directory.
Restart Claude Desktop
Development
Troubleshooting
Authentication Errors / Connection Reset on Callback: