
一个模型上下文协议(MCP)服务器,让AI助手能够无缝与Habitica API交互——创建任务、追踪习惯、养宠物并享受游戏化的生产力。
概览
一个模型上下文协议(MCP)服务器,让AI助手能够无缝与Habitica API交互——创建任务、追踪习惯、养宠物并享受游戏化的生产力。 - 📋 – 创建/查看/更新/删除所有任务类型 - ✅ – 添加、更新、删除和评分任务清单中的项目 - 🎯 记录习惯完成情况并建立健康习惯 - 🐾 – 孵化和喂养宠物,观察它们成长 - 🏇 管理和装备各种坐骑 - 🛍️ 浏览和购买游戏内物品 - ⚡ 施放职业技能以提升游戏体验 - 👤 – 获取详细的用户信息和统计数据 - 🏷️ – 创建和管理标签以提升组织性 - 📬 – 阅读和管理系统通知 - 📦 – 列出您拥有的每一项物品和设备 - 🧠 – 通过对话操作Habitica - 📝 – AI可以按需创建任务 - 📈 – 自动跟踪和总结进展 - 🎨 – 根据你的习惯提供定制建议 - Node.js 18+ - npm或纱线 - 有效的Habitica账户 1. 登录Habitica 2.
概述(AI 翻译)
中文文档请阅读 README.zh-CN.md
一个模型上下文协议(MCP)服务器,让AI助手能够无缝与Habitica API交互——创建任务、追踪习惯、养宠物并享受游戏化的生产力。
✨ 特色
🎮 核心玩法特色
- 📋 智能任务管理 – 创建/查看/更新/删除所有任务类型
- ✅ 清单管理——添加、更新、删除和评分任务中的清单项目
- 🎯 习惯追踪——记录习惯完成情况并建立健康的日常习惯
- 🐾 养宠物——孵化并喂养宠物,观察它们成长
- 🏇 坐骑收集 – 管理和装备各种坐骑
- 🛍️ 购物与奖励 – 浏览并购买游戏内物品
- ⚡ 技能系统——施放职业技能以增强游戏体验
📊 面向数据的功能
- 👤 用户档案 – 获取详细用户信息和统计数据
- 🏷️ 标签管理——创建和管理标签以提升组织性
- 📬 通知中心 – 读取和管理系统通知
- 📦 库存——列出你拥有的每一件物品和设备
🤖 人工智能集成亮点
- 🧠 自然语言控制 – 通过对话操作Habitica
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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
🚀 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-server
- Install dependencies
npm install
-
Set 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 dev
MCP 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"
安装
npx -y habitica-mcp-server配置
{
"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
}
}
}
}