A powerful Model Context Protocol (MCP) server that provides natural language calendar management for iCloud Calendar through the CalDAV protocol. This cross-platform solution enables you to interact with your iCloud Calendar using natural language commands in any MCP-compatible client.
- π List Calendars: View all available iCloud calendars
- π Event Management: Create, read, update, and delete calendar events
- π Recurring Events: Support for recurring event patterns
- β° Smart Alarms: Set custom reminders for events
- π Cross-Platform: Works on macOS, Windows, and Linux
- π Secure: Uses app-specific passwords for secure iCloud authentication
- π€ Natural Language: Integrate with AI assistants for natural calendar interactions
- π MCP Compliant: Full support for the Model Context Protocol
- Python 3.12 or higher
- An iCloud account
- An app-specific password for your Apple ID
-
Clone this repository:
git clone https://github.com/zwrong/iCalendar.git cd iCalendar -
Install dependencies:
uv sync
Copy the example configuration file:
cp config.json.example config_private.json- Sign in to appleid.apple.com
- Navigate to "Sign-In & Security"
- Select "App-Specific Passwords"
- Generate a new password
- Copy it to your clipboard
Edit config_private.json:
{
"caldav": {
"server_url": "https://caldav.icloud.com/",
"username": "your_apple_id@icloud.com",
"password": "your_app_specific_password"
}
}Important: Never commit config_private.json to version control! It contains sensitive credentials.
Start the server:
uv run mcp-icalDo Not close the terminal of running the server when you use iCalendar in your MCP client.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"iCalendar": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/iCalendar",
"run",
"mcp-ical"
]
}
}
}If you encounter "spawn uv ENOENT" error:
This error occurs when the system cannot find the uv command in the PATH. To fix this, specify the full path to your uv executable:
{
"mcpServers": {
"ical": {
"command": "/ABSOLUTE/PATH/TO/uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/iCalendar",
"run",
"mcp-ical"
]
}
}
}Find the path to your uv executable by running:
which uv
# or on Windows:
where uvReplace /ABSOLUTE/PATH/TO/uv with the actual path returned by the command.
After Configuration of Claude Desktop, restart the Claude Desktop and use it!
User: "Do I have any plans today?"
AI: I'll check your calendar for today
β list_events("2025-11-06T00:00:00", "2025-11-06T23:59:59")
User: "Schedule a lunch meeting with John on Friday at noon"
AI: I'll create that event for you
β create_event({
"title": "Lunch Meeting with John",
"start_datetime": "2025-01-17T12:00:00",
"end_datetime": "2025-01-17T13:00:00",
"calendar_name": "Personal",
"description": "Discuss project updates"
})
User: "Delete the lunch meeting this week"
AI: I'll create that event for you
β create_event({
"title": "Lunch Meeting with John",
"start_datetime": "2025-01-17T12:00:00",
"end_datetime": "2025-01-17T13:00:00",
"calendar_name": "Personal",
"description": "Discuss project updates"
})
User: "Remind me about the presentation tomorrow at 9 AM, set the reminder for 30 minutes before"
AI: I'll create the event with a 30-minute reminder
β create_event({
"title": "Presentation",
"start_datetime": "2025-01-06T09:00:00",
"end_datetime": "2025-01-06T10:00:00",
"alarm": 30
})
server.py: MCP server entry point with tool definitions using FastMCPcaldav_client.py: CalDAVManager class for iCloud CalDAV access and CRUD operationsical.py: CalendarManager wrapper providing compatibility layermodels.py: Pydantic models for request/response validationconfig.py: Configuration management with priority handling
- mcp[cli]: Model Context Protocol framework
- caldav: CalDAV client library for iCloud access
- vobject: iCalendar file format parsing
- requests: HTTP client for CalDAV operations
- loguru: Structured logging
- pydantic: Data validation and serialization
This MCP server works with any MCP-compatible client, including:
- Claude Desktop
- Claude Code
- Custom MCP clients
- Verify your Apple ID email is correct
- Ensure you're using an app-specific password (not your regular password)
- Check that the app-specific password hasn't expired
- Confirm 2FA is enabled on your Apple ID if required
- Verify your internet connection
- Check that iCloud Calendar is enabled in your Apple ID settings
- Ensure your firewall allows outbound HTTPS connections
- Verify event times are in ISO format (YYYY-MM-DDTHH:MM:SS)
- Ensure start time is before end time
- Check that the calendar name exists
mcp-ical/
βββ src/
β βββ mcp_ical/
β βββ server.py # MCP server entry point
β βββ caldav_client.py # CalDAV operations
β βββ ical.py # Calendar manager wrapper
β βββ models.py # Data models
β βββ config.py # Configuration
βββ tests/ # Test suite
βββ config.json.example # Configuration template
βββ pyproject.toml # Project metadata
βββ README.md # This file
- Fixed:
update_eventanddelete_eventnow properly handle URL-encoded event IDs - Fixed: Event identification now checks both
event.idandevent.urlattributes - Fixed: Robust type checking for event data (string vs vobject)
This project is licensed under the MIT License - see the LICENSE file for details.
- CalDAV protocol specification
- iCloud Calendar service
- Model Context Protocol specification
- π§ Email: zwrong@me.com
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
Made with β€οΈ for the MCP community






