Provides tools for sending templated emails through Gmail API with secure OAuth authentication
Integrates with Google Calendar API for scheduling meetings, finding free time slots, creating and canceling events, along with Gmail integration for email confirmations
Utilizes Google Cloud platform services including Calendar API and Gmail API for comprehensive scheduling and email functionality
Google MCP Router
A Google-only MCP (Model Context Protocol) Router for scheduling meetings and sending email confirmations.
Features
5 MCP Tools:
time.resolve
,calendar.find_free_slots
,calendar.create_event
,calendar.cancel_event
,email.send
Policy Enforcement: Working hours, calendar allowlist, overlap prevention
OAuth Integration: Secure Google API authentication with PKCE
Idempotency: Prevents duplicate operations
Observability: Structured logging, Prometheus metrics, OpenTelemetry tracing
Quick Start
Prerequisites
Node.js ≥ 20
Redis (optional, falls back to in-memory store)
Google Cloud project with Calendar API and Gmail API enabled
Installation
Quick Setup (Recommended)
Windows:
Linux/Mac:
Manual Setup
Clone the repository:
Install dependencies:
Set up environment variables:
Build the project:
Start the server:
Environment Configuration
Create a .env
file with the following variables:
Google Cloud Setup
Create a Google Cloud project
Enable Calendar API and Gmail API
Create OAuth 2.0 credentials (Web application)
Set redirect URI to
http://localhost:8080/oauth/google/callback
Configure OAuth scopes:
https://www.googleapis.com/auth/calendar.events
https://www.googleapis.com/auth/gmail.send
API Usage
Authentication
Visit
/oauth/google/login
to start OAuth flowComplete Google authentication
You'll be redirected to
/oauth/google/callback
with tokens stored
Tool Execution
Execute MCP tools via POST requests:
Available Tools
time.resolve
- Parse natural language time expressionscalendar.find_free_slots
- Find available time slotscalendar.create_event
- Create calendar eventscalendar.cancel_event
- Cancel calendar eventsemail.send
- Send templated emails
Development
Running in Development Mode
Running Tests
Linting
Type Checking
Architecture
Security
OAuth 2.0 with PKCE for secure authentication
AES-256-GCM encryption for token storage
Policy enforcement for all operations
Input validation and sanitization
Rate limiting and idempotency
Monitoring
Health Check:
GET /health
Metrics:
GET /metrics
(Prometheus format)Logs: Structured JSON logging with Pino
License
MIT License
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables scheduling meetings and sending email confirmations through Google Calendar and Gmail APIs. Provides secure OAuth authentication, policy enforcement for working hours, and prevents scheduling conflicts.