google calendar mcp
Lets LLMs read and manage Google Calendar events.
Lets LLMs read and manage Google Calendar events.
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.
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:
Add this event to my calendar based on the attached screenshot.
Supported image formats: PNG, JPEG, GIF
Images can contain event details like date, time, location, and description
Calendar analysis:
What events do I have coming up this week that aren't part of my usual routine?
Which events tomorrow have attendees who have not accepted the invitation?Here's some available that was provided to me by someone.
Take a look at the available times and create an event that is free on my work calendar.Please provide availability looking at both my personal and work calendar for this upcoming week.
Choose times that work well for normal working hours on the East Coast. Meeting time is 1 hourhttps://www.googleapis.com/auth/calendar.events (or broader https://www.googleapis.com/auth/calendar if needed)npm run auth.npm installgcp-oauth.keys.json and place it in the root directory of the project.cp gcp-oauth.keys.example.json gcp-oauth.keys.json and populate it with your credentials from the Google Cloud Console.npm run build - Build the TypeScript code (compiles src to build)npm run typecheck - Run TypeScript type checking without compilingnpm run start - Start the compiled server (using node build/index.js)npm run dev - Start the server in development mode using ts-node (watches for changes)npm run auth - Manually start the authentication server for Google OAuth flow (useful if automatic flow fails or for testing)npm test - Run the unit/integration test suite using Vitestnpm run test:watch - Run tests in watch modenpm run coverage - Run tests and generate a coverage reportThe server supports both automatic and manual authentication flows:
gcp-oauth.keys.json.npm start or npm run dev..gcp-saved-tokens.json, the server will automatically:.gcp-saved-tokens.json once authenticatedThe server automatically manages token refresh.
Run npm run auth to start only the authentication server. Authenticate via the browser, and the tokens will be saved.
Unit and integration tests are implemented using Vitest.
npm testnpm run test:watchnpm run coverageTests mock external dependencies (Google API, filesystem) to ensure isolated testing of server logic and handlers.
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.Add this configuration to your Claude Desktop config file. E.g. /Users/<user>/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"google-calendar": {
"command": "node",
"args": ["<absolute-path-to-project-folder>/build/index.js"]
}
}
}
Note: Replace <absolute-path-to-project-folder> with the actual path to your project directory.
Restart Claude Desktop
If your Google Cloud app is in testing mode, tokens expire weekly. Re-authenticate by running npm run auth or restarting the server.
OAuth Token Errors / Authentication Failures
gcp-oauth.keys.json exists in the project root and contains valid Desktop App credentials..gcp-saved-tokens.json and re-authenticating.Verify no other process is using ports 3000-3004 when the auth server needs to start.
Build Errors
npm install again.build/ directory and run npm run build.MIT