home / mcp / google calendar mcp server

Google Calendar MCP Server

py-mcp-gcalendar

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "amornpan-py-mcp-gcalendar": {
      "command": "YOUR_PYTHON_PATH",
      "args": [
        "YOUR_PATH/GCalendar/src/mcp_server.py"
      ]
    }
  }
}

This MCP server provides programmatic access to Google Calendar via the Google Calendar API with asynchronous operations, enabling efficient calendar management through a standardized interface that teams and AI tools can integrate with securely.

How to use

You will interact with this MCP server through an MCP client to perform common calendar operations. The server supports listing events, creating new events, removing duplicates, and deleting specific events. All actions use OAuth 2.0 authentication with automatic token renewal, so you can focus on scheduling rather than authentication housekeeping.

To use the server, start it from your environment and connect your MCP client to the local/remote endpoint as configured. For automated workflows, integrate your client so that it can trigger the following available tools: list, create-event, delete-duplicates, and delete-event. Ensure your client handles asynchronous responses and error conditions gracefully.

How to install

Prerequisites you need before installing this MCP server are:

  • Python 3.9 or higher
  • Internet access
  • A Google Cloud Console project with Google Calendar API enabled

Step-by-step installation flow

1. Clone the project
git clone https://github.com/yourusername/GCalendar.git
cd GCalendar

2. Create a virtual environment
python -m venv gcalendar_venv

# For Windows
gcalendar_venv\Scripts\activate

# For macOS/Linux
source gcalendar_venv/bin/activate

3. Install dependencies
pip install -r requirements.txt

4. Prepare necessary folders
mkdir -p credentials logs

Additional sections

Configuration and credentials are required to access Google Calendar. You will create a Google Cloud project, enable the Calendar API, and generate OAuth 2.0 credentials. Place the downloaded credentials.json into the credentials/ folder. Then run the token creation utility to generate token.json used for authentication.

Starting the MCP server requires pointing to the Python interpreter from your virtual environment and the main server script. The configuration block shows how to register the server with the MCP client application. Here is the exact server entry you should add to your MCP client configuration file to expose the Google Calendar MCP server locally.

{
  "mcpServers": {
    "gcalendar": {
      "command": "YOUR_PYTHON_PATH",
      "args": [
        "YOUR_PATH/GCalendar/src/mcp_server.py"
      ]
    }
  }
}

Project structure highlights the essential files and folders you will work with, including credentials/, logs/, and src/ with scripts to manage calendars and tokens.

Usage notes and troubleshooting tips include ensuring the credentials/ token.json files exist, renewing tokens if needed, and checking the calendar_timezone if you encounter time zone discrepancies. Logs are written to logs/calendar_service.log for debugging.

Available tools

list

Fetch events from the calendar across a wide date range (back two years to one year ahead) demonstrating pagination and batching.

create-event

Create a new calendar event with specified title, start time, end time, and metadata.

delete-duplicates

Identify and remove duplicate events to keep the calendar clean.

delete-event

Delete a specific event by identifier or matching criteria.