Skip to main content
Glama
sohamkapileshwar2

Google Calendar MCP Server

πŸ—“οΈ 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


πŸš€ Getting Started

Step 1: πŸ”§ Set Up Google API Credentials

  1. Go to the Google Cloud Console

  2. Create or select a project

  3. Enable the Google Calendar API

  4. Go to Credentials β†’ Create OAuth 2.0 Client ID

    • Choose Desktop App

    • Set branding and add test user emails in audience

  5. Download the OAuth credentials as client_secret.json

  6. Place this file in the root directory of the project


Step 2: πŸ“¦ Install Dependencies

poetry install

Step 3: πŸšͺ Start the OAuth Server

poetry run uvicorn src.main:app --host 0.0.0.0 --port 8000
  • This should automatically open a browser for OAuth authentication.

  • If not, visit http://0.0.0.0:8000/google_oauth/

  • Upon successful authentication, you'll see a success page.

  • A session.json file will be created with your access/refresh tokens.

OAuth Success Page


Step 4: 🧩 Run the MCP Server

poetry run python src/server.py

This launches a streamable MCP-compatible HTTP server at http://localhost:8080/mcp


Step 5: 🧠 Connect MCP Client (Claude Desktop)

Update the config file at:

~/Library/Application Support/Claude/claude_desktop_config.json

Add the following entry:

{
  "mcpServers": {
    "google-calendar-mcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8080/mcp"
      ]
    }
  }
}

Step 6: βœ… Verify Integration

  • Open Claude Desktop settings.

  • If the MCP server was added correctly, it will appear under Settings -> integrations

MCP client integrations

🧠 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


-
security - not tested
F
license - not found
-
quality - not tested

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sohamkapileshwar2/google-calendar-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server