Habitica MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Habitica MCP Server I just finished my morning workout, please mark it as done"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Habitica MCP Server
中文文档请阅读 README.zh-CN.md
A Model Context Protocol (MCP) server that lets AI assistants seamlessly interact with the Habitica API – create tasks, track habits, raise pets and enjoy gamified productivity.
✨ Features
🎮 Core Gameplay Features
📋 Smart task management – create / view / update / delete all task types
✅ Checklist management – add, update, delete and score checklist items within tasks
🎯 Habit tracking – record habit completions and build healthy routines
🐾 Pet raising – hatch and feed pets, watch them grow
🏇 Mount collection – manage and equip all kinds of mounts
🛍️ Shop & rewards – browse and buy in-game items
⚡ Skill system – cast class skills to enhance gameplay
📊 Data-oriented Features
👤 User profile – fetch detailed user information and stats
🏷️ Tag management – create and manage tags for better organisation
📬 Notification centre – read and manage system notifications
📦 Inventory – list every item and piece of equipment you own
🤖 AI Integration Highlights
🧠 Natural-language control – operate Habitica via conversation
📝 Task suggestions – AI can create tasks on demand
📈 Progress reporting – automatically track and summarise progress
🎨 Personalised experience – tailored recommendations based on your habits
Related MCP server: habitca-mcp
🚀 Quick Start
Prerequisites
Node.js 18+
npm or yarn
A valid Habitica account
Installation
Clone the repo
git clone https://github.com/ibreaker/habitica-mcp-server.git
cd habitica-mcp-serverInstall dependencies
npm installSet API credentials (see next section)
Start the server
npm start⚙️ Configuration
Get Habitica API credentials
Log into Habitica
Click your avatar → Settings
Open the API tab
Copy User ID and API Token
Environment variables
Method A: export variables
export HABITICA_USER_ID="your-user-id"
export HABITICA_API_TOKEN="your-api-token"Method B: .env file
HABITICA_USER_ID=your-user-id
HABITICA_API_TOKEN=your-api-token⚠️ Security tip: never commit your API keys to version control.
🎯 Usage
Start the server
# Production
npm start
# Development (with reload)
npm run devMCP client integration
The server follows the MCP spec and works with any AI client that supports MCP. Example Claude Desktop config:
{
"mcpServers": {
"habitica-mcp-server": {
"command": "npx",
"args": ["-y", "habitica-mcp-server"],
"env": {
"HABITICA_USER_ID": "your-id",
"HABITICA_API_TOKEN": "your-token",
"MCP_LANG": "en" // or zh-CN
}
}
}
}Example dialogue
User: "Create a habit for learning Python"
AI: "Sure, the habit has been created!"
User: "Show me today's tasks"
AI: "Here is your task list for today…"
User: "Add a checklist item to my project task: 'Review code'"
AI: "Added checklist item 'Review code' to your project task!"
User: "I finished my workout, please record it"
AI: "Great job! The workout is logged."🛠️ Available Tools
User Related
get_user_profile: Get user profile informationget_stats: Get user statisticsget_inventory: Get inventory list
Task Management
get_tasks: Get task list (can specify type: habits, dailys, todos, rewards)create_task: Create new taskupdate_task: Update taskdelete_task: Delete taskscore_task: Complete task or record habit
Checklist Management
get_task_checklist: Get checklist items for a taskadd_checklist_item: Add checklist item to taskupdate_checklist_item: Update checklist itemdelete_checklist_item: Delete checklist itemscore_checklist_item: Score checklist item (mark complete/incomplete)
Tag Management
get_tags: Get tag listcreate_tag: Create new tag
Pets and Mounts
get_pets: Get pet listfeed_pet: Feed pethatch_pet: Hatch petget_mounts: Get mount listequip_item: Equip pet, mount or equipment
Shop and Purchases
get_shop: Get shop item listbuy_item: Buy shop itembuy_reward: Buy reward
Notification Management
get_notifications: Get notification listread_notification: Mark notification as read
Skill System
cast_spell: Cast spell
📖 API Usage Examples
Create Task
{
"type": "todo",
"text": "Complete project documentation",
"notes": "Including API docs and user guide",
"difficulty": 1.5,
"priority": 2,
"checklist": [
{"text": "Write API documentation", "completed": false},
{"text": "Create user guide", "completed": false},
{"text": "Review and proofread", "completed": false}
]
}Complete Task
{
"taskId": "task-id-here",
"direction": "up"
}Get Specific Task Type
{
"type": "todos"
}Pet Management
{
"pet": "Wolf-Base",
"food": "Meat"
}Buy Item
{
"itemKey": "armor_warrior_1",
"quantity": 1
}Checklist Management
// Add checklist item
{
"taskId": "task-id-here",
"text": "Research requirements"
}
// Update checklist item
{
"taskId": "task-id-here",
"itemId": "checklist-item-id",
"text": "Updated item text",
"completed": true
}
// Score checklist item (toggle completion)
{
"taskId": "task-id-here",
"itemId": "checklist-item-id"
}Task Types
habit: Habit (can be recorded positively or negatively)daily: Daily task (resets every day)todo: To-do item (one-time task)reward: Reward (can be purchased with gold)
Difficulty Levels
0.1: Easy1: Medium1.5: Hard2: Extreme
Priority Levels
0.1: Low1: Medium1.5: High2: Extreme
🔧 Troubleshooting
Common Issues
Issue: Server startup failed
Solution:
1. Check Node.js version is 18+
2. Confirm environment variables are set correctly
3. Verify API credentials are validIssue: API call failed
Solution:
1. Check network connection
2. Verify Habitica API credentials
3. Confirm API rate limits haven't been exceededIssue: Task or pet not found
Solution:
1. Confirm task ID is correct
2. Check if task exists in Habitica
3. Verify user permissionsDebug Mode
# Enable verbose logging
DEBUG=* npm startGet Help
📚 Check Habitica API Documentation
🐛 Submit Issues
🤝 Contributing
We welcome all forms of contributions!
How to Contribute
Fork this project
Create feature branch (
git checkout -b feature/AmazingFeature)Commit changes (
git commit -m 'Add some AmazingFeature')Push to branch (
git push origin feature/AmazingFeature)Create Pull Request
Development Guidelines
Follow existing code style
Add appropriate tests
Update relevant documentation
Ensure all tests pass
📄 License
This project is open source under the MIT License - see the LICENSE file for details.
🌟 Acknowledgments
Thanks to Habitica for providing an excellent API
Thanks to Anthropic for the MCP protocol
Thanks to all contributors and users for their support
Available Tools
26 toolsadd_checklist_itemC
Add checklist item to task
Inputs: taskId (required), text (required).
buy_itemC
购买商店物品
Inputs: itemKey (required), quantity.
buy_rewardD
Buy reward
Inputs: key (required).
cast_spellD
Cast spell
Inputs: spellId (required), targetId.
create_tagC
Create tag
Inputs: name (required).
create_taskD
Create new task
Inputs: type (required), text (required), notes, difficulty, +2 more.
delete_checklist_itemD
Delete checklist item
Inputs: taskId (required), itemId (required).
delete_taskD
Delete task
Inputs: taskId (required).
equip_itemD
装备物品
Inputs: type (required), key (required).
feed_petC
喂养宠物
Inputs: pet (required), food (required).
get_inventoryD
Get inventory
Inputs: no named parameters.
get_mountsC
获取坐骑列表
Inputs: no named parameters.
get_notificationsC
获取通知列表
Inputs: no named parameters.
get_petsC
获取宠物列表
Inputs: no named parameters.
get_shopC
获取商店物品
Inputs: shopType.
get_statsC
Get user stats
Inputs: no named parameters.
get_tagsC
Get tags list
Inputs: no named parameters.
get_task_checklistC
Get task checklist items
Inputs: taskId (required).
get_tasksC
Get tasks list
Inputs: type.
get_user_profileC
Get user profile
Inputs: no named parameters.
hatch_petC
孵化宠物
Inputs: egg (required), hatchingPotion (required).
read_notificationC
标记通知为已读
Inputs: notificationId (required).
score_checklist_itemC
Score checklist item (mark complete/incomplete)
Inputs: taskId (required), itemId (required).
score_taskC
Score task / habit
Inputs: taskId (required), direction.
update_checklist_itemD
Update checklist item
Inputs: taskId (required), itemId (required), text, completed.
update_taskD
Update task
Inputs: taskId (required), text, notes, completed.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Most tools have distinct purposes targeting specific Habitica resources like tasks, checklist items, pets, mounts, inventory, and user data. However, some potential overlap exists between 'score_task' and 'score_checklist_item' as both involve scoring/marking items, though they target different resource levels. Overall, the descriptions clearly differentiate the tools.
The naming follows a mostly consistent verb_noun pattern (e.g., create_task, delete_task, get_tasks), but there is inconsistency in language with some tools in Chinese (e.g., '购买商店物品' for buy_item, '装备物品' for equip_item) and others in English. This mixed language usage reduces predictability and readability, though the verb_noun structure is generally maintained.
With 26 tools, the count is on the higher side for an MCP server, bordering on heavy. While Habitica is a feature-rich platform with tasks, pets, mounts, inventory, and user management, the tool set might be slightly over-scoped, potentially leading to complexity for agents. It's not extreme, but it feels borderline for efficient use.
The tool set provides comprehensive coverage of Habitica's core domain, including full CRUD operations for tasks and checklist items, user profile and stats management, inventory and shop interactions, pet and mount handling, and notification management. There are no obvious gaps; agents can perform typical workflows like task creation, scoring, and resource management without dead ends.
Maintenance
Related MCP Connectors
Manage your MakeMeBetter AI tasks, habits, and goals from your AI assistant.
Manage tasks, Focus Zone, notes, projects, and task history from compatible AI assistants.
View and manage Power Day Planner tasks and habits from your AI assistant.
Read and change your Habidu daily plan: tasks, inbox, routines, streak, journal and the AI coach.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to manage Todoist tasks, projects, sections, labels, and comments through natural language conversations, providing complete control over your productivity workflow via the Todoist API.7MIT
- AlicenseBqualityDmaintenanceExposes the Habitica v3 API as MCP tools, allowing AI assistants to read and manage tasks, habits, dailies, rewards, pets, inventory, and notifications.28MIT
- AlicenseNot gradedqualityFmaintenanceEnables 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.8MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to integrate with the Habitify API for tracking habits, managing mood logs, creating notes, and automating habit tracking workflows.MIT