Google Calendar MCP server

Integrates with Google Calendar to enable direct calendar management, event operations, and advanced scheduling features like free/busy queries and mutual availability coordination.
Back to servers
Provider
Deciduus
Release date
May 08, 2025
Language
Go
Stats
6 stars

The Google Calendar MCP Server allows Large Language Models (LLMs) to interact with Google Calendar through natural language requests. This server implements the Model Context Protocol (MCP) to enable calendar operations like viewing, creating, and managing events without requiring direct API access.

Installation

Prerequisites

  • Python 3.8 or higher
  • Git
  • Access to a Google Cloud Platform project

Setting Up Google Cloud

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google Calendar API for your project
  4. Navigate to "APIs & Services" > "Credentials"
  5. Click "+ CREATE CREDENTIALS" > "OAuth client ID"
  6. Select Application type: Desktop app and give it a name
  7. Copy the provided Client ID and Client Secret
  8. Configure the OAuth consent screen:
    • Set User Type to "External"
    • Fill in required app info
    • Add the .../auth/calendar scope
    • Add your Google Account email as a test user
  9. Go back to "Credentials" and add http://localhost:8080/oauth2callback as an authorized redirect URI

Installing the Server

  1. Clone the repository and navigate to the directory:

    git clone <repository-url>
    cd <repository-directory>
    
  2. Create a .env file by copying the example:

    cp env.example .env
    
  3. Edit the .env file with your Google credentials:

    GOOGLE_CLIENT_ID='YOUR_GOOGLE_CLIENT_ID_HERE'
    GOOGLE_CLIENT_SECRET='YOUR_GOOGLE_CLIENT_SECRET_HERE'
    TOKEN_FILE_PATH='.gcp-saved-tokens.json'
    OAUTH_CALLBACK_PORT=8080
    CALENDAR_SCOPES='https://www.googleapis.com/auth/calendar'
    
  4. Install the required dependencies:

    pip install -r requirements.txt
    

Initial Authentication

You need to run the server manually once to complete the OAuth authentication flow:

python run_server.py

The script will:

  • Check for saved tokens
  • Open your browser to the authorization URL
  • Guide you through Google Account login
  • Save the tokens to the file specified in .env
  • Start the FastAPI server

After successful authentication, you can stop the server with Ctrl+C.

Using the MCP Server

Configuring an MCP Client

To use this server with an MCP client (like Cursor or Claude Desktop), add it to your client's configuration:

{
  "tools": {
    "google_calendar": {
      "command": "python",
      "args": [
        "/absolute/path/to/your/calendar-mcp/run_server.py"
      ]
    }
  }
}

Be sure to replace the placeholder path with the actual absolute path to the script on your system.

Available Calendar Actions

The server supports the following operations:

  • List calendars - View all available calendars
  • Create calendars - Make new calendars
  • Find events - Search for events with various filters
  • Create events - Add new events to your calendar
  • Quick-add events - Quickly create events from text
  • Update events - Modify existing events
  • Delete events - Remove events from your calendar
  • Add attendees - Invite people to events
  • Check attendee status - View response status of invitees
  • Query free/busy - Check availability across multiple calendars
  • Schedule mutual meetings - Find and book mutual free slots
  • Analyze calendar busyness - Get stats on event counts and durations

Making API Calls

The MCP client will handle the communication with the server. In your conversations with the LLM, you can naturally request calendar operations. The LLM will use the appropriate MCP function calls to fulfill your requests.

For example, you might say:

  • "Show me my calendar events for tomorrow"
  • "Schedule a meeting with Alice on Friday at 2pm"
  • "Create a new calendar called 'Project X'"

The LLM will translate these into the appropriate MCP function calls to interact with your Google Calendar.

How to add this MCP server to 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 > 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"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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