googlecalendar-mcp
Manage Google Calendar events: list, create, update, delete, and get events.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@googlecalendar-mcplist my events for today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Calendar MCP Server
A Model Context Protocol (MCP) server for managing Google Calendar events.
Features
List, create, update, delete, and get calendar events
OAuth 2.0 and Service Account authentication
Docker support for easy deployment
MCP client integration (Cursor, Claude Desktop)
Related MCP server: Google Calendar MCP Server
Quick Start
# Install dependencies
npm install
# Authenticate with Google
npm run auth
# Build and run
npm run build
npm startFor Docker: See DOCKER.md
Project Structure
googlecalendar-mcp/
├── src/
│ ├── index.ts # Main MCP server
│ └── auth-helper.ts # OAuth authentication helper
├── dist/ # Compiled JavaScript (generated)
├── .env # Environment variables (create from .env.example)
├── package.json # Node.js dependencies
├── tsconfig.json # TypeScript configuration
├── Dockerfile # Docker build configuration
├── docker-compose.yml # Docker Compose setup
├── docker-helper.sh # Docker convenience script
├── README.md # This file
└── DOCKER.md # Docker-specific documentationPrerequisites
Node.js 18+
Google Cloud Project with Calendar API enabled
OAuth 2.0 credentials
Setup
1. Set Up Google Calendar API
1.1 Create or Select a Project
Go to Google Cloud Console
Click on the project dropdown at the top of the page
Either:
Create a new project: Click "New Project", enter a project name (e.g., "Google Calendar MCP"), and click "Create"
Select an existing project: Choose from the list of existing projects
1.2 Enable Google Calendar API
In the Google Cloud Console, navigate to "APIs & Services" > "Library" (or use the search bar)
Search for "Google Calendar API"
Click on "Google Calendar API" from the search results
Click the "Enable" button
Wait for the API to be enabled (this usually takes a few seconds)
You should see a confirmation message: "API enabled"
Alternative Method:
You can also enable it directly via this link (replace
YOUR_PROJECT_IDwith your actual project ID):https://console.cloud.google.com/apis/library/calendar-json.googleapis.com?project=YOUR_PROJECT_ID
Troubleshooting:
If you see an error like "Google Calendar API has not been used in project X before or it is disabled", make sure you've completed the steps above
After enabling, wait a few minutes for the changes to propagate across Google's systems
Verify the API is enabled by checking "APIs & Services" > "Enabled APIs" - you should see "Google Calendar API" listed
1.3 Create OAuth 2.0 Credentials
Navigate to "APIs & Services" > "Credentials" in the Google Cloud Console
If this is your first time, you may need to configure the OAuth consent screen:
Click "Configure Consent Screen"
Choose "External" (unless you have Google Workspace, then choose "Internal")
Fill in the required information:
App name: "Google Calendar MCP" (or any name you prefer)
User support email: Your email address
Developer contact information: Your email address
Click "Save and Continue" through the steps (you can skip optional steps for now)
Go back to "Credentials" and click "Create Credentials" > "OAuth client ID"
If prompted, choose "Desktop app" as the application type
Enter a name for your OAuth client (e.g., "Google Calendar MCP Client")
Click "Create"
Important: Copy the Client ID and Client Secret immediately - you'll need these for your
.envfileClick "OK" to close the dialog
Note: The Client ID and Client Secret are sensitive credentials. Keep them secure and never commit them to version control.
2. Configure Environment Variables
Create a .env file in the root directory:
# Google Calendar API Credentials
GOOGLE_CLIENT_ID=your_client_id_here
GOOGLE_CLIENT_SECRET=your_client_secret_here
GOOGLE_REDIRECT_URI=http://localhost:3000/oauth2callback
# OAuth2 Token (will be generated after first authentication)
GOOGLE_ACCESS_TOKEN=
GOOGLE_REFRESH_TOKEN=
# Optional: Service Account JSON file path (alternative to OAuth)
# GOOGLE_SERVICE_ACCOUNT_PATH=./service-account.json
# Calendar ID (default is 'primary' for the primary calendar)
CALENDAR_ID=primary3. Install Dependencies & Authenticate
npm installThen authenticate:
If using OAuth 2.0, you can use the included authentication helper:
npm run authThis will:
Automatically start a local HTTP server to catch the OAuth redirect
Open your browser with the authorization URL (or show you the URL to copy)
After you authorize, automatically capture the authorization code
Exchange the code for tokens automatically
Update your
.envfile with the tokens
Note: Make sure http://localhost:3000/oauth2callback is added to your OAuth client's authorized redirect URIs in Google Cloud Console.
Alternative: Manual Authentication
You can also use the Google OAuth 2.0 Playground:
Select "Calendar API v3" scopes
Authorize and get your tokens
Add the tokens to your
.envfile
4. Build the Project
npm run buildUsage
Running the Server
npm startOr for development with auto-reload:
npm run devThe server runs on stdio and communicates via the MCP protocol.
Available Tools
list_events
List events from Google Calendar.
Parameters:
timeMin(optional): Lower bound for event end time (ISO 8601 format)timeMax(optional): Upper bound for event start time (ISO 8601 format)maxResults(optional): Maximum number of events (default: 10)calendarId(optional): Calendar ID (default: "primary")
Example:
{
"timeMin": "2024-01-01T00:00:00Z",
"timeMax": "2024-12-31T23:59:59Z",
"maxResults": 20
}create_event
Create a new event in Google Calendar.
Parameters:
summary(required): Title of the eventstartDateTime(required): Start date/time (ISO 8601 format)endDateTime(required): End date/time (ISO 8601 format)description(optional): Event descriptionlocation(optional): Event locationtimeZone(optional): Time zone (default: "UTC")attendees(optional): Array of attendee email addressescalendarId(optional): Calendar ID (default: "primary")
Example:
{
"summary": "Team Meeting",
"description": "Weekly team sync",
"startDateTime": "2024-01-15T10:00:00Z",
"endDateTime": "2024-01-15T11:00:00Z",
"timeZone": "America/New_York",
"location": "Conference Room A",
"attendees": ["colleague@example.com"]
}update_event
Update an existing event.
Parameters:
eventId(required): ID of the event to updateAll other parameters are optional (same as
create_event)
delete_event
Delete an event from the calendar.
Parameters:
eventId(required): ID of the event to deletecalendarId(optional): Calendar ID (default: "primary")
get_event
Get details of a specific event.
Parameters:
eventId(required): ID of the event to retrievecalendarId(optional): Calendar ID (default: "primary")
MCP Client Configuration
Add to your MCP client config (Cursor, Claude Desktop):
{
"mcpServers": {
"google-calendar": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"],
"env": {
"GOOGLE_CLIENT_ID": "your_client_id",
"GOOGLE_CLIENT_SECRET": "your_client_secret",
"GOOGLE_ACCESS_TOKEN": "your_access_token",
"GOOGLE_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}For Docker setup, see DOCKER.md
Troubleshooting
"Google Calendar API has not been used in project X before or it is disabled"
This error means the Google Calendar API is not enabled in your Google Cloud project.
Solution:
Go to Google Cloud Console
Select your project
Navigate to "APIs & Services" > "Library"
Search for "Google Calendar API" and enable it
Wait a few minutes for the changes to propagate
Retry your request
Direct link to enable API:
Replace YOUR_PROJECT_ID with your actual project ID:
https://console.cloud.google.com/apis/library/calendar-json.googleapis.com?project=YOUR_PROJECT_ID"Missing Google OAuth credentials" error
Check that
.envfile exists and has correct valuesVerify
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETare setMake sure there are no extra spaces or quotes around the values
Ensure the
.envfile is in the project root directory
"Invalid credentials" error
Verify your Client ID and Client Secret are correct
Check that Google Calendar API is enabled in your project
Ensure OAuth consent screen is configured
Make sure you're using the correct project credentials
"Token expired" error
Re-run
npm run authto get new tokensOr use Google OAuth 2.0 Playground to refresh tokens
Update your
.envfile with the new tokens
Server won't start
Check Node.js version:
node --version(needs 18+)Rebuild the project:
npm run buildCheck for errors:
npm startVerify all dependencies are installed:
npm install
MCP Server Connection Issues
Verify the path in
mcp.jsonis correct and uses absolute pathsCheck that
dist/index.jsexists (runnpm run buildif missing)Ensure environment variables are properly set in your MCP configuration
Restart your MCP client (Cursor/Claude Desktop) after configuration changes
Alternative: Service Account
For server-to-server authentication:
Create a service account in Google Cloud Console
Download the JSON key file
Share your calendar with the service account email
Set
GOOGLE_SERVICE_ACCOUNT_PATHin.env
Development
npm run dev # Development mode with auto-reloadLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/RupeshEY/googlecalendar-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server