Cover image for How to Connect WizardHabits to Other Apps with MCP
WizardHabits Team

How to Connect WizardHabits to Other Apps with MCP

Set up WizardHabits as an MCP server, generate your API key in Settings, and connect external tools for habit automation.

If you use AI tools, automation platforms, or custom scripts, you can now connect them directly to your WizardHabits account through MCP.

In this guide, you’ll learn how to:

  1. Generate an MCP API key in your WizardHabits settings.
  2. Connect an external MCP-capable app.
  3. Read and update habits from that app.
  4. Keep your account secure while using integrations.

What MCP Gives You

MCP (Model Context Protocol) provides a standard way for external apps to call tools in your account.

With WizardHabits MCP, connected apps can:

  • List your habits
  • Create and update habits
  • Archive and unarchive habits
  • Toggle habit completion
  • Read completion and skip history in date ranges

That means you can build flows like:

  • "When I finish a Pomodoro, mark my deep-work habit complete."
  • "If I miss two days, create a follow-up task in another app."
  • "Summarize my completion data every Sunday."

Step 1: Generate Your API Key

Inside WizardHabits:

  1. Open your dashboard.
  2. Click your profile icon in the top-right navigation.
  3. Click Settings.
  4. In the MCP API Key card, click Generate API Key.

You’ll see the full key one time. Copy it and store it in your password manager or secrets manager.

If you regenerate later, the old key stops working immediately.

Step 2: Configure Your MCP Client

Your MCP endpoint is:

POST /api/mcp

Use this header for authentication:

Authorization: Bearer wh_mcp_...

Your client should use JSON-RPC over HTTP and call:

  • initialize
  • tools/list
  • tools/call

Step 3: Call WizardHabits Tools

After connection, start with tools/list to discover available operations.

Then call tools/call with one of these tool names:

  • list_habits
  • create_habit
  • update_habit
  • archive_habit
  • unarchive_habit
  • toggle_habit_completion
  • list_completions
  • list_skips

Example: Mark a Habit Complete

Use tools/call with:

{
  "name": "toggle_habit_completion",
  "arguments": {
    "habit_id": "your-habit-uuid",
    "date": "2026-02-19"
  }
}

If there is already a completion for that date, the same call will remove it. This makes automation flows easier because the action is idempotent around current state.

Security Best Practices

Treat your API key like a password:

  • Never paste it into shared chats or public logs.
  • Store it in environment variables or a secret vault.
  • Regenerate it immediately if you suspect exposure.
  • Rotate periodically as part of your normal security routine.

Suggested First Automation

Start simple:

  1. Pick one habit that is easy to detect externally (for example, a coding session or workout).
  2. Connect your MCP client.
  3. Trigger toggle_habit_completion from your external app when that event happens.
  4. Review your streak quality after one week.

You’ll quickly see where automation helps and where manual check-ins still give better signal.

If you build something useful with WizardHabits MCP, share it with us. The best workflows usually start from one tiny automation that removes daily friction.

Related Posts

Ready to start your journey?

Join thousands of wizards building better habits today.

Create Your Account