CalDAV MCP Server

CalDAV MCP Server

Enables interaction with any CalDAV-compatible calendar server (Yandex, Google, Nextcloud, iCloud, etc.) to list calendars, create/manage events with reminders and attendees, search events, and handle recurring events through natural language.

Category
访问服务器

README

MCP CalDAV Server

Universal MCP server for CalDAV protocol integration. Works with any CalDAV-compatible calendar server including Yandex Calendar, Google Calendar (via CalDAV), Nextcloud, ownCloud, Apple iCloud, and others.

📖 Quick Start: See QUICKSTART.md for a quick guide to get started with uv. 🔧 Cursor Setup: See CURSOR_SETUP.md for detailed Cursor IDE configuration instructions.

Features

  • List available calendars
  • Create calendar events with reminders and attendees
  • Get events for today, week, or custom date range
  • Works with any CalDAV-compatible server (Yandex, Google, Nextcloud, ownCloud, iCloud, etc.)

Installation

Using uv (Recommended)

First, install uv if you haven't already:

macOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Then install the project:

uv sync --dev

This will:

  • Create a virtual environment (.venv)
  • Install all dependencies including dev dependencies
  • Generate a uv.lock file

Using uvx (Run without installation)

You can also run the server directly without installing it:

uvx mcp-caldav

Using pip

pip install -e .

Configuration

Set the following environment variables:

export CALDAV_URL="https://caldav.example.com/"
export CALDAV_USERNAME="your-username"
export CALDAV_PASSWORD="your-password"

CalDAV Server URLs

Common CalDAV server URLs:

  • Yandex Calendar: https://caldav.yandex.ru/
  • Google Calendar: https://apidata.googleusercontent.com/caldav/v2/ (requires OAuth setup)
  • Nextcloud: https://your-domain.com/remote.php/dav/calendars/username/
  • ownCloud: https://your-domain.com/remote.php/dav/calendars/username/
  • Apple iCloud: https://caldav.icloud.com/ (requires app-specific password)
  • FastMail: https://caldav.fastmail.com/dav/calendars/user/

Note: Some servers require app-specific passwords instead of regular passwords. Check your calendar provider's documentation for CalDAV setup instructions.

Usage

IDE Integration (Cursor)

To use this MCP server in Cursor:

  1. Open Cursor Settings → Features → MCP Servers → + Add new global MCP server
  2. Add the following configuration:

Using uvx (Recommended - no installation needed):

{
  "mcpServers": {
    "mcp-caldav": {
      "command": "uvx",
      "args": ["mcp-caldav"],
      "env": {
        "CALDAV_URL": "https://caldav.example.com/",
        "CALDAV_USERNAME": "your-username",
        "CALDAV_PASSWORD": "your-password"
      }
    }
  }
}

Using local installation (after uv sync or pip install):

{
  "mcpServers": {
    "mcp-caldav": {
      "command": "mcp-caldav",
      "env": {
        "CALDAV_URL": "https://caldav.example.com/",
        "CALDAV_USERNAME": "your-username",
        "CALDAV_PASSWORD": "your-password"
      }
    }
  }
}

Using local development version:

{
  "mcpServers": {
    "mcp-caldav": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/caldav", "mcp-caldav"],
      "env": {
        "CALDAV_URL": "https://caldav.example.com/",
        "CALDAV_USERNAME": "your-username",
        "CALDAV_PASSWORD": "your-password"
      }
    }
  }
}

Example for Yandex Calendar:

{
  "mcpServers": {
    "mcp-caldav": {
      "command": "uvx",
      "args": ["mcp-caldav"],
      "env": {
        "CALDAV_URL": "https://caldav.yandex.ru/",
        "CALDAV_USERNAME": "your-username@yandex.ru",
        "CALDAV_PASSWORD": "your-app-password"
      }
    }
  }
}

⚠️ Note: Yandex Calendar has aggressive rate limiting (60 seconds per MB since 2021). Write operations (create/update/delete) may experience 504 timeouts, so space out requests and introduce manual delays. For write-heavy workloads, consider using Google Calendar or Nextcloud instead. See PROVIDER_NOTES.md for details.

Testing status: End-to-end tests currently run only against Yandex Calendar. Other CalDAV providers follow the same protocol and should work, but they have not been integration-tested yet.

Example for Nextcloud:

{
  "mcpServers": {
    "mcp-caldav": {
      "command": "uvx",
      "args": ["mcp-caldav"],
      "env": {
        "CALDAV_URL": "https://your-domain.com/remote.php/dav/calendars/username/",
        "CALDAV_USERNAME": "your-username",
        "CALDAV_PASSWORD": "your-password"
      }
    }
  }
}

As MCP Server

The server can be used with MCP-compatible clients:

Using uv (after uv sync):

uv run mcp-caldav

Note: uvx works only with published packages from PyPI. For local development, use uv run mcp-caldav after uv sync.

Using pip (after installation):

mcp-caldav

Or with custom options:

uv run mcp-caldav --caldav-url "https://caldav.example.com/" \
                   --caldav-username "your-username" \
                   --caldav-password "your-password" \
                   --verbose

Available Tools

Basic Operations:

  • caldav_list_calendars - List all available calendars
  • caldav_create_event - Create a new calendar event (supports recurrence, categories, priority, attendees)
  • caldav_get_events - Get events for a date range (returns extended fields: UID, categories, priority, attendees, recurrence)
  • caldav_get_today_events - Get events for today
  • caldav_get_week_events - Get events for the week

Advanced Operations:

  • caldav_get_event_by_uid - Get a specific event by its UID
  • caldav_delete_event - Delete an event by UID
  • caldav_search_events - Search events by text, attendees, or location

Features Supported:

  • Recurring events (RRULE) - Daily, Weekly, Monthly, Yearly patterns
  • Categories/Tags - Organize events with categories
  • Priority - Set priority levels (0-9, 0 = highest)
  • Attendees with statuses - Track acceptance status (ACCEPTED/DECLINED/TENTATIVE/NEEDS-ACTION)
  • Reminders - Multiple reminders per event

Development

Code Quality

This project uses several tools to ensure code quality:

  • mypy - Static type checking with strict rules
  • ruff - Fast linting and code formatting
  • pre-commit - Automatic checks before commits

Run quality checks:

# Install dev dependencies
uv sync --group dev

# Run all checks
make check

# Or individually
make lint
make format
make type-check

# Or using pre-commit
make pre-commit-run

Setup pre-commit hooks:

uv run pre-commit install

See CODE_QUALITY.md for detailed information.

Running Tests

Unit tests (with mocks):

make test
# or
make test-unit

E2E tests (require real CalDAV server):

# Create .env.e2e file with your credentials, then:
make test-e2e

All tests:

make test

With coverage:

make test-cov        # Terminal report
make coverage-html   # HTML report

See tests/e2e/README.md for more details on e2e tests.

Project Structure

caldav/
├── src/
│   └── mcp_caldav/
│       ├── __init__.py      # Main entry point
│       ├── server.py        # MCP server implementation
│       └── client.py         # CalDAV client wrapper
├── tests/
│   ├── test_server.py       # Server unit tests
│   ├── test_client.py       # Client unit tests
│   └── e2e/                 # End-to-end tests with real server
│       ├── test_client_e2e.py
│       └── conftest.py
├── pyproject.toml           # Project configuration
├── Makefile                 # Development commands
└── README.md                # This file

License

See LICENSE file for details.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选