google-calendar-mcp
README.md
# Google Meet Scheduler Agent (FastMCP + LangGraph + LangChain)
An AI scheduling assistant built with **LangGraph**, **LangChain**, and a custom **FastMCP Server** to manage Google Calendar events and generate **Google Meet** video conferencing links.
---
## š Key Features
1. **Custom FastMCP Server (`mcp_server.py`)**:
- `list_upcoming_events`: Browse calendar schedule.
- `check_availability`: Query Google Calendar `freebusy` for user & attendees.
- `create_meeting`: Create calendar events with auto-generated Google Meet (`hangoutsMeet`) links (`conferenceDataVersion=1`).
- `update_meeting`: Reschedule or update event details.
- `delete_meeting`: Cancel events and auto-notify participants.
- `get_meeting_details`: Inspect meeting details, RSVP statuses, and Meet URLs.
2. **LangGraph Agent (`agent.py`)**:
- Contextual date/time parsing (converts relative times like "tomorrow 3 PM" to exact ISO-8601 strings in user timezone).
- Multi-turn conversation state checkpointing via `MemorySaver`.
- Tool calling integration using LangChain.
---
## š Project Structure
```
google-meet-scheduler/
āāā auth.py # Google OAuth 2.0 & Calendar API v3 service helper
āāā mcp_server.py # FastMCP Server registering Google Meet/Calendar tools
āāā agent_state.py # LangGraph state schema (SchedulerState)
āāā agent.py # LangGraph state graph, system prompt, and tools node
āāā main.py # Interactive CLI Chat interface
āāā .env.example # Template for environment variables
āāā requirements.txt # Python dependencies
āāā README.md # Documentation & setup guide
```
---
## š Quick Start Guide
### 1. Install Dependencies
```bash
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
pip install -r requirements.txt
```
### 2. Set Up Google Cloud Credentials
1. Go to [Google Cloud Console](https://console.cloud.google.com/).
2. Create a new project (e.g. `Google Meet MCP`).
3. Enable **Google Calendar API**.
4. Go to **APIs & Services > Credentials** -> Create Credentials -> **OAuth client ID**.
5. Select Application type: **Desktop app**.
6. Download the JSON file, rename it to `credentials.json`, and place it in the project root directory.
### 3. Configure Environment Variables
Copy `.env.example` to `.env`:
```bash
cp .env.example .env
```
Fill in your API keys in `.env`:
```env
DEFAULT_TIMEZONE=Asia/Kolkata
GEMINI_API_KEY=your_gemini_api_key
# or
OPENAI_API_KEY=your_openai_api_key
```
### 4. Run the Agent
```bash
python main.py
```
*Note: On your first run, a browser window will open asking you to log into your Google account and authorize Calendar access. Once approved, a `token.json` file will be created for seamless subsequent authentication.*
---
## š ļø Testing the FastMCP Server Standalone
You can inspect or test the FastMCP tools using the FastMCP CLI:
```bash
fastmcp dev mcp_server.py
```
---
## š¬ Example Prompt Interactions
- *"List my upcoming meetings for the week."*
- *"Check if I am free tomorrow between 2 PM and 5 PM."*
- *"Schedule a Google Meet with john@example.com tomorrow at 4 PM for 45 minutes titled 'Q3 Sprint Planning'."*
- *"Reschedule meeting ID `abc123xyz` to Friday 11 AM."*
- *"Cancel meeting `abc123xyz`."*
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues