# ClickUp Provider

> **⚠️ Third-Party Integration**: This integration depends on external APIs that may change. Not fully tested beyond unit tests. Behavior may vary depending on the third-party service. Manual validation recommended before production use.


**Schemes:** `clickup:`, `cu:`

**Capabilities:** `read`, `list`, `fetch_comments`, `comment`, `update_status`, `manage_labels`, `create_work_unit`, `snapshot`, `fetch_subtasks`

Integrates with ClickUp for comprehensive task management.

## Usage

```bash
mehr start clickup:abc123xyz
mehr plan cu:abc123xyz

mehr start cu:TASK-123
```

## Configuration

```yaml
clickup:
  token: "${CLICKUP_TOKEN}"
  team_id: "123456"                    # Team/Workspace ID (required for custom task IDs)
  default_list: "987654"               # Optional: default list for operations
  branch_pattern: "task/{key}-{slug}"  # Git branch template
  commit_prefix: "[cu:{key}]"          # Commit message prefix
```

## Token Resolution

1. `MEHR_CLICKUP_TOKEN` environment variable
2. `CLICKUP_TOKEN` environment variable
3. Token from `config.yaml`

## Authentication

Create an API token at: https://app.clickup.com/settings/apps

## Reference Formats

| Format              | Example             |
|---------------------|---------------------|
| Scheme with task ID | `clickup:abc123xyz` |
| Short scheme        | `cu:abc123xyz`      |
| Custom task ID      | `cu:TASK-123`       |

## Features

- **Task Fetching**: Retrieves task name, description, status, priority, tags, assignees, due dates
- **List Tasks**: Browse tasks from lists with status filtering
- **Comment Support**: Fetch and add comments
- **Status Updates**: Change task status
- **Tag Management**: Add and remove tags
- **Task Creation**: Create new tasks in lists
- **Snapshots**: Export task content as markdown

## Status Mapping

| ClickUp Status   | Provider Status |
|------------------|-----------------|
| to do, open      | Open            |
| in progress      | In Progress     |
| in review        | Review          |
| complete, closed | Done            |
