Caldav MCP 标志

Caldav MCP

组织
langmail

An MCP server that gives your AI agent the events and tasks of any CalDAV calendar.

发布者langmail
代码仓库caldav-mcp
语言TypeScript
复刻数
37
星标数
117
可用工具
0
传输类型stdio
许可协议MIT
链接
  • 将工具接入 AI 工作流

    Caldav MCP 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 117 个星标和 37 个复刻。

json
{
	"mcpServers": {
		"calendar": {
			"command": "npx",
			"args": ["caldav-mcp"],
			"env": {
				"CALDAV_BASE_URL": "<CalDAV server URL>",
				"CALDAV_USERNAME": "<CalDAV username>",
				"CALDAV_PASSWORD": "<CalDAV password>"
			}
		}
	}
}

✨ Features

  • Connect to CalDAV servers
  • List calendars
  • List calendar events within a specific timeframe
  • Create calendar events
  • Update calendar events
  • Delete calendar events by UID
  • List tasks (VTODOs), open ones by default or filtered by status
  • Create and update tasks, with optional due and start dates
  • Mark tasks as completed
  • Delete tasks by UID

Setup

Add the mcpServers entry at the top of this page to your MCP client's config, with your CalDAV server's URL and credentials. It starts the server with npx over stdio.

Several accounts

One server can serve calendars from several CalDAV accounts or servers, over stdio or --http. Name the accounts in CALDAV_ACCOUNTS, and give each one its own URL and credentials in CALDAV_<NAME>_BASE_URL, CALDAV_<NAME>_USERNAME and CALDAV_<NAME>_PASSWORD, with the name in upper case:

bash
CALDAV_ACCOUNTS=personal,family
CALDAV_PERSONAL_BASE_URL=https://cal.example.com/dav
CALDAV_PERSONAL_USERNAME=alex
CALDAV_PERSONAL_PASSWORD=...
CALDAV_FAMILY_BASE_URL=https://family.example.org/dav
CALDAV_FAMILY_USERNAME=household
CALDAV_FAMILY_PASSWORD=...
  • An account name uses only letters, digits and _. The server refuses to start when a variable of a named account is missing, and names it.
  • When CALDAV_ACCOUNTS is set, the plain CALDAV_BASE_URL, CALDAV_USERNAME and CALDAV_PASSWORD are ignored.
  • list_calendars lists the calendars of every account. When several accounts are configured, each calendar has an account field naming its account. The other tools take a calendar URL as before and use the account whose calendars include it. A calendar that several accounts can see goes to the first of them in CALDAV_ACCOUNTS.
  • Everyone who can use the server, over HTTP everyone with its token, can read and change the calendars of every configured account.

Development

Quick Start

Run the MCP server in development mode with auto-reload:

bash
npm run dev

This will run the TypeScript code directly with watch mode and automatically load environment variables from .env.

Manual Build

Alternatively, you can compile TypeScript to JavaScript and run it:

  1. Compile:
bash
npx tsc
  1. Run:
bash
node dist/index.js

Transports

The server supports two transports, selected at startup:

  • stdio (default): JSON-RPC over stdin/stdout, suitable for the standard MCP client configuration shown at the top of this page.

    bash
    npx caldav-mcp
  • Streamable HTTP (--http): runs as a long-lived server that remote MCP clients connect to at POST /mcp. Each request is handled statelessly, and GET /health answers ok for health checks.

    bash
    MCP_AUTH_TOKEN=your-shared-secret npx caldav-mcp --http
    Env varDefaultDescription
    MCP_HOST127.0.0.1Bind address. Set to 0.0.0.0 to listen on all interfaces.
    MCP_PORTPORT, else 3000TCP port to bind. Falls back to PORT, which platforms like Cloud Run set.
    MCP_AUTH_TOKEN(unset)When set, requests must send Authorization: Bearer <MCP_AUTH_TOKEN>; others get 401. Required when MCP_HOST is not a loopback address.

    Connect a client, for example Claude Code (.mcp.json):

    json
    {
      "mcpServers": {
        "calendar": {
          "type": "http",
          "url": "http://127.0.0.1:3000/mcp",
          "headers": { "Authorization": "Bearer your-shared-secret" }
        }
      }
    }

    Security notes:

    • Anyone with the token can read and change the calendars of every configured CalDAV account (see Several accounts).
    • The server speaks plain HTTP. For remote access, put it behind a reverse proxy that terminates TLS.
    • Requests with an Origin header are rejected and there is no CORS support, so browser-based clients can't connect directly.
    • When bound to loopback, only localhost/127.0.0.1/[::1] Host headers are accepted, which blocks DNS rebinding.

Docker

A container image is available for running the server with the Streamable HTTP transport — useful when hosting the MCP server as a long-running container that remote MCP clients connect to over HTTP, rather than spawning the binary locally via stdio.

