Skip to main content
Glama

habitica-mcp

An MCP server that lets LLMs (Claude, Cursor, VS Code Copilot, local models...) read and manage your Habitica tasks: habits, dailies, to-dos, rewards, checklists and tags. Written in Python with FastMCP.

Leer en español

Status: alpha (v0.1). Not affiliated with HabitRPG, Inc.

Why another Habitica MCP server?

Before starting this project we reviewed the existing ones (September 2026). The most popular server stopped being maintained in 2025 and no longer works because it does not send the x-client header Habitica now requires; the Python alternatives were single-file experiments. This server focuses on being correct, safe and maintainable:

  • Follows Habitica's API rules: always sends x-client, stays under the 30 requests/minute limit (and obeys Retry-After / X-RateLimit-*), never runs the day rollover (cron).

  • Safe by default: deleting, removing checklist items or tags and buying rewards return a preview until the model calls again with confirm=true. A read-only mode hides every write tool.

  • Designed for LLMs: few workflow-level tools, references by id or text ("mark meditation as done"), compact responses without Habitica's bulky history, and error messages that say what to do.

  • Tested and measured: an in-memory Habitica test double, a snapshot of the tool contract, live contract tests and LLM evals (see docs/measurement.md).

Related MCP server: Todoist MCP Server

Tools

Tool

What it does

Changes Habitica

habitica_get_overview

Stats, dailies due today, overdue/today/upcoming to-dos, habits, warnings

no

habitica_list_tasks

Filter by type, status (pending, due today, overdue, completed), tag, text

no

habitica_get_task

Full details of one task (checklist, schedule, dates)

no

habitica_list_tags

Tags and how many tasks use them

no

habitica_create_task

Create a habit, daily (with schedule), to-do (due date, checklist) or reward

yes

habitica_update_task

Change text, notes, difficulty, due date, schedule, tags...

yes

habitica_score_task

Check off / undo dailies and to-dos, +/- habits, buy rewards (confirm)

yes

habitica_manage_checklist

Add, rename, toggle or remove (confirm) checklist items

yes

habitica_manage_tags

Create, rename or delete (confirm) tags

yes

habitica_delete_task

Delete a task (confirm)

yes

Not exposed on purpose: cron, gems and payments, account resets, chat and party messages.

Quick start

  1. Install uv.

  2. In Habitica go to Settings > Site Data and copy your User ID and API Token.

  3. Check the connection:

    HABITICA_USER_ID=... HABITICA_API_TOKEN=... uvx habitica-mcp --check

    Until the first PyPI release, replace uvx habitica-mcp with uvx --from git+https://github.com/CDMonsalveA/habitica-mcp habitica-mcp.

Claude Desktop / Cursor

Add to claude_desktop_config.json (Claude Desktop) or ~/.cursor/mcp.json (Cursor):

{
  "mcpServers": {
    "habitica": {
      "command": "uvx",
      "args": ["habitica-mcp"],
      "env": {
        "HABITICA_USER_ID": "your-user-id",
        "HABITICA_API_TOKEN": "your-api-token"
      }
    }
  }
}

Claude Code

claude mcp add habitica -e HABITICA_USER_ID=your-user-id -e HABITICA_API_TOKEN=your-api-token -- uvx habitica-mcp

VS Code

.vscode/mcp.json (the token is asked for once and never stored in the repository):

{
  "inputs": [
    { "type": "promptString", "id": "habitica-token", "description": "Habitica API token", "password": true }
  ],
  "servers": {
    "habitica": {
      "type": "stdio",
      "command": "uvx",
      "args": ["habitica-mcp"],
      "env": {
        "HABITICA_USER_ID": "your-user-id",
        "HABITICA_API_TOKEN": "${input:habitica-token}"
      }
    }
  }
}

Then ask things like "What do I still have to do today in Habitica?", "Add a to-do to call the dentist on Friday, hard difficulty, with a checklist: find the number, ask about cleaning" or "I meditated, check it off".

Configuration

Variable

Default

Description

HABITICA_USER_ID

—

Your Habitica User ID (required to call Habitica)

HABITICA_API_TOKEN

—

Your Habitica API Token (required, never logged)

HABITICA_MCP_MODE

standard

read-only exposes only the four read tools

HABITICA_BASE_URL

https://habitica.com

Another Habitica instance (self-hosted or a test double)

HABITICA_X_CLIENT

<maintainer id>-habitica-mcp

Override the x-client header (for forks)

HABITICA_MCP_RATE_LIMIT

25

Max Habitica requests per minute (Habitica allows 30)

HABITICA_MCP_MAX_WAIT

30

Seconds a tool may wait for a free request slot before failing fast

HABITICA_MCP_CACHE_TTL

15

Seconds reads are reused between tool calls (0 disables)

HABITICA_MCP_TIMEOUT

20

Request timeout in seconds

HABITICA_MCP_LOG_LEVEL

