update caldav
This commit is contained in:
72
README.md
72
README.md
@@ -15,6 +15,8 @@ A Model Context Protocol (MCP) server that integrates with Nextcloud to provide
|
||||
|
||||
### Calendar
|
||||
- ✅ Get calendar events with date range filtering
|
||||
- ✅ Query one, many, or all VEVENT calendars automatically
|
||||
- ✅ Discover available calendars and supported components
|
||||
- ✅ Create new calendar events with details and location
|
||||
|
||||
### Notes
|
||||
@@ -125,9 +127,17 @@ Once connected, Claude can use these tools:
|
||||
- `update_task` - Update existing task (mark complete, change details)
|
||||
|
||||
### Calendar
|
||||
- `get_calendar_events` - Get events in date range
|
||||
- `list_calendars` - List available calendars (`name`, `href`, `components`)
|
||||
- `get_calendar_events` - Get events in date range across selected calendars
|
||||
- `create_calendar_event` - Create new event with details
|
||||
|
||||
`get_calendar_events` supports:
|
||||
- `startDate` / `endDate` (YYYY-MM-DD)
|
||||
- `calendar` (single calendar name or href)
|
||||
- `calendars` (array of names/hrefs)
|
||||
- `includeAllCalendars` (default `true`, queries all VEVENT calendars when no selectors are provided)
|
||||
- `limit`
|
||||
|
||||
### Notes
|
||||
- `get_notes` - List all notes
|
||||
- `create_note` - Create new note with markdown
|
||||
@@ -158,9 +168,52 @@ Once the MCP server is connected, you can ask Claude:
|
||||
- Check that required apps (Tasks, Calendar, Notes) are installed
|
||||
|
||||
### CalDAV Issues
|
||||
- Verify calendar/task list names match your Nextcloud setup
|
||||
- Default calendar name is "personal" - adjust in code if needed
|
||||
- Default task list name is "tasks" - adjust in code if needed
|
||||
- Use `list_calendars` to discover calendar names/hrefs from your server
|
||||
- Set `DEBUG_NEXTCLOUD_MCP=1` to log CalDAV requests and parsing details
|
||||
- Default task list name is still `tasks` for task operations
|
||||
|
||||
### Debugging with curl
|
||||
List calendars with PROPFIND:
|
||||
```bash
|
||||
curl -u "$NEXTCLOUD_USERNAME:$NEXTCLOUD_PASSWORD" \
|
||||
-X PROPFIND \
|
||||
-H "Depth: 1" \
|
||||
-H "Accept: application/xml" \
|
||||
-H "Content-Type: application/xml; charset=utf-8" \
|
||||
--data '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<d:propfind xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
|
||||
<d:prop>
|
||||
<d:displayname />
|
||||
<d:resourcetype />
|
||||
<c:supported-calendar-component-set />
|
||||
</d:prop>
|
||||
</d:propfind>' \
|
||||
"$NEXTCLOUD_URL/remote.php/dav/calendars/$NEXTCLOUD_USERNAME/"
|
||||
```
|
||||
|
||||
Query events with REPORT:
|
||||
```bash
|
||||
curl -u "$NEXTCLOUD_USERNAME:$NEXTCLOUD_PASSWORD" \
|
||||
-X REPORT \
|
||||
-H "Depth: 1" \
|
||||
-H "Accept: application/xml" \
|
||||
-H "Content-Type: application/xml; charset=utf-8" \
|
||||
--data '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav" xmlns:d="DAV:">
|
||||
<d:prop>
|
||||
<d:getetag />
|
||||
<c:calendar-data />
|
||||
</d:prop>
|
||||
<c:filter>
|
||||
<c:comp-filter name="VCALENDAR">
|
||||
<c:comp-filter name="VEVENT">
|
||||
<c:time-range start="20260201T000000Z" end="20260301T000000Z"/>
|
||||
</c:comp-filter>
|
||||
</c:comp-filter>
|
||||
</c:filter>
|
||||
</c:calendar-query>' \
|
||||
"$NEXTCLOUD_URL/remote.php/dav/calendars/$NEXTCLOUD_USERNAME/personal/"
|
||||
```
|
||||
|
||||
### Email Issues
|
||||
- Ensure Nextcloud Mail app is installed and configured
|
||||
@@ -187,15 +240,8 @@ Check the MCP server logs in Claude Desktop:
|
||||
|
||||
## Customization
|
||||
|
||||
### Changing Calendar Names
|
||||
Edit `src/index.ts` and update the calendar paths:
|
||||
```typescript
|
||||
// Default personal calendar
|
||||
const caldavPath = `/remote.php/dav/calendars/${this.config.username}/personal/`;
|
||||
|
||||
// For a different calendar, change "personal" to your calendar name
|
||||
const caldavPath = `/remote.php/dav/calendars/${this.config.username}/work/`;
|
||||
```
|
||||
### Calendar Selection
|
||||
Use `list_calendars` and pass `calendar` / `calendars` to `get_calendar_events` to target specific calendars by name or href.
|
||||
|
||||
### Changing Task List Names
|
||||
```typescript
|
||||
|
||||
Reference in New Issue
Block a user