MCP Calendar Assistant

MCP Calendar Assistant

Enables AI assistants to manage calendars and tasks through natural language, supporting Google Calendar operations like event creation, availability checking, and smart scheduling. It features schedule analysis, task reminders, and meeting time recommendations to streamline productivity.

Category
Visit Server

README

MCP Calendar Assistant

A powerful Model Context Protocol (MCP) server that provides intelligent calendar and task management capabilities. This server allows AI assistants to interact with your calendar through natural language, handling everything from simple event creation to complex scheduling analysis.

🌟 Features

Core Calendar Operations

  • Multi-Calendar Support: Google Calendar (with Outlook/Apple Calendar planned)
  • Event Management: Create, read, update, delete calendar events
  • Smart Scheduling: Find free time slots across multiple calendars
  • Availability Checking: Check if people are available for meetings
  • Meeting Suggestions: AI-powered optimal meeting time recommendations

Task & Reminder Management

  • Smart Reminders: Create and manage tasks with priorities and due dates
  • Natural Language: Process tasks from unstructured text input
  • Analytics: Track completion rates and productivity patterns

Intelligence Features

  • Schedule Analysis: Understand your scheduling patterns and habits
  • Contact Suggestions: Auto-suggest frequent collaborators
  • Similar Events: Find related events for context
  • Working Hours: Respect user preferences and constraints

Performance & Reliability

  • Intelligent Caching: Redis-powered caching with configurable TTLs
  • Batch Operations: Efficient bulk calendar operations
  • Error Handling: Robust error recovery and retry mechanisms
  • Rate Limiting: Built-in protection against API abuse

šŸ—ļø Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│   AI Assistant  │────│  MCP Calendar    │────│  Calendar APIs  │
│   (Claude, etc) │    │     Server       │    │ (Google, etc)   │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                              │
                       ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
                       │  PostgreSQL +    │
                       │     Redis        │
                       ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

šŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL 12+
  • Redis 6+ (optional but recommended)
  • Google Cloud Project with Calendar API enabled

1. Clone and Install

git clone <repository-url>
cd mcp-calendar-server
npm install

2. Environment Setup

cp .env.example .env
# Edit .env with your configuration

3. Google Calendar Setup

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable the Google Calendar API
  4. Create OAuth 2.0 credentials
  5. Add your credentials to .env

4. Database Setup

# Start PostgreSQL and Redis (using Docker)
docker-compose up -d postgres redis

# Or install locally and create database
createdb calendar_assistant

5. Build and Start

npm run build
npm start

# Or for development
npm run dev

šŸ”§ Configuration

Environment Variables

Variable Description Default
DATABASE_URL PostgreSQL connection string postgresql://localhost:5432/calendar_assistant
REDIS_URL Redis connection string redis://localhost:6379
GOOGLE_CLIENT_ID Google OAuth client ID Required
GOOGLE_CLIENT_SECRET Google OAuth client secret Required
JWT_SECRET Secret for JWT tokens Required

Feature Flags

FEATURE_CACHING=true          # Enable Redis caching
FEATURE_BATCHING=true         # Enable batch operations
FEATURE_PREFETCHING=true      # Enable predictive data loading
FEATURE_ANALYTICS=false       # Enable usage analytics
FEATURE_MULTI_PROVIDER=false  # Enable multiple calendar providers

šŸ“‹ Available Tools

Calendar Operations

  • get_calendars - List available calendars
  • get_calendar_events - Retrieve events from a calendar
  • create_calendar_event - Create new events
  • update_calendar_event - Modify existing events
  • delete_calendar_event - Remove events
  • find_free_time - Find available time slots
  • check_availability - Check if people are free
  • suggest_meeting_times - AI-powered meeting suggestions

Task Management

  • create_reminder - Create tasks and reminders
  • get_reminders - Retrieve tasks with filtering
  • update_reminder - Modify existing tasks
  • complete_reminder - Mark tasks as completed

