This MCP server acts as a bridge between Claude Desktop and Google Calendar, allowing you to interact with your calendar through natural language. It enables viewing, creating, updating, and deleting calendar events using the Model Context Protocol.
The easiest way to install the Google Calendar MCP server is directly from npm:
npm install -g @takumi0706/google-calendar-mcp
Before using the server, you need to:
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 environment variables:
# Token encryption key (auto-generated if not provided)
TOKEN_ENCRYPTION_KEY=32-byte-hex-key
# Auth server settings (defaults shown)
AUTH_PORT=4153
AUTH_HOST=localhost
# MCP server settings (defaults shown)
PORT=3000
HOST=localhost
# Enable manual authentication (useful when localhost is not accessible)
USE_MANUAL_AUTH=true
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"
}
}
}
}
Once installed and configured, the MCP server provides the following tools:
Use the getEvents
tool to retrieve calendar events:
{
"calendarId": "primary",
"timeMin": "2025-03-01T00:00:00Z",
"timeMax": "2025-03-31T23:59:59Z",
"maxResults": 10,
"orderBy": "startTime"
}
Parameters:
calendarId
(optional): Uses primary calendar if omittedtimeMin
(optional): Start time in ISO 8601 formattimeMax
(optional): End time in ISO 8601 formatmaxResults
(optional): Maximum events to retrieve (default: 10)orderBy
(optional): Sort order - "startTime" or "updated" (default: "startTime")Use the createEvent
tool to add new events:
{
"calendarId": "primary",
"event": {
"summary": "Team Meeting",
"description": "Weekly team sync",
"location": "Conference Room B",
"start": {
"dateTime": "2025-03-15T09:00:00+09:00",
"timeZone": "Asia/Tokyo"
},
"end": {
"dateTime": "2025-03-15T10:00:00+09:00",
"timeZone": "Asia/Tokyo"
},
"attendees": [
{"email": "[email protected]", "displayName": "Colleague Name"}
],
"colorId": "7",
"recurrence": ["RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR"]
}
}
Parameters:
calendarId
(optional): Uses primary calendar if omittedevent
: Event details object containing:
summary
(required): Event titledescription
(optional): Event descriptionlocation
(optional): Event locationstart
: Start time with dateTime
(ISO 8601) or date
(YYYY-MM-DD for all-day events)end
: End time (same format as start)attendees
(optional): Array of attendees with email and optional displayNamecolorId
(optional): Event color ID (1-11)recurrence
(optional): Array of recurrence rules in RFC5545 formatUse the updateEvent
tool to modify existing events:
{
"calendarId": "primary",
"eventId": "event123abc",
"event": {
"summary": "Updated Meeting Title",
"description": "New description",
"location": "New location"
}
}
Parameters:
calendarId
(optional): Uses primary calendar if omittedeventId
(required): ID of the event to updateevent
: Object with fields to update (only specified fields will be changed)Use the deleteEvent
tool to remove events:
{
"calendarId": "primary",
"eventId": "event123abc"
}
Parameters:
calendarId
(optional): Uses primary calendar if omittedeventId
(required): ID of the event to deleteIf you need to switch Google accounts without restarting Claude, use the authenticate
tool:
{}
This tool takes no parameters and initiates a new authentication flow.
USE_MANUAL_AUTH=true
If you're using the server in an environment where localhost is not accessible (like a remote server):
USE_MANUAL_AUTH=true
in your environment variablesTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "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"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"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"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"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"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect