Habitica
FreeNot checkedHabitica MCP server built with Effect v4, currently exposing a hello-world tool, resource, and prompt over stdio for early development and testing.
About
Habitica MCP server built with Effect v4, currently exposing a hello-world tool, resource, and prompt over stdio for early development and testing.
README
Habitica Model Context Protocol server built with Effect v4 beta.
The server exposes typed Habitica read/write tools over stdio. Tool handlers
depend on an Effect HabiticaGateway port; the live adapter uses Effect HTTP
and schema-decodes Habitica API responses at the boundary.
Requirements
- Node.js
>=22.12.0 - pnpm
>=10
This repo uses pnpm rather than bun because the server runs on Node stdio, the lockfile is already deterministic, and the Effect MCP docs target Node runtime primitives.
Install
pnpm add -g habitica-mcp@alpha
For local development:
pnpm install
Required variables:
HABITICA_USER_IDHABITICA_API_TOKENHABITICA_CLIENT_IDHABITICA_API_BASE_URLdefaults tohttps://habitica.com/api/v3
For a local checkout, copy the example env file and fill in your Habitica credentials:
cp .env.example .env
Commands
pnpm dev # run the stdio MCP server from TypeScript
pnpm build # emit dist
pnpm check # full deterministic gate used by Lefthook
pnpm test # run unit tests
pnpm test:coverage # run unit tests with 100% coverage threshold
pnpm e2e # run strict effect-bdd Gherkin tests
pnpm mutation # run Stryker with 100% mutation threshold
pnpm e2e is a deterministic fake-gateway suite. It exercises the full MCP tool
handler surface without live Habitica credentials or network calls.
Deterministic Gate
pnpm check runs build, typecheck, suppression policy, deterministic scope
policy, custom oxlint RuleTester coverage, oxlint, format check, 100% unit
coverage, strict effect-bdd Gherkin e2e, 100% Stryker mutation coverage for
the deterministic core, and knip.
Lefthook runs pnpm check on pre-commit:
pnpm prepare
GitHub Actions runs the same pnpm check gate on pushes to main and pull
requests.
Tool Surface
HelloWorldTool returns a deterministic greeting and does not require Habitica
credentials. Use it as the first MCP smoke test.
Core tools cover profile, stats, tasks, tags, checklists, and notifications. Expanded tools cover rewards, inventory, shop items, pets, mounts, and skills.
Mutating tools use explicit verb names such as CreateTaskTool,
UpdateTaskTool, DeleteTaskTool, ScoreTaskTool, ReadNotificationTool,
BuyRewardTool, and CastSkillTool. They request approval and return typed
structured results.
Architecture Guardrails
- MCP stdout is protocol-owned; logs go to stderr.
- Tools import
HabiticaGateway, notHabiticaHttpAdapteror raw route strings. - Habitica credentials and auth headers must never be logged.
- Every
Tool.makecall declares a success schema. - Deterministic modules must be listed in coverage and mutation scope.
MCP Config
Use the local TypeScript entrypoint while developing:
{
"mcpServers": {
"habitica": {
"command": "pnpm",
"args": ["--dir", "/absolute/path/to/habitica-mcp", "dev"]
}
}
}
After pnpm build, use the package binary:
{
"mcpServers": {
"habitica": {
"command": "node",
"args": ["/absolute/path/to/habitica-mcp/dist/main.js"]
}
}
}
After installing from npm, use the binary:
{
"mcpServers": {
"habitica": {
"command": "habitica-mcp"
}
}
}
Publishing
This package is intentionally pre-1.0. Publish early builds with the manual
Publish GitHub Actions workflow. It uses the repository NPM_TOKEN secret,
runs pnpm check, and publishes with npm provenance on the alpha dist-tag.
Equivalent local command:
pnpm check
npm publish --tag alpha --provenance
prepack builds dist/; publishConfig marks the package public and enables npm provenance.
Install Habitica in Claude Desktop, Claude Code & Cursor
unyly install habitica-mcpInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add habitica-mcp -- npx -y habitica-mcpFAQ
Is Habitica MCP free?
Yes, Habitica MCP is free — one-click install via Unyly at no cost.
Does Habitica need an API key?
No, Habitica runs without API keys or environment variables.
Is Habitica hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Habitica in Claude Desktop, Claude Code or Cursor?
Open Habitica on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Habitica with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
