Metadata-Version: 2.5
Name: nextcloud-mcp-lite
Version: 0.3.9
Summary: Minimal MCP server for Nextcloud file sync and PIM
Requires-Python: >=3.11
Requires-Dist: click>=8.1
Requires-Dist: httpx<0.29,>=0.28.1
Requires-Dist: icalendar<7.4,>=7.3.0
Requires-Dist: mcp[cli]<3,>=2.1
Description-Content-Type: text/markdown

# nextcloud-mcp-lite

Minimal, fast Model Context Protocol (MCP) server for Nextcloud file sync and PIM (Calendar & Tasks).

## Features

- **Files (WebDAV)** (10 tools):
  - `list_files`: list files and folders with clean paths, metadata, and `file_id`.
  - `read_file`: read file contents as text or base64 with `max_bytes` context limit protection.
  - `write_file`: write/overwrite files with automatic parent directory creation (`mkdir -p` behavior).
  - `create_directory`: create folders with automatic parent directory creation.
  - `delete`: permanently remove files or directories.
  - `move`: move files or directories (auto-detects directory destinations to prevent WebDAV 412 errors).
  - `copy`: copy files or directories (auto-detects directory destinations to prevent WebDAV 412 errors).
  - `rename`: rename file or folder in place with overwrite safety.
  - `find_files`: recursive (`depth="infinity"`) or non-recursive search by name pattern.
  - `comment`: list, create, update, and delete Nextcloud file comments.

- **Calendar & Tasks (CalDAV)** (3 tools):
  - `list_calendars`: lists active calendars with component types, colors, and ctags (auto-filters deleted/trash collections).
  - `event`: CRUD for calendar events with recurrence (`rrule`), status (`CONFIRMED`/`CANCELLED`/`TENTATIVE`), and time-range filtering.
  - `todo`: CRUD for tasks with priority (`0-9`), completion toggle, and status filtering (`pending` / `COMPLETED`).

- **Architecture**:
  - Auto-resolves active calendars and normalizes paths cleanly for seamless LLM tool chaining.
  - Single-user BasicAuth, stdio and streamable-http transports, zero unnecessary bloat.

## Installation

```bash
uv tool install nextcloud-mcp-lite
# or
pip install nextcloud-mcp-lite
```

## Configuration

Set the following environment variables:

- `NEXTCLOUD_HOST`: URL of your Nextcloud instance (e.g. `https://cloud.example.com`)
- `NEXTCLOUD_USERNAME`: Your Nextcloud username
- `NEXTCLOUD_PASSWORD`: App password from Nextcloud *Settings > Security > Devices & sessions*
- `NEXTCLOUD_VERIFY_SSL`: Set to `false` for self-signed certificates (default: `true`)

## Usage

```bash
nextcloud-mcp-lite run --transport stdio
```
