MCP

MCP (Model Context Protocol) lets an AI assistant such as Claude use your HabitStats account: log a habit by asking, or ask how your month is going.

Status: the HabitStats MCP server isn't released yet. This page will have the setup steps when it is. Until then, the API below does everything it will do.

What it will do

It will use the same personal API tokens as the API, so you can revoke an assistant's access at any time from Settings → API tokens.

Today: the API

  1. Create a token in Settings → API tokens.
  2. Give your assistant (or your script) the token and the API reference at https://app.habitstats.app/api/docs. Assistants that can make HTTP requests, such as Claude Code, can work from the OpenAPI schema directly.

For example, to see your habits:

curl -H "Authorization: Bearer $TOKEN" "https://app.habitstats.app/api/habits"

More examples, and how to export your data, are in the docs.