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
- Log in to Habitica
- Go to Settings > Site Data
- 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 taskstodo- To-dosreward- Rewards
Task Priority Levels
0.1- Trivial1.0- Easy (default)1.5- Medium2.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
- Built with the Model Context Protocol SDK
- Inspired by mcp-obsidian
- Uses the Habitica API
Metadata
Release files for mcp-habitica 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_habitica-0.2.2.tar.gz | 59.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_habitica-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 67.6 kB
Release files / mcp_habitica-0.2.2.tar.gz
| Download URL | mcp_habitica-0.2.2.tar.gz |
|---|---|
| Size | 59.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
819f104d9c4f94024fe8d8ad5f6f5a617823abd1df72c26b4c6949aa50b4ca42
|
|
BLAKE2b-256 checksum How to use checksums |
cfeceb2a23758a8afcb437449e36925ecf1107883a8bba98780fccc3fbc2f837
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Release files / mcp_habitica-0.2.2-py3-none-any.whl
| Download URL | mcp_habitica-0.2.2-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab58370487c6a0c30a2b1f057eb0a59bfbaaabf1867f9060dba287404ec05b13
|
|
BLAKE2b-256 checksum How to use checksums |
a8187427424b4c1d65e9e746a4469a6da813c12c87ce9db2edf1ae5d085c1822
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Security for mcp-habitica 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.