Skip to content

ingram-technologies/mcp-calendar-scheduler

Repository files navigation

MCP Calendar Scheduler

A Model Context Protocol (MCP) server that enables AI agents to schedule meetings using Cal.com's scheduling infrastructure.

Features

  • Natural Language Processing: Understands dates like "Monday 3PM" or "tomorrow at 2:30pm"
  • Availability Checking: Verify if time slots are available before scheduling
  • Meeting Management: Schedule, list, and cancel meetings
  • Email Notifications: Automatic email confirmations to attendees
  • Timezone Support: Handle meetings across different timezones
  • Cal.com Integration: Leverages Cal.com's robust scheduling infrastructure

Installation

cd mcp-calendar-scheduler
npm install
npm run build

Configuration

1. Cal.com Setup

  1. Create a Cal.com account at https://cal.com
  2. Go to Settings → API Keys
  3. Generate a new API key
  4. Find your Event Type ID in the URL when editing an event type

2. Environment Variables

Copy .env.example to .env and fill in your credentials:

CALCOM_API_KEY=your_cal_com_api_key
CALCOM_API_URL=https://api.cal.com
CALCOM_EVENT_TYPE_ID=your_event_type_id
[email protected]

Integration with Fabrile

Adding to Fabrile as a Custom Connector

  1. Build and Deploy the MCP Server:

    npm run build
    npm start  # Test locally first
  2. Deploy to a Public URL (options):

    • Deploy to Vercel/Netlify as a serverless function
    • Use ngrok for testing: ngrok http 3000
    • Deploy to a VPS with PM2
  3. Add to Fabrile:

    • Go to Dashboard → Integrations
    • Click "Add Custom Connector"
    • Enter:
      • Name: "Calendar Scheduler"
      • URL: Your deployed MCP server URL
      • Description: "Schedule meetings with natural language"
  4. Configure the Integration: The MCP server will be initialized with configuration passed from Fabrile:

    {
      "config": {
        "calcom": {
          "apiKey": "user_provided_api_key",
          "apiUrl": "https://api.cal.com",
          "eventTypeId": 123,
          "calendarEmail": "[email protected]"
        }
      }
    }

Adding as Built-in Integration

To add this as a built-in integration in Fabrile:

  1. Update /src/lib/integrations-config.ts:
calendar_scheduler: {
  id: "calendar_scheduler",
  name: "Calendar Scheduler",
  description: "Schedule meetings with natural language using Cal.com",
  logo: "/static/images/logos/integrations/calendar.svg",
  category: "productivity",
  status: "active",
  mcp: {
    serverUrl: "https://your-mcp-server.com/mcp",
    requiresAuth: true,
    authType: "api_key",
  },
}
  1. Create configuration UI in the agent integrations tab to collect:
    • Cal.com API Key
    • Event Type ID
    • Calendar Email

Available Tools

1. check_availability

Check if a time slot is available:

{
  "dateTime": "Monday 3PM",
  "duration": 60,
  "timezone": "America/New_York"
}

2. schedule_meeting

Schedule a new meeting:

{
  "dateTime": "2024-03-15 14:00",
  "duration": 30,
  "attendeeEmail": "[email protected]",
  "attendeeName": "John Doe",
  "title": "Product Demo",
  "description": "Discussion about new features",
  "timezone": "UTC",
  "meetingUrl": "https://zoom.us/j/123456"
}

3. get_scheduled_meetings

List scheduled meetings:

{
  "startDate": "2024-03-01",
  "endDate": "2024-03-31"
}

4. cancel_meeting

Cancel a meeting:

{
  "bookingId": "booking_123",
  "reason": "Rescheduling required"
}

Example Chat Interactions

User: "I am free on Monday 3PM, let's meet then?"

Agent (using MCP):

  1. Calls check_availability with "Monday 3PM"
  2. If available, calls schedule_meeting
  3. Responds: "Perfect! I've scheduled our meeting for Monday at 3 PM. You'll receive a confirmation email shortly."

User: "What meetings do I have next week?"

Agent (using MCP):

  1. Calls get_scheduled_meetings with appropriate date range
  2. Formats and presents the list of meetings

Development

# Install dependencies
npm install

# Run in development mode
npm run dev

# Build for production
npm run build

# Start production server
npm start

Security Considerations

  1. API Key Storage: Store Cal.com API keys securely
  2. Rate Limiting: Implement rate limiting to prevent abuse
  3. Input Validation: All inputs are validated using Zod schemas
  4. Authentication: Use proper authentication when deploying publicly
  5. HTTPS: Always use HTTPS in production

Alternative Calendar Services

While this implementation uses Cal.com, you can adapt it for:

  • Google Calendar: Use Google Calendar API with OAuth2
  • Calendly: Use Calendly API (more limited, but simpler)
  • Microsoft Outlook: Use Microsoft Graph API
  • Custom Solution: Implement your own availability logic

Support

For issues or questions:

License

MIT

About

MCP server for AI-powered calendar scheduling with Cal.com integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published