Skip to main content
Glama

habitca-mcp

Habitica v3 APIをMCPツールとして公開する小さなModel Context Protocolサーバーです。これにより、MCP対応のAIアシスタント(Claude Code、Hermes Agent、Cursorなど)がHabiticaのタスク、習慣、デイリー、報酬、ペット、インベントリ、通知を読み取り、更新できるようになります。

これはiBreakerによるオリジナル版をクリーンに書き直したものです。インターフェースは同じですが、axios/zod/i18nを使用せず、単一ファイルのNode.jsで構成され、出力は英語のみです。

インストール

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

Node 18以降が必要です(組み込みの fetch を使用するため)。

認証

HabiticaのAPI認証情報が必要です:

  1. https://habitica.com/user/settings/api を開きます

  2. User IDAPI Token をコピーします

サーバーを起動するシェルでこれらをエクスポートします:

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

オプション:

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

実行

npm start
# or
./index.js

サーバーはstdio経由でMCPと通信します。接続が確立されると、stderrに habitca-mcp ready とログが出力されます。

MCPクライアントへの接続

Claude Code / Hermes Agent / Cursor

クライアントのMCP設定に追加します:

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

Hermesの場合:

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

ツール

ツール

目的

get_user_profile

ユーザー情報の全取得

get_stats

HP / MP / XP / レベル / ゴールド / クラス

get_tasks

タスク一覧の取得(habits / dailys / todos / rewards / completedTodos でフィルタリング可能)

get_task

IDによるタスクの取得

create_task

習慣/デイリー/ToDo/報酬の作成

update_task

タスクのフィールド更新

score_task

タスクのスコア付け(up(デフォルト)または down

delete_task

タスクの削除

get_task_checklist

タスクのチェックリスト項目一覧

add_checklist_item

チェックリスト項目の追加

update_checklist_item

チェックリスト項目のテキスト/完了状態の編集

score_checklist_item

チェックリスト項目の完了切り替え

delete_checklist_item

チェックリスト項目の削除

get_tags / create_tag

タグのCRUD(サブセット)

get_inventory / get_pets / get_mounts

インベントリの表示

feed_pet / hatch_pet / equip_item

ペットと装備のアクション

buy_reward / get_shop / buy_item

報酬の購入

cast_spell

自分/タスク/パーティメンバーへのクラス呪文の詠唱

get_notifications / read_notification

通知の処理

run_cron

デイリーのcronを手動でトリガー

上流版との違い

  • 単一の依存関係@modelcontextprotocol/sdk のみ。axios、zod、i18nレイヤーは削除されました。

  • 英語のみ の出力メッセージ。

  • x-client ヘッダー を送信し、HabiticaがMCPからのトラフィックを識別できるようにしました。

  • より優れたエラー処理 — Habitica APIの message フィールドを隠さず表示します。

  • 構造化された成功メッセージscore_task はゴールド/経験値/レベルの変動を返し、create_task は新しいIDを返すなど。

  • get_taskrun_cron を追加。スキーマの軽微な整理(優先度enum、completedTodosフィルター)。

ライセンス

MIT — 上流版と同じです。

Install Server
F
license - not found
B
quality
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leon-jarvis1/habitca_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server