WARNING

Logs go to stderr; INFO adds one metrics line per tool call

HABITICA_MCP_METRICS_FILE

—

Append per-call metrics (no task content) as JSON lines

Credentials stay on your machine: the server runs locally over stdio and only talks to Habitica.

Development

uv sync                      # install dependencies
uv run pre-commit install    # checks before every commit (see CONTRIBUTING.md)
uv run pytest                # unit, integration, protocol and stdio end-to-end tests
uv run ruff check . && uv run pyright
uv run python -m tests.fake_habitica --port 8765   # the Habitica test double, standalone
uv run pytest -m contract    # live tests (needs HABITICA_TEST_USER_ID / HABITICA_TEST_API_TOKEN)
uv run python -m evals run --driver ollama --model qwen3:8b          # LLM evals, local model
uv run python -m evals run --driver claude_code --model sonnet       # LLM evals, Claude subscription

Built on habiticalib models (also used by Home Assistant).

License

MIT

Available Tools

10 tools
habitica_create_taskHabitica: create a taskC

Create a habit, daily, to-do or reward. Tags are given by name.

Inputs: text (required), task_type (required), cost, tags, +8 more. Returns: task, status, message, created_tags

habitica_delete_taskHabitica: delete a taskA
Destructive

Permanently delete a task. Without confirm=true it only returns a preview: show it to the user and delete only after they agree.

Inputs: task (required), confirm. Returns: task, status, message, created_tags

habitica_get_overviewHabitica: today's overviewA
Read-onlyIdempotent

Snapshot of the user's Habitica day: character stats (HP, mana, XP, gold, level), dailies still due today, overdue / due-today / upcoming to-dos and habits, plus warnings such as a new day that has not started yet. Start here when the user asks what is pending or how they are doing.

Inputs: response_format. Returns: note, today, habits, player, +10 more

habitica_get_taskHabitica: get a taskA
Read-onlyIdempotent

Full details of one task: notes, checklist items with ids, schedule, tags and dates.

Inputs: task (required). Returns: id, cost, tags, text, +20 more

habitica_list_tagsHabitica: list tagsA
Read-onlyIdempotent

List the user's tags with how many active tasks use each one.

Inputs: no named parameters. Returns: tag, tags, status, message

habitica_list_tasksHabitica: list tasksA
Read-onlyIdempotent

List the user's tasks with filters. Prefer filters over listing everything; returned ids can be passed to the other habitica_* tools.

Inputs: tag, limit, search, status, +2 more. Returns: note, tasks, truncated, total_matching

habitica_manage_checklistHabitica: edit a checklistA
Destructive

Add, rename, check/uncheck or remove checklist items of a daily or to-do. Returns the task with its checklist item ids.

Inputs: task (required), action (required), item, text, +1 more. Returns: task, status, message, created_tags

habitica_manage_tagsHabitica: create, rename or delete tagsA
Destructive

Create, rename or delete a tag. To tag tasks use habitica_update_task(add_tags=...).

Inputs: action (required), tag, name, confirm. Returns: tag, tags, status, message

habitica_score_taskHabitica: check off / score a taskA

Record progress: check off or undo a daily or to-do, press + or - on a habit, or buy a custom reward. Returns the character's stats after scoring and what changed.

Inputs: task (required), confirm, direction. Returns: drop, task, stats, status, +4 more

habitica_update_taskHabitica: update a taskA
Idempotent

Change fields of a task; only the given fields change. To check tasks off use habitica_score_task, and habitica_manage_checklist for checklist items.

Inputs: task (required), cost, text, notes, +9 more. Returns: task, status, message, created_tags

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: overview vs. filtered listing, single-task detail, task CRUD, scoring, checklist management, and tag management are all separated. The potentially overlapping update_task vs. score_task boundary is explicitly clarified in the descriptions.

    Naming Consistency5/5

    All tool names use a consistent habitica_ prefix followed by snake_case verb_noun patterns such as get_task, create_task, update_task, and list_tags. The manage_* tools are slightly aggregate but still follow the same predictable convention.

    Tool Count5/5

    Ten tools is a well-scoped surface for Habitica task, scoring, checklist, and tag workflows. Each tool covers a meaningful operation without excessive fragmentation.

    Completeness5/5

    The surface covers task CRUD, scoring/progress, checklist item lifecycle, tag listing and management, and a daily overview snapshot. Core Habitica task-management workflows are complete, with no obvious dead ends for the stated purpose.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables AI assistants to interact with the Habitica API to manage tasks, track habits, and engage in gamified productivity features like pet raising and inventory management. It allows users to control their Habitica account through natural language for a personalized and automated productivity experience.
      26
      18 npm
      26
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables AI assistants to manage Habitify habits, journals, moods, and notes through the Habitify API, with tools for adding, deleting, and retrieving habit logs and other data.
      124 npm
      8
      MIT