Add ICS calendar support
All checks were successful
Build And Test / publish (push) Successful in 48s

This commit is contained in:
2026-01-01 15:06:44 -08:00
parent 71c55f7289
commit 7966a4302d
5 changed files with 303 additions and 17 deletions

View File

@@ -7,7 +7,7 @@ from services.calendar_service import CalendarService
def register_calendar_tools(mcp: FastMCP, service: CalendarService):
"""Register all calendar-related MCP tools."""
@mcp.tool(description="List all available calendars from the CalDAV server. Returns calendar ID, name, and properties.")
@mcp.tool(description="List all available calendars from CalDAV and configured ICS feeds. Returns calendar ID, name, and properties.")
def list_calendars() -> list[dict]:
"""List all calendars."""
calendars = service.list_calendars()
@@ -26,7 +26,7 @@ def register_calendar_tools(mcp: FastMCP, service: CalendarService):
Args:
start_date: Start of date range (ISO format: YYYY-MM-DD)
end_date: End of date range (ISO format: YYYY-MM-DD)
calendar_id: The calendar ID (URL) to query. If not provided, lists from all calendars.
calendar_id: The calendar ID (CalDAV URL or ICS ID) to query. If not provided, lists from all calendars.
include_recurring: Whether to expand recurring events (default: True)
"""
if calendar_id:
@@ -67,7 +67,7 @@ def register_calendar_tools(mcp: FastMCP, service: CalendarService):
Get a specific event.
Args:
calendar_id: The calendar ID containing the event
calendar_id: The calendar ID (CalDAV URL or ICS ID) containing the event
event_id: The unique ID (UID) of the event
"""
result = service.get_event(calendar_id, event_id)
@@ -89,7 +89,7 @@ def register_calendar_tools(mcp: FastMCP, service: CalendarService):
Create a new calendar event.
Args:
calendar_id: The calendar ID to create the event in
calendar_id: The calendar ID to create the event in (CalDAV only)
title: Event title/summary
start: Start datetime (ISO format: YYYY-MM-DDTHH:MM:SS)
end: End datetime (ISO format: YYYY-MM-DDTHH:MM:SS)
@@ -119,7 +119,7 @@ def register_calendar_tools(mcp: FastMCP, service: CalendarService):
Update an existing event.
Args:
calendar_id: The calendar ID containing the event
calendar_id: The calendar ID containing the event (CalDAV only)
event_id: The unique ID of the event to update
title: New event title (optional)
start: New start datetime (optional)
@@ -143,7 +143,7 @@ def register_calendar_tools(mcp: FastMCP, service: CalendarService):
Delete a calendar event.
Args:
calendar_id: The calendar ID containing the event
calendar_id: The calendar ID containing the event (CalDAV only)
event_id: The unique ID of the event to delete
notify_attendees: Whether to notify attendees of cancellation (default: True)
"""