Skip to content

Commit 59e38a3

Browse files
authored
Add Calendar tools with CalDAV support (#33)
1 parent 199e5ed commit 59e38a3

8 files changed

Lines changed: 1318 additions & 12 deletions

File tree

.github/workflows/tests-integration.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,17 @@ jobs:
230230
docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ config:system:set auth.bruteforce.protection.enabled --value=false --type=boolean"
231231
docker exec $NC_CONTAINER su -s /bin/bash www-data -c "php occ app:install spreed" || echo "spreed already installed"
232232
233+
- name: Warm up OCS API
234+
run: |
235+
for i in $(seq 1 10); do
236+
if curl -sf -u admin:admin -H "OCS-APIRequest: true" http://localhost:8080/ocs/v2.php/cloud/user > /dev/null 2>&1; then
237+
echo "OCS API is ready"
238+
break
239+
fi
240+
echo "Waiting for OCS API... ($i)"
241+
sleep 3
242+
done
243+
233244
- name: Run user permission tests
234245
env:
235246
NEXTCLOUD_URL: http://localhost:8080

PROGRESS.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Nextcloud MCP Server — Development Progress
22

3-
## Current Phase: 2Communication
3+
## Current Phase: 3Groupware
44

55
### Completed
66
- [x] Project scaffold: pyproject.toml, src layout, config, permissions, client (2026-03-20)
@@ -33,23 +33,27 @@
3333
- [x] Collectives tools: list_collectives, get_collective_pages, get_collective_page (2026-03-29)
3434
- [x] App Management tools: list_apps, get_app_info, enable_app, disable_app (2026-03-30)
3535
- [x] User-permission integration tests: non-admin error handling validation (2026-03-30)
36+
- [x] Calendar tools: list_calendars, get_events, get_event, create_event, update_event, delete_event (2026-03-30)
3637

3738
### In Progress
3839

3940
### Blocked
4041
(none)
4142

4243
### Next Up
43-
- Phase 3 — Groupware (Calendar, Contacts, Tasks, Deck, Notes)
44+
- Contacts, Tasks, Deck, Notes
4445

4546
## Phases
4647

4748
| Phase | Focus | Status |
4849
|-------|-------|--------|
49-
| 1 | Core (Files, Users, Notifications, Activity) | In Progress |
50-
| 2 | Communication (Talk) | In Progress |
51-
| 3 | Collaboration (Shares, Calendar, Contacts, Deck) | Not Started |
52-
| 4 | Advanced (Search, Status, Apps) | Not Started |
50+
| 1 | Core (Files, Users, Notifications, Activity) | Complete |
51+
| 2 | Communication (Talk, Announcements, Mail) | Complete |
52+
| 3 | Groupware (Calendar, Contacts, Tasks, Deck, Notes) | In Progress |
53+
| 4 | Collaboration (Collectives, Forms, Polls, Tables) | Not Started |
54+
| 5 | Storage & Search | Not Started |
55+
| 6 | Media & Data | Not Started |
56+
| 7 | Advanced & Admin (App Management, etc.) | In Progress |
5357

5458
## Test Coverage
5559

@@ -71,11 +75,12 @@
7175
| Mail | 5 | 29 |
7276
| Collectives | 3 | 22 |
7377
| App Management | 4 | 14 |
78+
| Calendar | 6 | 44 |
7479
| User Permissions || 15 |
7580
| Server || 7 |
7681
| Permissions || 34 |
7782
| Errors || 16 |
7883
| Client || 29 |
7984
| Config || 17 |
8085
| State || 2 |
81-
| **Total** | **67** | **542** |
86+
| **Total** | **73** | **586** |

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ classifiers = [
2222
"Programming Language :: Python :: 3.14",
2323
]
2424
dependencies = [
25+
"icalendar>=7",
2526
"mcp[cli]>=1.20",
2627
"niquests>=3",
2728
]
@@ -107,7 +108,8 @@ venv = "venv"
107108
reportUnusedFunction = false
108109
reportPrivateUsage = false
109110
executionEnvironments = [
110-
{ root = "tests/test_client_retry.py", reportAttributeAccessIssue = false, reportUnknownMemberType = false }
111+
{ root = "tests/test_client_retry.py", reportAttributeAccessIssue = false, reportUnknownMemberType = false },
112+
{ root = "src/nc_mcp_server/tools/calendar.py", reportUnknownMemberType = false, reportUnknownVariableType = false, reportUnknownArgumentType = false },
111113
]
112114

113115
[tool.pytest]

src/nc_mcp_server/server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
activity,
1111
announcements,
1212
app_management,
13+
calendar,
1314
collectives,
1415
comments,
1516
files,
@@ -53,6 +54,7 @@ def create_server(config: Config | None = None) -> FastMCP:
5354
activity.register(mcp)
5455
announcements.register(mcp)
5556
app_management.register(mcp)
57+
calendar.register(mcp)
5658
collectives.register(mcp)
5759
comments.register(mcp)
5860
files.register(mcp)

0 commit comments

Comments
 (0)