Google Calendar MCP server

Enables natural language management of Google Calendar events with OAuth2 authentication, supporting creation, updates, deletion, and search capabilities with automatic browser launch for authentication.
Back to servers
Setup instructions
Provider
nchufa
Release date
Mar 18, 2025
Language
TypeScript
Stats
1 star

This MCP server enables AI assistants to manage Google Calendar through natural language interactions, providing a seamless way to create, update, and manage calendar events directly from Claude Desktop.

Installation

Installing via Smithery

To install automatically using Smithery:

npx -y @smithery/cli install @falgom4/calendar-mcp --client claude

Installing Manually

Step 1: Create Google Cloud Project and Obtain Credentials

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google Calendar API for your project
  4. Create OAuth 2.0 Credentials:
    • Navigate to "APIs & Services" > "Credentials"
    • Click "Create Credentials" > "OAuth client ID"
    • Choose either "Desktop app" or "Web application" as application type
    • Provide a name and click "Create"
    • For Web application, add http://localhost:3000/oauth2callback to the authorized redirect URIs
    • Download the JSON file of your OAuth keys
    • Rename the file to gcp-oauth.keys.json

Step 2: Authentication

You can authenticate in two ways:

Global Authentication (Recommended):

# First time: Place gcp-oauth.keys.json in your home directory's .calendar-mcp folder
mkdir -p ~/.calendar-mcp
mv gcp-oauth.keys.json ~/.calendar-mcp/

# Run authentication from anywhere
npx @nchufa/calendar auth

Local Authentication:

# Place gcp-oauth.keys.json in your current directory
# The file will be automatically copied to global config
npx @nchufa/calendar auth

The authentication process will:

  • Look for gcp-oauth.keys.json in the current directory or ~/.calendar-mcp/
  • Copy it to ~/.calendar-mcp/ if found in the current directory
  • Open your default browser for Google authentication
  • Save credentials as ~/.calendar-mcp/credentials.json

Step 3: Configure in Claude Desktop

Add the following to your Claude Desktop configuration file:

{
  "mcpServers": {
    "calendar": {
      "command": "npx",
      "args": [
        "@nchufa/calendar"
      ]
    }
  }
}

Usage

The server provides several tools for managing Google Calendar:

Creating Events

Create a new calendar event with details:

{
  "summary": "Team Meeting",
  "description": "Weekly team sync to discuss project progress",
  "location": "Conference Room A",
  "start": "2025-04-01T14:00:00",
  "end": "2025-04-01T15:00:00",
  "attendees": ["[email protected]", "[email protected]"],
  "reminders": {
    "useDefault": false,
    "overrides": [
      {
        "method": "email",
        "minutes": 30
      },
      {
        "method": "popup",
        "minutes": 10
      }
    ]
  }
}

You can also use natural language for dates:

{
  "summary": "Coffee with John",
  "location": "Starbucks Downtown",
  "start": "tomorrow at 2:30pm",
  "end": "tomorrow at 3:30pm"
}

Getting Event Details

Retrieve details of a specific event:

{
  "eventId": "abc123xyz456",
  "calendarId": "primary"
}

Updating Events

Update an existing event:

{
  "eventId": "abc123xyz456",
  "summary": "Updated Meeting Title",
  "location": "New Location",
  "start": "2025-04-01T15:00:00",
  "end": "2025-04-01T16:00:00"
}

Deleting Events

Delete a calendar event:

{
  "eventId": "abc123xyz456",
  "calendarId": "primary"
}

Listing Events

List events within a date range:

{
  "calendarId": "primary",
  "timeMin": "2025-04-01T00:00:00",
  "timeMax": "2025-04-07T23:59:59",
  "maxResults": 10,
  "orderBy": "startTime"
}

Searching Events

Search for events matching a keyword:

{
  "query": "meeting",
  "calendarId": "primary",
  "timeMin": "2025-04-01T00:00:00",
  "maxResults": 5
}

Listing Calendars

List all available calendars:

{}

Natural Language Date/Time Support

The server supports various formats for dates and times:

  • Standard ISO format: "2025-04-01T14:00:00"
  • Simple references: "today", "tomorrow", "now"
  • Relative times: "2 hours later", "3 days later"
  • Day references: "next monday", "next tuesday"
  • Combined formats: "tomorrow at 2pm", "monday at 15:30"

Troubleshooting

OAuth Keys Not Found

  • Verify gcp-oauth.keys.json is in your current directory or ~/.calendar-mcp/
  • Check file permissions

Invalid Credentials Format

  • Ensure your OAuth keys file contains either web or installed credentials
  • For web applications, verify the redirect URI is correctly configured

Port Already in Use

  • Free up port 3000 before running authentication
  • Find and stop any process using that port

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "calendar" '{"command":"npx","args":["@nchufa/calendar"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

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.

Adding an MCP server to Cursor globally

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": {
        "calendar": {
            "command": "npx",
            "args": [
                "@nchufa/calendar"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "calendar": {
            "command": "npx",
            "args": [
                "@nchufa/calendar"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later