Skip to main content

MCP server for Habitica task and tag management

Project description

mcp-habitica

A Model Context Protocol (MCP) server for Habitica - enabling Claude to manage your tasks and tags.

Features

This MCP server provides tools for managing Habitica tasks and tags:

Task Operations

  • get_tasks - Get all tasks or filter by type (habits, dailys, todos, rewards)
  • get_task - Get a specific task by ID
  • create_task - Create a new task with title, notes, tags, and priority
  • update_task - Update an existing task
  • delete_task - Delete a task
  • score_task - Mark a task as complete or failed

Tag Operations

  • get_tags - Get all tags
  • get_tag - Get a specific tag by ID
  • create_tag - Create a new tag
  • update_tag - Update a tag name
  • delete_tag - Delete a tag

Installation

Using uv (recommended)

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install the package
uvx mcp-habitica

Using pip

pip install mcp-habitica

Configuration

1. Get Your Habitica API Credentials

  1. Log in to Habitica
  2. Go to Settings > Site Data
  3. Copy your User ID and API Token

2. Configure Environment Variables

Set the following environment variables:

export HABITICA_USER_ID="your-user-id"
export HABITICA_API_TOKEN="your-api-token"
export HABITICA_CLIENT_ID="your-user-id-mcp-habitica"  # Optional

3. Configure Claude Desktop

Add this to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

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

to run locally

{
  "mcpServers": {
    "mcp-habitica": {
      "command": "uv",
      "args": [
        "--directory",
        "<repo-folder>/mcp-habitica",
        "run",
        "mcp-habitica"
      ],
      "env": {
        "HABITICA_USER_ID": "your-user-id",
        "HABITICA_API_TOKEN": "your-api-token"
      }
    }
  }
}

Usage Examples

Once configured, you can ask Claude to manage your Habitica tasks:

  • "Show me all my todos"
  • "Create a todo: Finish the project report"
  • "Mark task [task-id] as complete"
  • "Create a tag called 'work'"
  • "Show all my tags"

API Reference

For detailed API documentation, visit the Habitica API Documentation.

Task Types

  • habit - Habits (positive/negative)
  • daily - Daily tasks
  • todo - To-dos
  • reward - Rewards

Task Priority Levels

  • 0.1 - Trivial
  • 1.0 - Easy (default)
  • 1.5 - Medium
  • 2.0 - Hard

Development

Setup

# Clone the repository
git clone https://github.com/yourusername/mcp-habitica.git
cd mcp-habitica

# Install dependencies
uv sync

# Run tests (when available)
uv run pytest

Project Structure

mcp-habitica/
├── src/
│   └── mcp_habitica/
│       ├── __init__.py
│       ├── habitica_client.py  # Habitica API client
│       └── server.py            # MCP server implementation
├── pyproject.toml
├── README.md
└── LICENSE

Publishing

For Maintainers

To publish a new version to PyPI:

Quick way:

./scripts/publish.sh

Manual way: See PUBLISH.md for detailed instructions.

Super quick: See QUICKSTART.md for TL;DR.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_habitica-0.2.0.tar.gz (59.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_habitica-0.2.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_habitica-0.2.0.tar.gz.

File metadata

  • Download URL: mcp_habitica-0.2.0.tar.gz
  • Upload date:
  • Size: 59.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for mcp_habitica-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fbf337c8df8513d5895480d9fb67abe08d0aa75d3d0c542066b079686faa1ac2
MD5 de03b3618ffb64c868bf95aa9a172896
BLAKE2b-256 207376e3fa97c49e8a231368de236c11d3ddc8e1839af7ff545fd6b7439a57ed

See more details on using hashes here.

File details

Details for the file mcp_habitica-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_habitica-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for mcp_habitica-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c0d49a174dd1d8d4feb57d0ad5a928d45c11170a484e3fb8df7c4901fc66cf7
MD5 5d48d1edc8ec5a990ed8383d707a17af
BLAKE2b-256 b3c251934c0728ccceccf59a3fcd63f8db7a63ecddbf0879ab39afa74e31fa65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page