Provides tools for managing dental appointments including booking, canceling, rescheduling appointments, checking availability, and retrieving appointments for specific date ranges.
Google Calendar MCP Server
A Model Context Protocol (MCP) server for managing dental appointments through Google Calendar. Built specifically for Railway deployment with clean, production-ready code.
Features
- Appointment Management: Book, cancel, and reschedule dental appointments
- Availability Checking: Check available time slots for specific dates
- Calendar Integration: Full Google Calendar API integration
- MCP Protocol: Compatible with MCP clients and AI assistants
- Railway Ready: Optimized for Railway deployment
Available Tools
- check_availability - Check available appointment slots for a specific date and time range
- book_appointment - Book a new dental appointment
- cancel_appointment - Cancel an existing appointment
- reschedule_appointment - Reschedule an existing appointment
- get_appointments - Get appointments for a specific date range
- find_next_available - Find the next available appointment slot
Setup
Prerequisites
- Google Cloud Console project with Calendar API enabled
- OAuth 2.0 credentials configured
- Python 3.11+ (for local development)
Google Cloud Setup
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable the Google Calendar API
- Go to "Credentials" and create OAuth 2.0 Client ID
- Configure OAuth consent screen
- Download the credentials JSON file
Environment Variables
Copy env.example
to .env
and fill in your credentials:
Required environment variables:
GOOGLE_CLIENT_ID
- Your Google OAuth client IDGOOGLE_CLIENT_SECRET
- Your Google OAuth client secretGOOGLE_ACCESS_TOKEN
- OAuth access token (obtained through OAuth flow)GOOGLE_REFRESH_TOKEN
- OAuth refresh token (obtained through OAuth flow)GOOGLE_CALENDAR_ID
- Calendar ID (use 'primary' for main calendar)PORT
- Server port (default: 8000)
OAuth Token Generation
To get the access and refresh tokens, you'll need to run the OAuth flow. Here's a simple script to help:
Local Development
- Install dependencies:
- Set up environment variables (see above)
- Run the server:
The server will be available at http://localhost:8000
Railway Deployment
- Connect your GitHub repository to Railway
- Set the environment variables in Railway dashboard
- Railway will automatically build and deploy using the Dockerfile
Railway Environment Variables
Set these in your Railway project dashboard:
GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET
GOOGLE_ACCESS_TOKEN
GOOGLE_REFRESH_TOKEN
GOOGLE_CALENDAR_ID
(optional, defaults to 'primary')
API Endpoints
Health Check
GET /health
- Simple health checkGET /status
- Detailed status with service availability
MCP Tools
GET /tools
- List available toolsPOST /tools
- Execute tool calls
Example Tool Call
Project Structure
Error Handling
The server includes comprehensive error handling:
- OAuth credential validation
- Google Calendar API error handling
- Input validation for all tool parameters
- Proper HTTP status codes and error messages
Security Notes
- Never commit OAuth credentials to version control
- Use environment variables for all sensitive data
- The server includes CORS middleware for web integration
- All API endpoints are properly validated
License
This project is open source and available under the 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 management of dental appointments through Google Calendar integration. Supports booking, canceling, rescheduling appointments, checking availability, and finding next available slots through natural language.