habitica-mcp
The habitica-mcp server provides MCP tools to interact with the Habitica API (a gamified task management platform) via the Model Context Protocol over stdio. It enables external applications to manage various aspects of a Habitica account, including:
Smoke testing: A
GreetingTool/HelloWorldToolreturns a deterministic greeting to verify the MCP server is running correctly without requiring credentials.User data: Read and manage user profiles and statistics.
Tasks: Create, read, update, delete, and score tasks; manage tags and checklists.
Notifications: Read notifications.
Rewards & Shop: Buy rewards, browse shop items, and interact with inventory.
Pets & Mounts: Interact with Habitica pets and mounts.
Skills: Cast character skills.
Most operations require Habitica credentials.
Click on "Install 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-mcpsay hello"
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
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.0pnpm
>=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.
Related MCP server: Basic MCP Server
Install
pnpm add -g habitica-mcp@alphaFor local development:
pnpm installRequired 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 .envCommands
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 thresholdpnpm 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 prepareGitHub 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 --provenanceprepack builds dist/; publishConfig marks the package public and enables npm provenance.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/tatemz/habitica-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server