Skip to content

Commit 1dca929

Browse files
authored
Merge pull request #95 from neovasky/master
feat(calendar): add comprehensive Calendar app support via CalDAV protocol
2 parents b8191c1 + c91001d commit 1dca929

File tree

7 files changed

+2264
-1
lines changed

7 files changed

+2264
-1
lines changed

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The server provides integration with multiple Nextcloud apps, enabling LLMs to i
1313
| App | Support Status | Description |
1414
|-----|----------------|-------------|
1515
| **Notes** | ✅ Full Support | Create, read, update, delete, and search notes. Handle attachments via WebDAV. |
16+
| **Calendar** | ✅ Full Support | Complete calendar integration - create, update, delete events. Support for recurring events, reminders, attendees, and all-day events via CalDAV. |
1617
| **Tables** | ⚠️ Row Operations | Read table schemas and perform CRUD operations on table rows. Table management not yet supported. |
1718
| **Files (WebDAV)** | ✅ Full Support | Complete file system access - browse directories, read/write files, create/delete resources. |
1819

@@ -29,6 +30,22 @@ The server provides integration with multiple Nextcloud apps, enabling LLMs to i
2930
| `nc_notes_delete_note` | Delete a note by ID |
3031
| `nc_notes_search_notes` | Search notes by title or content |
3132

33+
### Calendar Tools
34+
35+
| Tool | Description |
36+
|------|-------------|
37+
| `nc_calendar_list_calendars` | List all available calendars for the user |
38+
| `nc_calendar_create_event` | Create a comprehensive calendar event with full feature support (recurring, reminders, attendees, etc.) |
39+
| `nc_calendar_list_events` | **Enhanced:** List events with advanced filtering (min attendees, duration, categories, status, search across all calendars) |
40+
| `nc_calendar_get_event` | Get detailed information about a specific event |
41+
| `nc_calendar_update_event` | Update any aspect of an existing event |
42+
| `nc_calendar_delete_event` | Delete a calendar event |
43+
| `nc_calendar_create_meeting` | Quick meeting creation with smart defaults |
44+
| `nc_calendar_get_upcoming_events` | Get upcoming events in the next N days |
45+
| `nc_calendar_find_availability` | **New:** Intelligent availability finder - find free time slots for meetings with attendee conflict detection |
46+
| `nc_calendar_bulk_operations` | **New:** Bulk update, delete, or move events matching filter criteria |
47+
| `nc_calendar_manage_calendar` | **New:** Create, delete, and manage calendar properties |
48+
3249
### Tables Tools
3350

3451
| Tool | Description |
@@ -89,6 +106,98 @@ await nc_webdav_write_file("NewProject/docs/notes.md", "# My Notes\n\nContent he
89106
await nc_webdav_delete_resource("old_file.txt")
90107
```
91108

109+
### Calendar Integration
110+
111+
The server provides comprehensive calendar integration through CalDAV, enabling you to:
112+
113+
- List all available calendars
114+
- Create, read, update, and delete calendar events
115+
- Handle recurring events with RRULE support
116+
- Manage event reminders and notifications
117+
- Support all-day and timed events
118+
- Handle attendees and meeting invitations
119+
- Organize events with categories and priorities
120+
121+
**Usage Examples:**
122+
123+
```python
124+
# List available calendars
125+
calendars = await nc_calendar_list_calendars()
126+
127+
# Create a simple event
128+
await nc_calendar_create_event(
129+
calendar_name="personal",
130+
title="Team Meeting",
131+
start_datetime="2025-07-28T14:00:00",
132+
end_datetime="2025-07-28T15:00:00",
133+
description="Weekly team sync",
134+
location="Conference Room A"
135+
)
136+
137+
# Create a recurring weekly meeting
138+
await nc_calendar_create_event(
139+
calendar_name="work",
140+
title="Weekly Standup",
141+
start_datetime="2025-07-28T09:00:00",
142+
end_datetime="2025-07-28T09:30:00",
143+
recurring=True,
144+
recurrence_rule="FREQ=WEEKLY;BYDAY=MO"
145+
)
146+
147+
# Quick meeting creation
148+
await nc_calendar_create_meeting(
149+
title="Client Call",
150+
date="2025-07-28",
151+
time="15:00",
152+
duration_minutes=60,
153+
154+
)
155+
156+
# Get upcoming events
157+
events = await nc_calendar_get_upcoming_events(days_ahead=7)
158+
159+
# Advanced search - find all meetings with 5+ attendees lasting 2+ hours
160+
long_meetings = await nc_calendar_list_events(
161+
calendar_name="", # Search all calendars
162+
search_all_calendars=True,
163+
start_date="2025-07-01",
164+
end_date="2025-07-31",
165+
min_attendees=5,
166+
min_duration_minutes=120,
167+
title_contains="meeting"
168+
)
169+
170+
# Find availability for a 1-hour meeting with specific attendees
171+
availability = await nc_calendar_find_availability(
172+
duration_minutes=60,
173+
174+
date_range_start="2025-07-28",
175+
date_range_end="2025-08-04",
176+
business_hours_only=True,
177+
exclude_weekends=True,
178+
preferred_times="09:00-12:00,14:00-17:00"
179+
)
180+
181+
# Bulk update all team meetings to new location
182+
bulk_result = await nc_calendar_bulk_operations(
183+
operation="update",
184+
title_contains="team meeting",
185+
start_date="2025-08-01",
186+
end_date="2025-08-31",
187+
new_location="Conference Room B",
188+
new_reminder_minutes=15
189+
)
190+
191+
# Create a new project calendar
192+
new_calendar = await nc_calendar_manage_calendar(
193+
action="create",
194+
calendar_name="project-alpha",
195+
display_name="Project Alpha Calendar",
196+
description="Calendar for Project Alpha team",
197+
color="#FF5722"
198+
)
199+
```
200+
92201
### Note Attachments
93202

94203
This server supports adding and retrieving note attachments via WebDAV. Please note the following behavior regarding attachments:

nextcloud_mcp_server/client/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from .notes import NotesClient
1212
from .webdav import WebDAVClient
1313
from .tables import TablesClient
14+
from .calendar import CalendarClient
1415
from ..controllers.notes_search import NotesSearchController
1516

1617
logger = logging.getLogger(__name__)
@@ -46,6 +47,7 @@ def __init__(self, base_url: str, username: str, auth: Auth | None = None):
4647
self.notes = NotesClient(self._client, username)
4748
self.webdav = WebDAVClient(self._client, username)
4849
self.tables = TablesClient(self._client, username)
50+
self.calendar = CalendarClient(self._client, username)
4951

5052
# Initialize controllers
5153
self._notes_search = NotesSearchController()

0 commit comments

Comments
 (0)