mcp-twake-dav
Integrates with iCloud CalDAV and CardDAV services to manage calendars, events, contacts, and invitations (limited support).
Integrates with Nextcloud CalDAV and CardDAV services to manage calendars, events, contacts, and invitations.
Integrates with ownCloud CalDAV and CardDAV services to manage calendars, events, contacts, and invitations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-twake-dav
Give your AI assistant secure access to Twake Calendar and your contacts, in the Twake.ai Digital Workplace.

What is it?
mcp-twake-dav is a Model Context Protocol (MCP) server. MCP is the open standard that lets AI assistants (Claude Desktop, Claude Code, Hermes Agent, Cursor, VS Code and many others) use external tools. This server exposes your calendars and address books to the assistant as 21 tools: agenda, availability, events, reminders, invitations and contacts.
It speaks the open standards CalDAV (RFC 4791), CardDAV (RFC 6352) and CalDAV scheduling (RFC 6638). It is built for Twake Calendar and works with other SabreDAV-compatible servers (Nextcloud, SOGo, DAViCal, ownCloud…).
Related MCP server: nextcloud-mcp
Part of Twake.ai
Twake.ai is the truly open source and sovereign Digital Workplace developed by LINAGORA: Twake Mail, Twake Calendar, Twake Drive, Twake Chat, Twake Space and Twake Visio with a single account, hosted in France or on your own infrastructure.
Five open source MCP servers connect AI assistants to the whole workplace:
MCP server | Twake.ai service | Protocol |
Twake Mail | JMAP | |
mcp-twake-dav (this project) | Twake Calendar and contacts | CalDAV / CardDAV |
Twake Drive | cozy-stack API | |
Twake Chat | Matrix | |
Twake Space (team spaces) | Twake Space API | |
Twake Project (projects, boards, tasks) | Twake Project API |
Used together, they let one assistant prepare a meeting from the invitation, the related email thread, the chat discussion and the documents in the drive, without your data leaving your servers.
What it brings
Your day at a glance: "What's on my agenda today? Where is my 3 pm meeting?"
Finding a slot: "When am I free for one hour with Marie next week?" Busy periods come from the events themselves; all-day events (holidays, trade shows, days off) are listed apart instead of blocking whole days.
Scheduling in natural language: "Book a project review on Tuesday at 10 with Pierre and Marie" (dates like "next Monday" or "in two weeks" are understood).
Reminders and invitations: add or remove reminders, list pending invitations and answer them.
Contacts: find an email address or a phone number, create and update contact cards.
Your calendars, not your colleagues':
list_calendarsgroups the calendars by access rights (yours, shared with write access, read-only) and the query tools take a group, so an assistant can read only the calendars you own withcalendar: "mine", or by default withDAV_DEFAULT_CALENDAR=mine(see Your calendars and the ones shared with you).One approval for a series of writes: before several writes (several events, several contacts), the assistant can ask you once for the exact list with
approve_batch. Each listed call then runs without another question, once, within 15 minutes, in the session that approved it; anything else, or anything changed since, asks as usual (see Approving a series of writes at once).From the command line:
npx mcp-twake-dav call <tool>andnpx mcp-twake-dav toolsrun every tool from a terminal or a script, with the server's configuration. A write you type in a terminal is approved without a question (--iasks first); a write started by an agent is refused, since agents write through their MCP tools, which ask you; without a terminal (cron), a write needs--yes --as <name>, for a name you allowed once in a terminal (see From the command line).Sovereignty: the server runs next to your assistant and talks directly to your calendar server. Pair it with a self-hosted or European AI model to keep the whole chain under your control.
Features
21 MCP tools
Category | Tools |
Calendar, read |
|
Calendar, write |
|
Invitations |
|
Contacts, read |
|
Contacts, write |
|
Approval |
|
⚠️ = deletes data or makes the server notify other people. Every tool carries MCP annotations (readOnlyHint, destructiveHint, openWorldHint).
Every write is approved by you first. Before create_event, update_event, delete_event, add_alarm, remove_alarm, respond_to_invitation, create_contact, update_contact or delete_contact writes anything, the server itself shows you the exact action through MCP elicitation (see Prior approval) and acts only on your explicit OK.
Highlights
Attendees and organizer:
create_eventinvites attendees, with the organizer taken fromDAV_ORGANIZER_EMAIL/DAV_ORGANIZER_NAME; the server sends the invitations.Recurring events: RRULE expansion with safety limits, single-occurrence edits and deletions, and an opt-out (
DAV_RECURRING_WRITES=false) for cautious deployments.Reliable updates: events are found by UID with a server-side query; updates use parse-modify-serialize, so alarms, attendees and
X-properties are preserved.Status display: cancelled and tentative events, attendee participation status.
Pagination by date:
get_events_in_range,get_todays_scheduleandsearch_eventstakelimit(default 50, maximum 100) andcursor, and return anextCursorwhile events remain. A range covers 92 days at most. An event shows its first 10 attendees;all_attendeeslists them all, with a smalllimitsince an answer can then reach hundreds of thousands of characters.Visible failures: a DAV read that fails or times out (30 seconds), including an error inside a 207, is reported to the assistant as an error, not as an empty result. Objects that could not be read are named next to the result. Cancelling a tool call cancels its requests. A read is retried only on 429, 503 and network errors,
Retry-Afterhonoured up to 10 seconds. A write is never retried: without an answer, the assistant is told its outcome is unknown.Five authentication methods: Basic, Bearer, OpenPaaS ESNToken, token command (short-lived tokens refreshed before every call) and an external credentials file.
Reverse proxy support:
DAV_HREF_PREFIXfor servers published under a path prefix that their responses omit (Twake Calendar / OpenPaaS).CTag-based caching, retries with backoff, natural-language dates (chrono-node), HTTPS enforced.
Requirements
Node.js >= 20.3
A CalDAV / CardDAV server: Twake Calendar, Nextcloud, SOGo, DAViCal, ownCloud… (HTTPS required, except
localhost)An MCP client: Claude Desktop, Claude Code, Hermes Agent, Cursor, VS Code, or any MCP-compatible assistant
Installation
Quick start with mcp-twake-ai (recommended)
npx mcp-twake-ai setupmcp-twake-ai sets up this server and the other Twake.ai MCP servers for your Twake.ai account: it asks for your email, signs you in at the Twake.ai identity provider (in the browser, or with a code over SSH), and finds the agents on your computer (Claude Code, Hermes, Claude Desktop, Cursor, VS Code) and the services of your account. It then installs pinned versions of the servers, writes their entries in each agent's configuration and checks that each server starts. For any other agent, mcp-twake-ai export --agent <id> writes the configuration files.
Manual installation
Interactive setup of this server only:
npx mcp-twake-dav setupThe wizard asks for your server URL and credentials, tests the connection, lists your calendars and address books, lets you pick the defaults, and can write the Claude Desktop configuration for you.
Global install:
npm install -g mcp-twake-davFrom source:
git clone https://github.com/linagora/mcp-twake-dav.git
cd mcp-twake-dav
npm install
npm run build # then run: node build/index.jsConfiguration
The server is configured through environment variables, usually set in your MCP client configuration.
Authentication
Method | Variables |
Basic (default) |
|
Bearer |
|
ESNToken (OpenPaaS) |
|
Token command |
|
With token command, the server runs
DAV_TOKEN_COMMANDto get an access token, either raw on stdout or as JSON{"access_token": "...", "expires_at": <epoch seconds>}, and refreshes it before every call. A single broker you control can then own the OIDC grant for several tools. For Twake.ai, mcp-twake-ai is that broker:mcp-twake-ai token dav. Give the command with an absolute path, as some MCP clients do not see yourPATH. It runs through the system shell (sh, orcmd.exeon Windows, where paths go in double quotes).DAV_CREDENTIALS_FILEpoints to a file holdingDAV_USERNAME=…,DAV_PASSWORD=…orDAV_TOKEN=…lines, so secrets stay out of the MCP client configuration.
Other options
Variable | Description | Default |
| Calendar used when the assistant does not name one; a group of calendars works too (see Your calendars and the ones shared with you) | all calendars |
| Address book used by default | all address books |
| Organizer written in events that have attendees; your address as an attendee for | none |
|
|
|
| Path prefix stripped by a reverse proxy, e.g. | none |
| IANA time zone used to display and interpret dates, e.g. | system time zone |
|
|
|
| How long an approval prompt waits for your answer |
|
| Language of the approval prompts, |
|
|
|
|
Prior approval
With DAV_APPROVAL=elicit (the default), every write tool sends the MCP client an elicitation request before it writes, for instance:
Twake Calendar: Delete an event (cannot be undone)
As: Jane DOE (your account)
Event: Budget review · 2026-11-05 14:00 → 15:00 (Europe/Paris)
Notified: Bob DURAND (the server may send them a cancellation)
Ref. 3f9a1c · Accept to do it now, refuse to cancel.The prompt shows the dates as the server understood them, the event being changed, the attendees who will receive an e-mail, and the contact's current values.
The server writes only on accept. A refusal, a dismissal, a timeout (
DAV_APPROVAL_TIMEOUT_MS, 10 minutes) or an error writes nothing, and the tool tells the assistant not to retry.A client without elicitation support gets an error and nothing is written. Set
DAV_APPROVAL=clientonly if your MCP client asks you to confirm every write tool itself.USER_LANGUAGE=frwrites the prompts in French.
Twake Calendar
Twake Calendar publishes its SabreDAV endpoint under /dav/ and accepts OIDC Bearer tokens:
DAV_URL=https://calendar.example.com/dav/
DAV_HREF_PREFIX=/dav
DAV_AUTH_METHOD=command
DAV_TOKEN_COMMAND="/usr/local/bin/mcp-twake-ai token dav"
DAV_ORGANIZER_EMAIL=jane.doe@example.com
DAV_DEFAULT_CALENDAR="Jane Doe"Without DAV_HREF_PREFIX, discovery fails with cannot find homeUrl or calendars come back empty.
Your calendars and the ones shared with you
An account often sees more than its own calendars: colleagues share theirs, read-only or with write access. list_calendars groups them, from the DAV:current-user-privilege-set and DAV:owner properties of RFC 3744 and from DAV:share-access, which the CalDAV sharing extension (draft-pot-webdav-resource-sharing) adds:
Available calendars (15): 2 yours, 3 shared with write access, 10 read-only
My calendars (2): …
Shared with write access (3): …
Read-only (10): …The query tools take the name of a group, so an assistant asked "what's on my calendar?" does not list other people's meetings:
get_todays_schedule(calendar: "mine") # the calendars you own
get_todays_schedule(calendar: "writable") # every calendar you may write to, your own included
get_todays_schedule(calendar: "shared-write") # somebody else's calendars shared with write access
get_todays_schedule(calendar: "read-only") # where you may only read: shared read-only, or your ownA group can also be the default calendar (DAV_DEFAULT_CALENDAR=mine): an assistant then reads the calendars you own unless it names another calendar. calendar: "all" follows that default — an assistant sends "all" on its own, and a user who configured a default did not ask for every calendar — and DAV_DEFAULT_CALENDAR=all means no default at all, every calendar being read only when none is configured. A name still targets one calendar — a calendar that really is called mine keeps its own name.
create_event needs a calendar name when the default is a group, since creating an event in several calendars at once has no meaning. The tools that find an event by UID — update_event, delete_event, add_alarm, remove_alarm — search the calendars of that group.
The rights come from three properties:
DAV:current-user-privilege-setsays whether the account may write: withoutDAV:write,DAV:write-contentorDAV:all, the calendar is read-only;DAV:share-access, when the server publishes it, says that a calendar is shared with the account, and with which access — it wins over the privileges, and it is what tells a colleague's calendar shared with write access from one you own on a server that names the receiving account as its owner (upstream SabreDAV does; Twake Calendar names the account that shares it);DAV:ownerseparates your own calendars from somebody else's shared with write access, on servers that do not publish the sharing.
A subscription — a colleague's public calendar you subscribed to, which Twake Calendar lists as a calendar with the resource type cs:subscribed and you as its owner — is never in mine: it goes to shared-write when you may write to it, to read-only otherwise.
A server that publishes none of them gets the plain list, and asking for a group then says so instead of answering "No calendar with…": name a calendar, or use "all". Calendars whose rights the server gives for some of them only are listed apart, under Access rights unknown.
Use it with your assistant
Claude Desktop
Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Linux: ~/.config/Claude/, Windows: %APPDATA%\Claude\), then restart Claude Desktop:
{
"mcpServers": {
"twake-dav": {
"command": "npx",
"args": ["-y", "mcp-twake-dav"],
"env": {
"DAV_URL": "https://dav.example.com",
"DAV_USERNAME": "jane.doe@example.com",
"DAV_PASSWORD": "your-password",
"DAV_DEFAULT_CALENDAR": "My Calendar",
"DAV_DEFAULT_ADDRESSBOOK": "My Contacts",
"USER_TIMEZONE": "Europe/Paris"
}
}
}
}Claude Code
claude mcp add twake-dav --scope user \
-e DAV_URL=https://dav.example.com \
-e DAV_USERNAME=jane.doe@example.com \
-e DAV_CREDENTIALS_FILE=~/.config/mcp-twake-dav/credentials \
-- npx -y mcp-twake-davHermes Agent
mcp_servers:
twake_dav:
command: npx
args: ["-y", "mcp-twake-dav"]
env:
DAV_URL: https://calendar.example.com/dav/
DAV_HREF_PREFIX: /dav
DAV_AUTH_METHOD: command
DAV_TOKEN_COMMAND: /usr/local/bin/mcp-twake-ai token dav
DAV_ORGANIZER_EMAIL: jane.doe@example.com
DAV_RECURRING_WRITES: "false"
DAV_APPROVAL_TIMEOUT_MS: "330000"
USER_LANGUAGE: fr
timeout: 420 # longer than the approval wait
elicitation:
enabled: true
timeout: 300Hermes shows the approval prompts in the desktop app, the terminal or on your messaging platform, and declines them where nobody can answer (cron jobs, one-shot queries).
Other MCP clients
Any client that can launch a stdio MCP server works: command npx, arguments -y mcp-twake-dav, and the environment variables above.
From the command line
Every tool of this server can be called from a terminal or a script, with the same configuration (DAV_* variables) as the server:
npx mcp-twake-dav tools # one line per tool
npx mcp-twake-dav tools get_events_in_range # its parameters
npx mcp-twake-dav call get_events_in_range --arg when="next week" --arg calendar=mine
npx mcp-twake-dav call create_event --json @event.json--arg key=valueis converted to the type the tool giveskey;--jsontakes the whole arguments object (@file, or-for stdin). The result goes to stdout (--json-outputfor the raw result), everything else to stderr.Exit codes: 0 done, 1 the tool answered with an error, 2 wrong command or argument, 3 a write was not approved, 4 the server could not be reached.
Writes: typed by you in a terminal, a write is approved without a question (
--iasks first). Started by an agent (CLAUDECODEorHERMES_HOMEset), a write is refused: agents write through their MCP tools, which ask you. Without a terminal (cron), a write is refused unless it passes--yes --as <name>for a name you allowed once, in a terminal, withnpx mcp-twake-dav allow-unattended <name>. The allowed names are shared by the six Twake.ai servers, in~/.config/twake-ai/cli.json(%USERPROFILE%\AppData\Roaming\twake-ai\cli.jsonon Windows).These rules stop an agent that follows instructions; they cannot stop a program that hides that it is an agent, or rewrites
cli.json, under your account.With mcp-twake-ai,
npx mcp-twake-ai call dav …does the same with your Twake.ai sign-in.
Approving a series of writes at once
Before a series of writes (several events, several contacts), an agent can ask you once for the whole list with approve_batch: you see every action, numbered, in one approval. Each call that then carries the batchId and matches a listed action exactly runs without another question, once, within 15 minutes. A call that is not in the list, or whose target changed since you approved, asks as usual. A batch approves exactly what each action's approval text shows; it belongs to the session that approved it, and is forgotten when that session ends. With DAV_APPROVAL=client, there is no batch.
Recommended safe configuration
Creating, moving or deleting an event with attendees makes the server email them in your name, and contact deletion is final (CardDAV has no trash). For an assistant that acts on its own:
keep
DAV_APPROVAL=elicit(the default): every write waits for your OK on the exact action, whatever the assistant decides;set
DAV_RECURRING_WRITES=falseand edit recurring series in Twake Calendar;filter out
respond_to_invitation(anddelete_contactif not needed) in your MCP client, for example with Hermes Agent:
tools:
exclude: [respond_to_invitation, delete_contact]Event descriptions and contact notes may be written by third parties (prompt injection). See SECURITY.md.
Usage examples
"What's my next meeting, and where is it?"
"Show my schedule for this week."
"Am I free tomorrow afternoon? Find me a 45-minute slot."
"Create a meeting with Pierre on Thursday at 2 pm and invite him."
"Add a 15-minute reminder to my dentist appointment."
"Do I have pending invitations?"
"What's Marie's email address? Update her phone number."
Troubleshooting
Symptom | Fix |
| Set the variables required by your |
| Your MCP client does not support elicitation: use one that does, or |
| The prompt timed out or nobody could answer (cron, one-shot query): nothing was written. |
| Check the credentials; with a token, check that it is valid and not expired. |
| Use |
| The server sits behind a path prefix: set |
| Pass the calendar name. |
No calendars or address books | Check the account's permissions in the server's web interface. |
Tools missing in the client | Restart the client after editing its configuration; check that |
Run with LOG_LEVEL=debug for details (logs go to stderr).
Architecture
MCP client ⇄ stdio (JSON-RPC) ⇄ mcp-twake-dav ⇄ HTTPS (CalDAV / CardDAV) ⇄ Twake Calendar / any DAV serverLayers: Zod configuration with HTTPS enforcement, Pino logger on stderr, tsdav clients with pluggable authentication and href-prefix rewriting, retry and CTag cache, calendar and address book services, ical.js transformers (iCalendar, vCard, RRULE, time zones), and the MCP tools.
Development
npm install
npm run build # compile TypeScript
npm test # Vitest suite, no real server needed
npm run dev # watch mode
node scripts/check-command-auth.mjs # token-command refresh against a mock CalDAV serverContributing
Contributions are welcome: read CONTRIBUTING.md and our Code of Conduct. Please report vulnerabilities privately as described in SECURITY.md. Release notes are in CHANGELOG.md.
License
Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
Copyright © 2026 LINAGORA
About
mcp-twake-dav is developed by LINAGORA, French open source software publisher, as part of Twake.ai. For support, hosting or integration of Twake.ai and its AI connectors, contact LINAGORA at https://linagora.com.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
Hosted memory for AI assistants: a knowledge graph over MCP with OAuth. Hosted in Germany.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvider-agnostic CalDAV calendar MCP server that connects any CalDAV calendar to AI assistants, enabling calendar operations like listing, creating, updating, and deleting events.AGPL 3.0
- AlicenseBqualityDmaintenanceMCP server integrating Nextcloud services (tasks, calendar, notes, email, files, Deck) for AI assistant interaction.201MIT
- AlicenseNot gradedqualityBmaintenanceA CardDAV MCP server that exposes contacts and address books as tools for AI assistants.160 npm2MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that gives AI assistants read/write access to any CalDAV calendar, enabling natural language management of events, attendees, and calendar queries across Nextcloud, Radicale, iCloud, and more.7MIT