Unified calendar management across Google, Microsoft 365, and Exchange.
Calendar MCP Server
A Model Context Protocol (MCP) server providing unified calendar management across Google Calendar, Microsoft 365, and Exchange On-Premises.
Features
- Multi-Provider Support: Connect to Google Calendar, Microsoft 365 (Graph API), and Exchange On-Premises (EWS)
- Multiple Accounts: Support for multiple accounts per provider (e.g., 2+ Exchange accounts)
- 12 MCP Tools: Comprehensive calendar operations including CRUD, free/busy, conflict detection, and sync helpers
- 4 MCP Resources: Quick access to calendar summaries, today's events, weekly schedule, and upcoming events
- 4 MCP Prompts: Pre-built templates for scheduling meetings and daily briefings
- NTLM Authentication: Full support for Exchange NTLM authentication via
@ewsjs/xhr - Unified Data Model: Consistent event format across all providers
- Timezone Support: Configurable timezone for all operations
Quick Start
# 1. Clone/navigate to the project
cd calendar-mcp
# 2. Install dependencies
npm install
# 3. Build the project
npm run build
# 4. Configure environment variables (see Configuration section)
cp .env.example .env
# Edit .env with your credentials
# 5. Test the server
node dist/index.js
Installation
Prerequisites
- Node.js 18+
- npm or yarn
- Access to at least one calendar provider (Google, Microsoft 365, or Exchange)
Install Dependencies
npm install
Build
npm run build
This compiles TypeScript to JavaScript in the dist/ directory.
Configuration
The server uses environment variables for configuration. Create a .env file in the project root or pass environment variables directly.
Environment Variables
Server Settings
| Variable | Description | Default |
|---|---|---|
MCP_SERVER_NAME |
Server name for identification | calendar-mcp |
MCP_SERVER_VERSION |
Server version | 1.0.0 |
LOG_LEVEL |
Logging level: debug, info, warn, error |
info |
DEFAULT_TIMEZONE |
IANA timezone for all operations | UTC |
DEFAULT_WORKING_HOURS_START |
Working hours start (HH:MM) | 09:00 |
DEFAULT_WORKING_HOURS_END |
Working hours end (HH:MM) | 18:00 |
DEFAULT_WORKING_DAYS |
Working days (comma-separated) | monday,tuesday,wednesday,thursday,friday |
Request Settings
| Variable | Description | Default |
|---|---|---|
REQUEST_TIMEOUT |
Request timeout in milliseconds | 30000 |
MAX_RETRIES |
Maximum retry attempts | 3 |
RETRY_DELAY_MS |
Delay between retries | 1000 |
RATE_LIMIT_REQUESTS_PER_MINUTE |
Rate limiting | 60 |
Google Calendar Setup
| Variable | Description | Required |
|---|---|---|
GOOGLE_ENABLED |
Enable Google Calendar | Yes |
GOOGLE_PROVIDER_ID |
Unique identifier for this account | Yes |
GOOGLE_PROVIDER_NAME |
Display name | Yes |
GOOGLE_EMAIL |
Google account email | Yes |
GOOGLE_CLIENT_ID |
OAuth client ID from Google Cloud Console | Yes |
GOOGLE_CLIENT_SECRET |
OAuth client secret | Yes |
GOOGLE_REDIRECT_URI |
OAuth redirect URI | Yes |
GOOGLE_ACCESS_TOKEN |
Pre-authorized access token | Yes |
GOOGLE_REFRESH_TOKEN |
Refresh token for token renewal | Yes |
GOOGLE_TOKEN_EXPIRY |
Token expiry (ISO 8601) | No |
Getting Google Credentials
- Go to Google Cloud Console
- Create a new project or select existing
- Enable the Google Calendar API
- Go to Credentials → Create Credentials → OAuth client ID
- Configure consent screen if prompted
- Select Desktop app or Web application
- Copy Client ID and Client Secret
- Use OAuth Playground to get tokens:
- Select
https://www.googleapis.com/auth/calendar - Authorize and get access/refresh tokens
- Select
Example Google Configuration
GOOGLE_ENABLED=true
GOOGLE_PROVIDER_ID=google-personal
GOOGLE_PROVIDER_NAME=Personal Google Calendar
GOOGLE_EMAIL=yourname@gmail.com
GOOGLE_CLIENT_ID=123456789.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-xxxxxxxxxxxx
GOOGLE_REDIRECT_URI=http://localhost:3000/oauth/google/callback
GOOGLE
Tools (3)
calendar_list_eventsList events from a specific calendar within a time range.calendar_create_eventCreate a new event in a specified calendar.calendar_get_free_busyCheck availability for a user or resource.Environment Variables
GOOGLE_ENABLEDrequiredEnable Google CalendarGOOGLE_PROVIDER_IDrequiredUnique identifier for this accountGOOGLE_EMAILrequiredGoogle account emailGOOGLE_CLIENT_IDrequiredOAuth client ID from Google Cloud ConsoleGOOGLE_CLIENT_SECRETrequiredOAuth client secretDEFAULT_TIMEZONEIANA timezone for all operationsConfiguration
{"mcpServers": {"calendar": {"command": "node", "args": ["/path/to/calendar-mcp/dist/index.js"], "env": {"GOOGLE_ENABLED": "true", "GOOGLE_PROVIDER_ID": "google-personal", "GOOGLE_EMAIL": "yourname@gmail.com"}}}}