Analytics & Insights

  • analyze_schedule_patterns - Understand scheduling habits
  • get_working_hours - Retrieve work schedule preferences
  • get_recent_similar_events - Find related events
  • get_contact_suggestions - Auto-suggest contacts

šŸ’¬ Usage Examples

Creating Events

// AI Assistant can process:
"Schedule a dentist appointment next Tuesday at 2pm"
"Book a team meeting with John and Sarah for next week, 1 hour duration"
"Create a recurring weekly standup every Monday at 9am"

Finding Free Time

// AI Assistant can process:
"When are we all free next week for a 2-hour workshop?"
"Find time for a 30-minute call with the marketing team"
"What's my availability on Friday afternoon?"

Task Management

// AI Assistant can process:
"Remind me to call mom this weekend"
"Add a high-priority task to review the Q4 budget by Friday"
"Show me all my overdue tasks"

šŸ”Œ MCP Integration

With Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "calendar-assistant": {
      "command": "node",
      "args": ["/path/to/mcp-calendar-server/dist/index.js"],
      "env": {
        "DATABASE_URL": "postgresql://localhost:5432/calendar_assistant",
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

With Custom Applications

import { CalendarMCPServer } from 'mcp-calendar-server';

const server = new CalendarMCPServer();
await server.start();

🐳 Docker Deployment

Using Docker Compose

# Configure environment
cp .env.example .env
# Edit .env with your settings

# Start all services
docker-compose up -d

# Check logs
docker-compose logs -f mcp-calendar-server

Production Deployment

# Build production image
docker build -f docker/Dockerfile -t mcp-calendar-server .

# Run with external database
docker run -d \
  --name calendar-server \
  -p 3000:3000 \
  -e DATABASE_URL="postgresql://user:pass@host:5432/db" \
  -e REDIS_URL="redis://host:6379" \
  -e GOOGLE_CLIENT_ID="your-id" \
  -e GOOGLE_CLIENT_SECRET="your-secret" \
  mcp-calendar-server

šŸ”’ Security

Authentication

  • JWT-based session management
  • OAuth 2.0 with Google Calendar
  • Secure token refresh handling
  • Session cleanup and expiration

Data Protection

  • Environment variable encryption
  • Database connection encryption
  • API rate limiting
  • Input validation and sanitization

Best Practices

  • Non-root container execution
  • Minimal attack surface
  • Regular security updates
  • Audit logging

šŸ“Š Monitoring

Health Checks

# Check server health
curl http://localhost:3000/health

# Check database connectivity
curl http://localhost:3000/health/db

# Check cache connectivity
curl http://localhost:3000/health/cache

Logging

Structured JSON logging with configurable levels:

  • Error tracking and alerting
  • Performance metrics
  • Security event logging
  • Debug information for development

šŸ¤ Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Install dependencies
npm install

# Run tests
npm test

# Run linter
npm run lint

# Format code
npm run format

# Start development server
npm run dev

šŸ—ŗļø Roadmap

Phase 1 (Current)

  • āœ… Google Calendar integration
  • āœ… Basic CRUD operations
  • āœ… Free time finding
  • āœ… Task management
  • āœ… Caching layer

Phase 2 (In Progress)

  • šŸ”„ Outlook Calendar integration
  • šŸ”„ Advanced scheduling algorithms
  • šŸ”„ Natural language time parsing
  • šŸ”„ Webhook support for real-time updates

Phase 3 (Planned)

  • šŸ“… Apple Calendar integration
  • šŸ“… CalDAV support
  • šŸ“… Meeting room booking
  • šŸ“… Travel time integration
  • šŸ“… Smart conflict resolution

Phase 4 (Future)

  • šŸ”® Machine learning insights
  • šŸ”® Predictive scheduling
  • šŸ”® Integration with other productivity tools
  • šŸ”® Mobile app companion

šŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

šŸ™ Acknowledgments

šŸ“ž Support


Made with ā¤ļø for the MCP community

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured