npm package: @getwazi/mcp
Description: Wazi MCP server — manage habits, tasks, and journeys from AI assistants
Latest version: 0.2.1

# @getwazi/mcp

MCP server for [Wazi](https://wazi.ca) — manage habits, tasks, and journeys from AI assistants like Claude.

## Quick Start

```bash
npx @getwazi/mcp init
```

This will authenticate you with Wazi and configure your MCP client automatically.

## Commands

| Command | Description |
|---------|-------------|
| `npx @getwazi/mcp init` | First-time setup: authenticate and configure your MCP client |
| `npx @getwazi/mcp login` | Re-authenticate with Auth0 |
| `npx @getwazi/mcp logout` | Clear stored authentication tokens |
| `npx @getwazi/mcp status` | Show authentication status and configuration |
| `npx @getwazi/mcp serve` | Start the MCP server (called by MCP clients, not usually run directly) |

## Available Tools

### Dashboard
- **wazi_get_today** — Today's habits, tasks, schedule blocks, and check-in status
- **wazi_get_summary** — Aggregate stats across all journeys
- **wazi_get_pacing** — Weekly pacing: ahead, on track, or behind for each habit
- **wazi_get_next_action** — AI-recommended next best action

### Journeys
- **wazi_list_journeys** — List active journeys with stats
- **wazi_get_journey** — Get journey details including habits and tasks
- **wazi_get_journey_summary** — Streak, completion rate, and check-in history
- **wazi_create_journey** — Create a new journey

### Habits
- **wazi_list_habits** — List habits for a journey
- **wazi_create_habit** — Create a new habit
- **wazi_check_in** — Record a habit check-in for a date
- **wazi_undo_check_in** — Remove a check-in

### Tasks
- **wazi_list_tasks** — List tasks for a journey
- **wazi_create_task** — Create a new task
- **wazi_complete_task** — Mark a task as completed

### Calendar
- **wazi_get_calendar_events** — Get Google Calendar events for a date range
- **wazi_ai_schedule_chat** — Chat with the AI scheduling assistant
- **wazi_confirm_booking** — Confirm a proposed calendar event

### Analytics
- **wazi_get_streaks** — Streak analytics across all journeys
- **wazi_get_weekly_trend** — Week-over-week completion trends
- **wazi_get_habit_rankings** — Habits ranked by consistency
- **wazi_get_day_of_week_stats** — Completion stats by day of week

## Resources

| URI | Description |
|-----|-------------|
| `wazi://profile` | User profile, premium status, and preferences |
| `wazi://today` | Today's plan with check-in status |
| `wazi://journeys` | All journeys with stats |

## Manual Configuration

If `init` doesn't auto-configure your MCP client, add this to your MCP settings:

```json
{
  "mcpServers": {
    "wazi": {
      "command": "npx",
      "args": ["-y", "@getwazi/mcp", "serve"]
    }
  }
}
```

## Security

- Tokens are encrypted at rest using AES-256-GCM with scrypt key derivation
- All credentials are stored in `~/.wazi/` with restrictive file permissions (0o600/0o700)
- Authentication uses the OAuth 2.0 Device Authorization Grant (RFC 8628)
- Logout revokes refresh tokens at Auth0 and clears local storage
- All inputs are validated with Zod schemas (UUID format, string length limits, date/time format)
- HTTPS enforced for all API communication
- HTTP requests have 30-second timeouts

Run `npx @getwazi/mcp logout` before uninstalling to clear stored tokens.

To report a security vulnerability, see [SECURITY.md](./SECURITY.md).

## Privacy

Wazi collects only the data necessary to track your habits, tasks, and journeys. See our [Privacy Policy](https://wazi.ca/privacy) for details.

## License

MIT