Habitica MCP for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Habitica MCP or direct API to create tasks, update habits, fetch your progress, and reward completed goals through natural language.
Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Habitica Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Try Habitica now

Enter a prompt below to test the integration in our Tool Router playground. You'll be redirected to sign in and try it live.

Supported Tools

Tools
Add Task to ChallengeTool to add a new task to a specified challenge.
Add Push DeviceTool to register a push notification device for the authenticated user.
Add Tag to TaskTool to add a tag to a task.
Clone ChallengeTool to clone an existing challenge.
Create ChallengeTool to create a new challenge.
Create Habitica PartyCreate a new Habitica party for collaborative gameplay.
Create TagTool to create a new tag.
Create TaskCreate a new task in Habitica.
Create WebhookTool to create a new webhook for taskActivity events.
Delete Habitica ChallengePermanently delete a Habitica challenge.
Leave or Delete Habitica GroupLeave or delete a Habitica group (party or guild).
Delete Group Chat MessageTool to delete a chat message from a Habitica group (party, guild, or Tavern).
Delete Habitica TagTool to delete a tag for the authenticated user.
Delete TaskPermanently deletes a user's task (habit, daily, todo, or reward) by its ID.
Delete Task Checklist ItemTool to delete a checklist item from a task.
Delete User MessageTool to delete a message from the authenticated user's inbox by its ID.
Delete User Push DeviceTool to remove a push device registration from the authenticated user's account.
Equip ItemTool to equip or unequip gear, pets, mounts, or costume items in Habitica.
Export Challenge to CSVTool to export a Habitica challenge to CSV format.
Get ChallengeTool to retrieve details of a specific challenge.
Get Group ChallengesTool to retrieve challenges available in a specific group (guild, party, or tavern).
Get Task by IDRetrieve a task by its unique ID.
Get Challenge TasksTool to get all tasks for a specified challenge.
Get ContentRetrieves all Habitica game content definitions in a single request.
Get Content By TypeRetrieves Habitica game content data filtered by a specific category type.
Get Export History CSVTool to export user tasks history in CSV format.
Get Export Inbox HTMLTool to export inbox data in HTML format from Habitica.
Export User Data JSONExports the authenticated user's complete data in JSON format.
Get GroupRetrieves detailed information about a Habitica group (guild or party).
Get Group MembersRetrieve members of a Habitica group (guild or party).
Get Habitica GroupsRetrieves Habitica groups based on type.
Get Habitica Tavern GroupTool to retrieve the Habitica Tavern (habitrpg) group details.
Get Party Chat MessagesTool to retrieve party chat messages from Habitica.
Get Model PathsRetrieves all available field paths and their data types for a specified Habitica model.
Get NewsTool to retrieve the latest Bailey announcement from Habitica.
Get PartyRetrieves the authenticated user's party details from Habitica.
Get Shops Market GearTool to retrieve the available gear for purchase in the market shop.
Get Time Travelers ShopTool to retrieve available items in the Time Travelers shop.
Get Habitica API StatusTool to check Habitica API server status.
Get TagsRetrieve all tags for the authenticated Habitica user.
Get TasksTool to retrieve all tasks for the authenticated user.
Get User ChallengesTool to retrieve challenges the authenticated user participates in.
Get User ProfileRetrieves the authenticated user's complete Habitica profile.
Get WebhooksRetrieves all webhooks configured for the authenticated Habitica user.
Get World StateRetrieves the current state of the Habitica game world including active events, world boss status, and seasonal NPC visual themes.
Invite To GroupTool to invite users to a specific group.
Invite To QuestTool to invite party members to a quest.
Join ChallengeTool to join a challenge.
Leave ChallengeTool to leave a Habitica challenge.
Local LoginTool to authenticate a user via local credentials.
Local User RegistrationTool to register a new Habitica user via email and password.
Mark Group Chat SeenTool to mark all chat messages as read/seen for a specific group.
Mark Notification SeenTool to mark a single notification as seen in Habitica.
Mark Notifications SeenMarks specific notifications as read/seen in Habitica.
Move Pinned ItemTool to move a pinned item in the rewards column to a new position.
Move Task To PositionMove a Habitica task to a new position in the task list.
Dismiss Bailey AnnouncementTool to dismiss the latest Bailey announcement in Habitica, allowing it to be read later.
Reset User AccountResets the authenticated user's account to starting state.
Read CardTool to mark a card as read in Habitica.
Remove Party MemberRemoves a member from the authenticated user's party.
Score TaskScore a Habitica task to mark it as completed or incomplete.
Social AuthTool to authenticate a user via a social provider.
Subscribe WebhookTool to enable (subscribe) an existing webhook by ID for the authenticated user.
Unlink All Challenge TasksTool to unlink all tasks from a Habitica challenge.
Update GroupTool to update a Habitica group (party or guild) by modifying its properties.
Update TagTool to update an existing tag's name.
Update TaskUpdate an existing task in Habitica.
Update Task Checklist ItemTool to update a checklist item in a task.
Update UserUpdate the authenticated user's profile, preferences, flags, and other settings in Habitica.
Validate Coupon CodeValidate a Habitica coupon code to check if it is valid and active.
Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Habitica tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Create a new daily task called "Exercise" that repeats every weekday')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Why Use Composio?

AI Native Habitica Integration

  • Supports both Habitica MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Habitica data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Habitica access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Habitica
  • Scoped, least privilege access to Habitica resources
  • Full audit trail of agent actions to support review and compliance

Frequently Asked Questions

Do I need my own developer credentials to use Habitica with Composio?

Yes, Habitica requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.