A Model Context Protocol (MCP) server that enables AI agents to schedule meetings using Cal.com's scheduling infrastructure.
- 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
cd mcp-calendar-scheduler
npm install
npm run build- Create a Cal.com account at https://cal.com
- Go to Settings → API Keys
- Generate a new API key
- Find your Event Type ID in the URL when editing an event type
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]-
Build and Deploy the MCP Server:
npm run build npm start # Test locally first -
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
-
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"
-
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]" } } }
To add this as a built-in integration in Fabrile:
- 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",
},
}- Create configuration UI in the agent integrations tab to collect:
- Cal.com API Key
- Event Type ID
- Calendar Email
Check if a time slot is available:
{
"dateTime": "Monday 3PM",
"duration": 60,
"timezone": "America/New_York"
}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"
}List scheduled meetings:
{
"startDate": "2024-03-01",
"endDate": "2024-03-31"
}Cancel a meeting:
{
"bookingId": "booking_123",
"reason": "Rescheduling required"
}User: "I am free on Monday 3PM, let's meet then?"
Agent (using MCP):
- Calls
check_availabilitywith "Monday 3PM" - If available, calls
schedule_meeting - 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):
- Calls
get_scheduled_meetingswith appropriate date range - Formats and presents the list of meetings
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Start production server
npm start- API Key Storage: Store Cal.com API keys securely
- Rate Limiting: Implement rate limiting to prevent abuse
- Input Validation: All inputs are validated using Zod schemas
- Authentication: Use proper authentication when deploying publicly
- HTTPS: Always use HTTPS in production
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
For issues or questions:
- Cal.com Documentation: https://cal.com/docs
- MCP Documentation: https://modelcontextprotocol.io
- Create an issue in this repository
MIT