Each release publishes a multi-arch image (linux/amd64, linux/arm64) to the GitHub Container Registry, tagged with its full, minor and major version (for example 1.2.3, 1.2, 1) and latest:

bash
docker run --rm -p 3000:3000 \
  -e CALDAV_BASE_URL=https://your-caldav-server.com/dav \
  -e CALDAV_USERNAME=your-username \
  -e CALDAV_PASSWORD=your-password \
  -e MCP_AUTH_TOKEN=your-shared-secret \
  ghcr.io/langmail/caldav-mcp

To build the image yourself instead, run docker build -t caldav-mcp . and use caldav-mcp as the image name.

The image binds to 0.0.0.0:3000 (or the port in MCP_PORT/PORT), serves POST /mcp, and reports its health from GET /health. Because it listens on all interfaces, MCP_AUTH_TOKEN is required: without it the container exits at startup (see Transports). The container is not needed for the default stdio setup in Setup above.

Available Tools

list_calendars

List all calendars returning both name and absolute URL. Pass a calendar's url unchanged as calendarUrl to the other tools.

Parameters: none

Returns:

  • List of all available calendars. When the server has several CalDAV accounts configured, each calendar also has account, the name of the account it belongs to, and an account that could not be reached is named in a second text item

list_events

List all events between start and end date in the calendar specified by its URL

Parameters:

  • calendarUrl: string
  • end: string — End date (ISO 8601)
  • start: string — Start date (ISO 8601)

Returns:

  • A list of events that fall within the given timeframe, each containing uid, summary, start, end, and optionally description, location, organizer (email), attendees (emails), alarms (each with action and trigger, e.g. -PT30M) and transparent (true when the event is marked free)

create_event

Creates an event in the calendar specified by its URL. For all-day events, set wholeDay to true. For a single-day all-day event, use start and end datetimes on the same calendar date; they do not need to be identical timestamps.

