caldav-mcp
caldav-mcp
AI 어시스턴트에게 달력을 제공하세요. CalDAV 호환 캘린더(Nextcloud, Radicale, Baikal, ownCloud, iCloud, Fastmail 등)에 대한 읽기/쓰기 액세스를 14개의 특수 목적 도구를 통해 제공하는 MCP 서버입니다.
왜 caldav-mcp인가?
Dockerized | 다단계 Alpine 기반 이미지, 비루트 실행, 내장 헬스체크. Docker가 실행되는 어디서나 배포 가능. |
Python 3.13 | Pydantic 검증을 갖춘 깔끔하고 타입이 지정된 코드베이스. 읽기 쉽고 확장하기 쉽습니다. |
Single container |
|
Stateless | 요청 간 세션 상태가 없습니다. 자격 증명은 HTTP 헤더에서 요청별로 전달되므로 서버 재시작 없이 다중 테넌트 사용이 가능합니다. |
Secure by default | 일정 시간 토큰 비교, 지수 백오프가 있는 IP별 속도 제한, 입력 삭제, 구조화된 감사 로깅, 오류 응답에 비밀 정보 없음. |
Two-layer auth | 선택적 API 키가 MCP 엔드포인트를 보호합니다. CalDAV 자격 증명은 요청별로 주입됩니다. 독립적이고 구성 가능하며 예상치 못한 동작이 없습니다. |
Related MCP server: mcp-labrat
뛰어난 활용 사례
AI 기반 캘린더 관리 — Claude, Codex 또는 모든 MCP 클라이언트가 자연어를 통해 이벤트를 생성, 업데이트, 검색, 삭제할 수 있습니다.
다중 테넌트 액세스 — 단일 서버 인스턴스에서 다른 CalDAV 계정에 액세스하려면 요청별로 다른
X-Caldav-*헤더를 보내세요.자체 호스팅 캘린더 자동화 — 기존 Nextcloud, Radicale 또는 Baikal 서버와 함께 사용할 수 있습니다. 클라우드 의존성이 없습니다.
엔터프라이즈/팀 배포 — 중앙 집중식, 무상태, 컨테이너화. 리버스 프록시 뒤에 배포하고, 수평 확장하고, 가동 중지 없이 자격 증명을 교체할 수 있습니다.
빠른 시작
# 1. Clone the repo
git clone https://git.gelse.net/werner/caldav-mcp.git && cd caldav-mcp
# 2. Create your .env file
cp .env.example .env
# Edit .env — at minimum set CALDAV_MCP_API_KEY, CALDAV_URL, CALDAV_USERNAME, CALDAV_PASSWORD
# 3. Launch
docker compose up -d
# 4. Verify
curl -s http://localhost:8600/mcp \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Caldav-Url: https://cloud.example.com/remote.php/dav/calendars/user/" \
-H "X-Caldav-Username: user" \
-H "X-Caldav-Password: app-password" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}'이제 서버는 http://localhost:8600/mcp(Streamable HTTP)에서 접근할 수 있습니다.
도구
서버는 세 가지 범주에 걸쳐 14개의 MCP 도구를 제공합니다.
쿼리(읽기 전용)
Tool | Description |
사용 가능한 모든 캘린더 나열 | |
날짜 범위의 이벤트 가져오기 | |
오늘의 이벤트 가져오기 | |
다음 7일의 이벤트 가져오기 | |
UID로 특정 이벤트 가져오기(참석자 포함) | |
요약, 설명, 위치, 카테고리에서 텍스트로 이벤트 검색 | |
시간 범위에 대한 사용 가능/사용 중 정보 가져오기 |
변경(쓰기)
Tool | Description |
새 이벤트 생성 — RRULE, 우선순위, 카테고리, 참석자 지원 | |
UID로 기존 이벤트 부분 업데이트 | |
UID로 이벤트 삭제 | |
캘린더 간 이벤트 이동 |
참석자
Tool | Description |
이벤트에 참석자 추가 | |
이벤트에서 참석자 제거 | |
이벤트의 참석자 나열 |
배포
Docker
프로젝트에는 다단계 Dockerfile이 포함되어 있습니다:
빌더 단계 —
requirements.txt에서 Python 종속성을 깨끗한 접두사에 설치합니다.런타임 단계 — 사전 빌드된 패키지를 최소 Alpine 이미지에 복사하고, 비루트
app사용자로 실행하며, 포트8080을 노출합니다.
docker build -t caldav-mcp:latest .
docker run -p 8600:8080 \
-e CALDAV_MCP_API_KEY=YOUR_KEY \
-e CALDAV_URL=https://cloud.example.com/remote.php/dav/calendars/user/ \
-e CALDAV_USERNAME=user \
-e CALDAV_PASSWORD=app-password \
caldav-mcp:latestDocker Compose
docker-compose.yaml은 호스트 포트 8600을 컨테이너 포트 8080에 매핑하고 로컬 .env 파일에서 환경 변수를 읽습니다:
services:
caldav-mcp:
build: .
image: caldav-mcp:latest
restart: unless-stopped
ports:
- "8600:8080"
environment:
CALDAV_MCP_API_KEY: "${CALDAV_MCP_API_KEY:-}"
TZ: Europe/Viennadocker compose up -d통합 테스트를 위한 docker-compose.test.yaml도 제공됩니다 — Radicale CalDAV 서버가 포함되어 있습니다.
TLS / HTTPS
서버는 리버스 프록시 없이 내장 TLS를 지원합니다. 다음 환경 변수를 설정하여 HTTPS를 직접 활성화하세요:
CALDAV_MCP_TLS_CERT=/path/to/cert.pem
CALDAV_MCP_TLS_KEY=/path/to/key.pem
CALDAV_MCP_TLS_CA_BUNDLE=/path/to/ca.pem # optionalTLS가 활성화되면 서버는 HTTPS로 수신합니다. 설정하지 않으면 TLS를 종료하는 리버스 프록시(Traefik, Caddy, nginx) 뒤에서 실행하세요.
인증
두 개의 독립적인 계층 — 둘 다 선택 사항이지만 권장됩니다.
계층 1: MCP 엔드포인트 인증
CALDAV_MCP_API_KEY가 설정되면 /mcp 엔드포인트에 대한 모든 요청에는 다음 중 하나가 포함되어야 합니다:
Authorization: Bearer <token>X-Api-Key: <token>
토큰은 타이밍 부채널 공격을 방지하기 위해 일정 시간 비교를 사용하여 비교됩니다. 실패한 시도는 지수 백오프가 있는 슬라이딩 윈도우 속도 제한기를 사용하여 클라이언트 IP별로 추적됩니다.
CALDAV_MCP_API_KEY가 설정되지 않으면 엔드포인트는 열려 있습니다 — 인증 없이 공개 인터넷에 노출하지 마십시오.
계층 2: CalDAV 자격 증명
CalDAV 자격 증명은 요청별로 확인됩니다:
HTTP 헤더(권장):
X-Caldav-Url,X-Caldav-Username,X-Caldav-Password환경 변수(대체):
CALDAV_URL,CALDAV_USERNAME,CALDAV_PASSWORD
HTTP 헤더가 우선합니다. 이를 통해 다중 테넌트 사용이 가능합니다 — 서로 다른 클라이언트가 서버를 재시작하지 않고도 다른 CalDAV 계정을 대상으로 할 수 있습니다.
구성
모든 구성은 환경 변수를 통해 이루어지며, 시작 시 Pydantic으로 검증됩니다.
서버
Variable | Default | Description |
|
| 수신 포트(컨테이너 내부) |
|
| Streamable HTTP 엔드포인트 경로 |
|
| MCP 엔드포인트 인증용 공유 비밀 |
|
| 오늘/주 경계를 위한 IANA 시간대(예: |
CalDAV
Variable | Default | Description |
|
| CalDAV 서버 URL( |
|
| CalDAV 사용자 이름( |
|
| CalDAV 비밀번호( |
|
| CalDAV 연결에서 TLS 인증서를 검증합니다. 자체 서명 인증서로 테스트할 때만 |
속도 제한
Variable | Default | Description |
|
| 슬라이딩 윈도우 내 IP당 최대 실패한 인증 시도 |
|
| 슬라이딩 윈도우 기간(초) |
TLS
Variable | Default | Description |
|
| TLS 인증서 PEM 파일 경로 |
|
| TLS 개인 키 PEM 파일 경로 |
|
| 사용자 지정 인증 기관용 선택적 CA 번들 |
로깅
Variable | Default | Description |
|
| 감사 로그 형식: |
보안
TLS를 종료하는 리버스 프록시 뒤에 서버를 배치하거나 내장 TLS를 활성화하세요.
강력한
CALDAV_MCP_API_KEY를 설정하세요.네트워크/방화벽 계층에서 신뢰할 수 있는 호스트 또는 VPN으로 액세스를 제한하세요.
명시적으로 원격 액세스가 필요하지 않으면
127.0.0.1에 바인딩하는 것이 좋습니다.CalDAV 앱 비밀번호를 공개 구성 또는 로그에 절대 넣지 마세요.
개발
명령어
make test # Run unit tests
make test-integration # Run integration tests (requires docker-compose.test.yaml)
make test-performance # Run performance benchmarks
make lint # Lint with ruff (check + format)
make typecheck # Type check with mypy
make check # All checks: lint + typecheck + deps-check + test
make deps-check # Verify pyproject.toml and requirements.txt are in sync
make build # Build Docker image프로젝트 구조
caldav-mcp/
├── server.py # Thin entrypoint, launches FastMCP HTTP server
├── caldav_mcp/ # Core package
│ ├── tools/ # MCP tool handlers
│ │ ├── queries.py # Read-only tools (7)
│ │ ├── mutations.py # Write tools (4)
│ │ └── attendees.py # Attendee management (3)
│ ├── auth.py # Two-layer auth (API key + CalDAV creds)
│ ├── calendar.py # CalDAV calendar selection & serialization
│ ├── client_cache.py # Thread-safe LRU cache for DAVClient
│ ├── config.py # Env var parsing, header constants
│ ├── config_schema.py # Pydantic startup validation
│ ├── datetime_utils.py # Date/time parsing, timezone helpers
│ ├── errors.py # Typed exceptions, ToolResult dataclass
│ ├── event_builder.py # Pure iCalendar VEVENT construction
│ ├── sanitizers.py # Input sanitization, field length limits
│ ├── rate_limit.py # Sliding-window rate limiter
│ ├── audit.py # Structured JSON audit logging
│ ├── constants.py # Shared string constants
│ └── types.py # CalDAVClient Protocol definition
├── tests/ # Unit, integration, performance
├── docs/ # Architecture, API, contributing docs
├── Dockerfile # Multi-stage Docker build
├── docker-compose.yaml # Production compose
├── docker-compose.test.yaml # Test compose with Radicale
├── requirements.txt # Runtime dependencies (pinned)
├── pyproject.toml # Dev config and dependencies
└── Makefile # Build/test shortcuts종속성
Package | Version | Purpose |
3.4.7 | MCP 서버 프레임워크, Streamable HTTP 전송 | |
3.2.1 | CalDAV 클라이언트 라이브러리 | |
7.2.2 | iCalendar RFC 5545 파싱/생성 | |
>=2.28.0 | HTTP 전송 계층 |
문제 해결
증상 | 원인 | 해결 방법 |
| CalDAV 서버에 연결할 수 없음 |
|
| 자체 서명 또는 유효하지 않은 TLS 인증서 | 서버의 CA를 시스템 신뢰 저장소에 가져오거나 유효한 인증서를 사용하세요 |
| API 토큰이 없거나 유효하지 않음 |
|
| CalDAV 헤더 또는 환경 변수가 없음 |
|
| 오타 또는 잘못된 캘린더 이름 |
|
이벤트 시간이 잘못 표시됨 | 서버 시간대가 설정되지 않음 |
|
FAQ
Q: 여러 CalDAV 계정과 함께 사용할 수 있나요?
A: 네 — 요청별로 다른 X-Caldav-Url / X-Caldav-Username / X-Caldav-Password 헤더를 보내세요. 클라이언트 캐시는 (url, username)을 키로 사용합니다.
Q: 어떤 CalDAV 서버가 지원되나요? A: CalDAV 표준을 구현하는 모든 서버: Nextcloud, ownCloud, iCloud, Fastmail, Baikal, Radicale 등.
Q: API 토큰은 안전하게 전송되나요? A: HTTPS를 사용할 때만 그렇습니다. 내장 TLS를 활성화하거나 서버를 TLS 종료 리버스 프록시 뒤에 배치하세요.
Q: CalDAV 앱 비밀번호는 어떻게 생성하나요? A: 제공업체에 따라 다릅니다. Nextcloud: 설정 → 보안 → 앱 비밀번호. iCloud: appleid.apple.com에서 앱별 비밀번호를 사용하세요.
Q: HTTP 대신 stdio로 사용할 수 있나요?
A: 현재 서버는 Streamable HTTP 전송만 사용합니다. stdio를 사용하려면 server.py를 수정하여 mcp.run_http_async() 대신 mcp.run()을 호출하세요.
라이선스
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceAn MCP server that exposes CalDAV calendar operations as tools for AI assistants. It enables users to connect to CalDAV servers to create and list calendar events within specific timeframes.43297MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with CalDAV calendars to manage events and check availability through natural language or voice commands. It provides specific tools for listing, searching, and creating calendar entries using an OpenAI-compatible interface.
- AlicenseNot gradedqualityFmaintenanceProvider-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
- AlicenseNot gradedqualityFmaintenanceA comprehensive MCP server that provides AI assistants with natural language access to Apple Calendar, enabling reading, searching, creating, and managing calendar events.3MIT
Related MCP Connectors
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Calendar API for AI agents: events, availability, Google/Microsoft setup, scheduling, and iCal.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gelse/caldav-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server