Nextcloud Task MCP Server

Nextcloud Task MCP Server

Enables managing Nextcloud tasks through natural language, including creating, updating, completing, and deleting tasks.

Category
访问服务器

README

nextcloud-task-mcp

An MCP server that manages tasks (VTODOs) in a self-hosted Nextcloud instance over CalDAV. Connect it to Claude as a custom connector to create, list, update and complete Nextcloud tasks using natural language.

Built with FastMCP on the Streamable HTTP transport, and the caldav library for talking to Nextcloud.

Documentation:

  • Deployment guide — Ubuntu LXC + Tailscale + systemd + Claude connector setup
  • Tool reference — all tools with parameters, examples and error messages
  • Architecture — module layout, request flow, design decisions

How it works

  • One CalDAV connection is opened at startup and reused for every request (no reconnect-per-call).
  • Every incoming MCP request must carry a static bearer token (Authorization: Bearer <token>), checked by a middleware before any tool or CalDAV logic runs.
  • The server binds to a local HTTP port only (e.g. 127.0.0.1:8000). It does not handle TLS itself - in the intended deployment, tailscale serve terminates TLS in front of it and only devices on your tailnet can reach it.
  • CalDAV/network failures (auth errors, timeouts, missing task lists/UIDs, ...) are caught and turned into short, clean error messages - no raw stack traces are ever returned to the MCP client.

Setup

Requires Python 3.10+ and uv.

uv sync
cp .env.example .env
# edit .env with your Nextcloud CalDAV URL, an app password, and a bearer token

Generate a Nextcloud app password under Settings → Security → Devices & sessions (never use your account password). The CalDAV URL is your DAV endpoint root, typically:

https://<your-nextcloud-domain>/remote.php/dav/

Generate a random bearer token, e.g.:

python3 -c "import secrets; print(secrets.token_urlsafe(32))"

Run the server:

set -a; source .env; set +a
uv run nextcloud-task-mcp

It listens on MCP_HOST:MCP_PORT (default 127.0.0.1:8000) at the /mcp path, using the Streamable HTTP transport. Point your Claude custom connector at http://<host>:<port>/mcp with the configured bearer token.

Tools

All tool parameter names match the field names below exactly (including German field names with umlauts, e.g. priorität, fällig_datum) - this is the literal MCP tool schema Claude calls.

list_task_lists()

Returns all available Nextcloud task lists as {"name": ..., "url": ...} dicts (display name and internal CalDAV URL/ID).

list_tasks(list_name, nur_offene=True)

Returns tasks in a list. nur_offene=True (default) excludes completed tasks. Each task is a dict with: uid, titel, start_datum, fällig_datum, priorität, fortschritt_prozent, status ("offen" / "erledigt"), ort, url, tags, notizen, übergeordnete_uid (parent task UID, or null if not a subtask).

create_task(liste, titel, ...)

Creates a task. Required: liste, titel. Optional fields and their CalDAV mapping:

Parameter CalDAV property Notes
start_datum DTSTART ISO 8601 date or datetime
fällig_datum DUE ISO 8601 date or datetime
priorität PRIORITY "hoch"→1, "mittel"→5, "niedrig"→9
fortschritt_prozent PERCENT-COMPLETE 0-100
ort LOCATION
url URL
tags CATEGORIES list of strings
erinnerungen VALARM see below
notizen DESCRIPTION
sichtbarkeit CLASS "öffentlich"→PUBLIC, "privat"→PRIVATE, "vertraulich"→CONFIDENTIAL
übergeordnete_aufgabe RELATED-TO;RELTYPE=PARENT UID of an existing task; makes this task its subtask

Reminders (erinnerungen): each entry is either a relative RFC 5545 duration (e.g. "-P1D", "-PT1H") or an absolute ISO 8601 datetime. Relative reminders trigger before fällig_datum if set, otherwise before start_datum; a relative reminder without either date raises an error. Absolute reminders without a UTC offset are interpreted as UTC (per RFC 5545, VALARM triggers must be in UTC).

update_task(list_name, task_uid, ...)

Same fields as create_task, all optional except task_uid. Only fields you pass are changed; everything else on the task is left untouched. Passing erinnerungen replaces all existing reminders on the task.

complete_task(list_name, task_uid)

Sets STATUS:COMPLETED, PERCENT-COMPLETE:100, and a COMPLETED timestamp.

delete_task(list_name, task_uid)

Permanently deletes the task.

Testing

Unit tests mock the caldav library entirely - no network access, no real Nextcloud instance required:

uv sync          # installs the dev group (pytest, ruff) by default
uv run pytest -q

Integration tests exercise the full flow against your real Nextcloud instance (create, list, update, complete, delete a task in a disposable test list). They're skipped by default. To run them:

export RUN_INTEGRATION_TESTS=1
export NEXTCLOUD_CALDAV_URL=... NEXTCLOUD_USERNAME=... NEXTCLOUD_APP_PASSWORD=...
export INTEGRATION_TEST_LIST="Test"   # an existing task list; tasks are created/deleted in it
uv run pytest -q

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选