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
- 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"
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_habitica-0.2.1.tar.gz.
File metadata
- Download URL: mcp_habitica-0.2.1.tar.gz
- Upload date:
- Size: 59.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fa6751dc44b4aaa4e336d6cd786b23153ec38bb3092c97018323f43644ac080
|
|
| MD5 |
daa8537c5d41a1d669a75b0dc05eed9b
|
|
| BLAKE2b-256 |
c4fb60f4f33eceaf4fd59b8b14078ba5267894ae21682ce55ad50c943199d900
|
File details
Details for the file mcp_habitica-0.2.1-py3-none-any.whl.
File metadata
- Download URL: mcp_habitica-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0871f108f4082f08aad0b0eee70c96c4c2ac71bd6dcc24a7a0815eae25ad27db
|
|
| MD5 |
02cf8abb2f28f1246db732ae270d2ec2
|
|
| BLAKE2b-256 |
2ed7ad926da7b55597414bd17423e55a2f9b58a76e07736c64957cd8620d7a93
|