habitca-mcp

habitca-mcp

Exposes the Habitica v3 API as MCP tools, allowing AI assistants to read and manage tasks, habits, dailies, rewards, pets, inventory, and notifications.

Category
访问服务器

README

habitca-mcp

A small Model Context Protocol server that exposes the Habitica v3 API as MCP tools, so MCP-aware AI assistants (Claude Code, Hermes Agent, Cursor, etc.) can read and update your Habitica tasks, habits, dailies, rewards, pets, inventory and notifications.

This is a clean rewrite of the original by iBreaker — same surface, no axios/zod/i18n, single-file Node, English-only output.

Install

git clone https://github.com/hxlair/habitca_mcp.git
cd habitca_mcp
npm install

Node 18 or newer is required (uses the built-in fetch).

Auth

You need your Habitica API credentials:

  1. Open https://habitica.com/user/settings/api
  2. Copy your User ID and API Token

Export them in the shell that will launch the server:

export HABITICA_USER_ID=...
export HABITICA_API_TOKEN=...

Optional:

export HABITICA_APP_ID=my-mcp-client      # sent as x-client header for Habitica analytics

Run

npm start
# or
./index.js

The server speaks MCP over stdio. It logs habitca-mcp ready to stderr once connected.

Wire into an MCP client

Claude Code / Hermes Agent / Cursor

Add to the client's MCP config:

{
  "mcpServers": {
    "habitca": {
      "command": "node",
      "args": ["/absolute/path/to/habitca_mcp/index.js"],
      "env": {
        "HABITICA_USER_ID": "...",
        "HABITICA_API_TOKEN": "..."
      }
    }
  }
}

For Hermes specifically:

hermes mcp add habitca \
  --env HABITICA_USER_ID=... \
  --env HABITICA_API_TOKEN=... \
  -- node /absolute/path/to/habitca_mcp/index.js

Tools

Tool Purpose
get_user_profile Full user document
get_stats HP / MP / XP / level / gold / class
get_tasks List tasks (optionally filter by habits / dailys / todos / rewards / completedTodos)
get_task Fetch one task by id
create_task Create habit/daily/todo/reward
update_task Update a task's fields
score_task Score a task up (default) or down
delete_task Delete a task
get_task_checklist List checklist items on a task
add_checklist_item Add a checklist item
update_checklist_item Edit text/completed on a checklist item
score_checklist_item Toggle checklist item complete
delete_checklist_item Remove a checklist item
get_tags / create_tag Tag CRUD (subset)
get_inventory / get_pets / get_mounts Inventory views
feed_pet / hatch_pet / equip_item Pet & gear actions
buy_reward / get_shop / buy_item Reward purchases
cast_spell Cast a class spell on self / a task / a party member
get_notifications / read_notification Notification handling
run_cron Trigger the daily cron manually

Differences from upstream

  • Single dependency — only @modelcontextprotocol/sdk. axios, zod and the i18n layer are gone.
  • English-only output messages.
  • x-client header sent so Habitica can attribute traffic back to the MCP.
  • Better errors — surfaces the Habitica API's message field instead of swallowing it.
  • Structured success messages — score_task returns the gold/exp/level deltas, create_task returns the new id, etc.
  • Adds get_task and run_cron; minor schema cleanups (priority enum, completedTodos filter).

License

MIT — same as upstream.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选