This server integrates Google Calendar with Claude Desktop through the Model Context Protocol (MCP), enabling you to manage calendar events using natural language commands.
.env
file: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 configuration (defaults shown)
AUTH_PORT=4153
AUTH_HOST=localhost
# MCP server configuration (defaults shown)
PORT=3000
HOST=localhost
# Enable manual authentication (useful when localhost is not accessible)
USE_MANUAL_AUTH=true
Run the server directly using npx:
npx @takumi0706/[email protected]
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"
}
}
}
}
Retrieves calendar events with filtering options:
{
"calendarId": "primary",
"timeMin": "2025-03-01T00:00:00Z",
"timeMax": "2025-03-31T23:59:59Z",
"maxResults": 10,
"orderBy": "startTime"
}
Creates a new calendar event:
{
"calendarId": "primary",
"event": {
"summary": "Team Meeting",
"description": "Weekly team sync",
"location": "Conference Room A",
"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": "John Doe"}
],
"colorId": "7",
"recurrence": ["RRULE:FREQ=WEEKLY;BYDAY=MO"]
}
}
For all-day events, use the date
format instead:
{
"calendarId": "primary",
"event": {
"summary": "Company Holiday",
"start": {
"date": "2025-03-15"
},
"end": {
"date": "2025-03-16"
}
}
}
Updates an existing calendar event (partial updates supported):
{
"calendarId": "primary",
"eventId": "abc123xyz",
"event": {
"summary": "Updated Meeting Title",
"location": "Virtual Meeting Room",
"recurrence": ["RRULE:FREQ=WEEKLY;BYDAY=TU,TH"]
}
}
Deletes a calendar event:
{
"calendarId": "primary",
"eventId": "abc123xyz"
}
Re-authenticates with Google Calendar (useful for switching accounts):
{}
When creating or updating events, you can set colors using the colorId
parameter:
Create recurring events using the recurrence
parameter with RFC5545 RRULE format:
"recurrence": ["RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR"]
Common recurrence patterns:
RRULE:FREQ=DAILY
RRULE:FREQ=WEEKLY;BYDAY=MO
RRULE:FREQ=MONTHLY;BYMONTHDAY=15
RRULE:FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=1
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR
USE_MANUAL_AUTH=true
if running in an environment where localhost is not accessibleThere 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 > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.