Labsco
sohamkapileshwar2 logo

Google Calendar

β˜… 2

from sohamkapileshwar2

Interact with Google Calendar APIs to manage events and calendars.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

πŸ—“οΈ Google Calendar MCP Server

This project integrates the Google Calendar v3 APIs with a custom MCP (Model Context Protocol) Server, enabling natural language interaction with your calendar via tools like Claude Desktop.

It acts as a bridge between your calendar data and an LLM using MCP-compatible HTTP streaming.


🧠 Overview

This project contains two core servers:

1. πŸ” Google OAuth Server

  • Handles OAuth 2.0 flow
  • Stores and refreshes access tokens in a local session file

2. πŸ€– MCP Server


🧠 Demo

https://github.com/user-attachments/assets/27a8e5ee-8f2f-40c7-bdfc-1caa93767efb

🧱 Project Structure

project-root/
β”œβ”€β”€ client_secret.json         # Google OAuth credentials
β”œβ”€β”€ session.json               # Access/refresh token storage
β”œβ”€β”€ pyproject.toml             # Poetry project config
β”œβ”€β”€ README.md                  

└── src/
    β”œβ”€β”€ main.py                # FastAPI app for OAuth server
    β”œβ”€β”€ server.py              # MCP-compatible server
    β”œβ”€β”€ settings.py            # App settings and constants

    β”œβ”€β”€ api/
    β”‚   └── oauth_callback.py  # OAuth endpoint logic

    β”œβ”€β”€ core/
    β”‚   β”œβ”€β”€ calendar_client.py # Google Calendar API wrapper
    β”‚   β”œβ”€β”€ mcp_tools.py       # Tools exposed to MCP clients
    β”‚   β”œβ”€β”€ oauth_manager.py   # OAuth initiation and flow
    β”‚   └── session_manager.py # Token handling

    └── gcalendar_types/       # Typed definitions for Calendar v3 API

🧩 Dependencies