Parameters:

  • calendarUrl: string
  • description: string (optional)
  • end: string — End datetime (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • location: string (optional)
  • organizer: string (optional) — Organizer email (no mailto:), written as ORGANIZER; a scheduling-capable server (e.g. Radicale with the email/iMIP hook) uses it to send invitations, updates and cancellations to the attendees.
  • recurrenceRule: object (optional)
    • byday: array of string (optional)
    • bymonth: array of number (optional)
    • bymonthday: array of number (optional)
    • count: number (optional)
    • freq: enum (DAILY | WEEKLY | MONTHLY | YEARLY) (optional)
    • interval: number (optional)
    • until: string (optional) — Last occurrence at or before this datetime (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • reminderBefore: string (optional) — Display reminder before the event start, as ISO 8601 duration in weeks, days, hours, minutes or seconds (e.g. P3D, PT30M)
  • start: string — Start datetime (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • attendees: array of string (optional) — Attendee emails (no mailto:), written as ATTENDEE lines; a scheduling-capable server mails them the invitation. Requires organizer.
  • summary: string
  • transparent: boolean (optional) — Mark the event as free (true) or busy (false)
  • wholeDay: boolean (optional) — Create as a whole-day event

Returns:

  • The unique ID of the created event

update_event

Updates an existing event in the calendar specified by its URL. Only provided fields are changed. For a one-day full-day event, set wholeDay to true and set start and end to the same calendar day. Any update of an event with attendees rewrites them as bare addresses, dropping their names and replies (accepted/declined).

Parameters:

  • calendarUrl: string
  • description: string (optional)
  • end: string (optional) — New end datetime (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • location: string (optional)
  • organizer: string (optional) — Organizer email (no mailto:); pass to set or change ORGANIZER, or an empty string to remove it (only when the event has no attendees). Omit to leave it as stored.
  • recurrenceRule: object (optional)
    • byday: array of string (optional)
    • bymonth: array of number (optional)
    • bymonthday: array of number (optional)
    • count: number (optional)
    • freq: enum (DAILY | WEEKLY | MONTHLY | YEARLY) (optional)
    • interval: number (optional)
    • until: string (optional) — Last occurrence at or before this datetime (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • reminderBefore: string | null (optional) — Display reminder before the event start, as ISO 8601 duration in weeks, days, hours, minutes or seconds (e.g. P3D, PT30M). Replaces the event's existing display reminders; email and audio reminders are kept. Pass null to remove the display reminders.
  • start: string (optional) — New start datetime (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • attendees: array of string (optional) — The complete new attendee list (no mailto:): it replaces the stored one, so get the current attendees from list_events and include everyone who should stay. An empty list removes all attendees. Omit to leave them as stored. Requires an organizer.
  • summary: string (optional)
  • transparent: boolean | null (optional) — Mark the event as free (true) or busy (false). Pass null to clear the free/busy status.
  • uid: string — Unique identifier of the event to update (obtained from list_events)
  • wholeDay: boolean (optional) — Update whether this is a whole-day event

Returns:

  • The unique ID of the updated event

delete_event

Deletes an event in the calendar specified by its URL

Parameters:

  • calendarUrl: string
  • uid: string — Unique identifier of the event to delete (obtained from list_events)

Returns:

  • Confirmation message when the event is successfully deleted

list_todos

List tasks (VTODOs) in the calendar specified by its URL. By default returns only open tasks (NEEDS-ACTION and IN-PROCESS), sorted by manual order then due date. Use status to include completed (COMPLETED) or all (ALL) tasks, and limit/offset to page through long lists.

Parameters:

  • calendarUrl: string
  • due_after: string (optional) — Only tasks with a due date at or after this; undated tasks are excluded when a due window is set (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • due_before: string (optional) — Only tasks with a due date at or before this; undated tasks are excluded when a due window is set (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • limit: number (optional) — Max tasks to return (default 50, max 500)
  • offset: number (optional) — Tasks to skip (default 0)
  • status: enum (OPEN | ALL | NEEDS-ACTION | COMPLETED | IN-PROCESS | CANCELLED) (optional) — Filter by status. OPEN (default) = NEEDS-ACTION + IN-PROCESS; ALL = everything; or an exact status (NEEDS-ACTION, COMPLETED, IN-PROCESS, CANCELLED).

Returns:

  • An object { todos, total, limit, offset } where total is the count before pagination. Each todo has uid, summary, status, reminders (when the task will notify, as ISO datetimes, or as the raw offset such as -PT15M for a relative reminder on a task without start; empty when it has none), and optionally due, start, completed, description, location.

create_todo

Creates a task (VTODO) in the calendar specified by its URL. Only summary is required; a task may have no dates. Use due for a deadline and start for when work should begin. Use reminderAt when the user wants to be reminded ("remind me tomorrow at 9"); a task without it gets no reminder.

Parameters:

  • calendarUrl: string
  • description: string (optional)
  • due: string (optional) — Due datetime (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • location: string (optional)
  • reminderAt: string (optional) — When the user's devices should notify about the task: a clock time, not an offset from the due date. For "an hour before it's due", pass the due time minus one hour (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • start: string (optional) — Start datetime (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • status: enum (NEEDS-ACTION | COMPLETED | IN-PROCESS | CANCELLED) (optional) — Defaults to NEEDS-ACTION when omitted
  • summary: string

Returns:

  • The unique ID of the created todo

update_todo

Updates an existing task (VTODO) in the calendar specified by its URL. Only provided fields are changed. reminderAt replaces the task's reminders with one at that time, null removes all of them, and omitting it keeps them. To mark a task done, prefer the complete_todo tool.

Parameters:

  • calendarUrl: string
  • description: string (optional)
  • due: string (optional) — New due datetime (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • location: string (optional)
  • reminderAt: string | null (optional) — When the user's devices should notify about the task: a clock time, not an offset from the due date. For "an hour before it's due", pass the due time minus one hour. Replaces all existing reminders; null removes them; omit to keep them (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • start: string (optional) — New start datetime (ISO 8601 with an offset, e.g. 2026-05-01T09:00:00+02:00 or 2026-05-01T07:00:00Z)
  • status: enum (NEEDS-ACTION | COMPLETED | IN-PROCESS | CANCELLED) (optional)
  • summary: string (optional)
  • uid: string — Unique identifier of the todo to update (from list_todos)

Returns:

  • The unique ID of the updated todo

complete_todo

Marks a task (VTODO) as done. Sets its status to COMPLETED and records the completion time.

Parameters:

  • calendarUrl: string
  • uid: string — Unique identifier of the todo to complete (from list_todos)

Returns:

  • The unique ID of the completed todo

delete_todo

Deletes a task (VTODO) in the calendar specified by its URL

Parameters:

  • calendarUrl: string
  • uid: string — Unique identifier of the todo to delete (from list_todos)

Returns:

  • Confirmation message when the todo is successfully deleted

Feedback

Using caldav-mcp? Tell us how in three minutes.

License

MIT

将 Caldav MCP MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Caldav MCP 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 Caldav MCP 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Caldav MCP MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "caldav-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Caldav MCP MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Caldav MCP MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Caldav MCP 帮我完成这项任务吗?
Caldav MCP
当然,我看过了。
以下是我使用 Caldav MCP 得到的结果。

常见问题

Caldav MCP MCP 服务器有什么用途?

Caldav MCP 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Caldav MCP MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 Caldav MCP。

为什么在 TypingMind 中使用 Caldav MCP MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 Caldav MCP 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Caldav MCP MCP 连接到 TypingMind?

Caldav MCP 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Caldav MCP MCP 在 TypingMind 中提供哪些工具?

Caldav MCP 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Caldav MCP MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 Caldav MCP 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