Get the FREE Ultimate OpenClaw Setup Guide →

Google_Calender_MCP

An automation project to integrate Google's Calendar API with MCP (Model Context Protocol) for seamless event management and scheduling. This repository contains scripts and tools to automate calendar updates, event creation, and synchronization across platforms, streamlining your workflow.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio khurramdevops-google_calender_mcp python calendar_mcp.py \
  --env GOOGLE_APPLICATION_CREDENTIALS="Path to credentials.json (in project root)"

How to use

The Google Calendar MCP server provides a programmable interface to manage your Google Calendar events. Through the MCP framework, you can list upcoming events, add new ones with custom details, update existing events by name or ID, and delete events from your calendar. Authentication is handled via Google OAuth, and on first use a browser-based sign-in flow will appear to grant the necessary permissions. The CLI tools enable interactive control of your calendar, simplifying common operations like listing events, adding a meeting, updating times, or removing an event, all through the MCP agent system.

To use it, start the server with the provided Python entry point, then interact with the CLI or agent prompts to perform actions. When you run commands for the first time, you will be guided through OAuth authentication, and a token.json file will be created in your project root to authorize subsequent requests without repeating the sign-in flow.

How to install

Prerequisites:

  • Python 3.8+ (tested with Python 3.x)
  • Virtual environment tool (venv)
  • Access to install Python dependencies from the repository

Installation steps:

  1. Clone the repository or download the project files.
  2. Create and activate a virtual environment: macOS/Linux:
    python3 -m venv .venv
    source .venv/bin/activate
    
    Windows:
    python -m venv .venv
    .venv\Scripts\activate
    
  3. Install dependencies (adjust if a requirements file exists in the project):
    uv sync
    
    (If a requirements file exists, you can alternatively run: pip install -r requirements.txt)
  4. Ensure you have credentials for Google OAuth:
    • Create and download credentials.json as described in the README, and place it in the project root.
  5. Start the MCP server using the provided entry script:
    python calendar_mcp.py
    
  6. In a separate terminal, start the calendar server if needed:
    python calendar_server.py
    

Additional notes

Useful tips:

  • Place credentials.json in the project root and set the GOOGLE_APPLICATION_CREDENTIALS environment variable if your setup requires it.
  • The first-time authentication flow will open a browser for Google sign-in; after that, a token.json file will be created for subsequent access.
  • If you encounter API permission issues, ensure the Google Calendar API is enabled in your Google Cloud project and the OAuth consent screen is configured correctly.
  • If moving the project, keep in mind that token.json and credentials.json should be kept secure and not committed to public repositories.

Related MCP Servers

Sponsor this space

Reach thousands of developers