home / skills / openclaw / skills / monarch-money

monarch-money skill

/skills/davideasaf/monarch-money

This skill helps you manage Monarch Money transactions, categorize spending, and automate budget tasks by guiding searches and updates.

npx playbooks add skill openclaw/skills --skill monarch-money

Review the files below or copy the command above to add this skill to your agents.

Files (63)
SKILL.md
4.7 KB
---
name: monarch-money
description: TypeScript library and CLI for Monarch Money budget management. Search transactions by date/merchant/amount, update categories, list accounts and budgets, manage authentication. Use when user asks about Monarch Money transactions, wants to categorize spending, needs to find specific transactions, or wants to automate budget tasks.
metadata:
  clawdbot:
    requires:
      env: ["MONARCH_EMAIL", "MONARCH_PASSWORD", "MONARCH_MFA_SECRET"]
    install:
      - id: node
        kind: node
        package: "."
        bins: ["monarch-money"]
        label: "Install Monarch Money CLI"
---

# Monarch Money

CLI and TypeScript library for Monarch Money budget automation.

## Prerequisites

### Environment Variables (Required)

| Variable | Required | Description |
|----------|----------|-------------|
| `MONARCH_EMAIL` | **Yes** | Monarch Money account email |
| `MONARCH_PASSWORD` | **Yes** | Monarch Money account password |
| `MONARCH_MFA_SECRET` | **Yes** | TOTP secret for MFA (see below) |

### Getting Your MFA Secret

Monarch Money requires MFA. Generate the TOTP secret:

1. Login to https://app.monarchmoney.com
2. Go to Settings > Security > Two-Factor Authentication
3. If MFA is already enabled: disable and re-enable to get a new secret
4. When shown the QR code: click "Can't scan? View setup key"
5. Copy the secret key (base32 string like `JBSWY3DPEHPK3PXP`)
6. Complete MFA setup in Monarch Money with an authenticator app
7. Set the secret: `export MONARCH_MFA_SECRET="YOUR_SECRET"`

## Quick Start

```bash
# Check setup
monarch-money doctor

# Login (uses env vars by default)
monarch-money auth login

# List transactions
monarch-money tx list --limit 10

# List categories
monarch-money cat list
```

## CLI Commands

### Authentication

```bash
# Login with environment variables
monarch-money auth login

# Login with explicit credentials
monarch-money auth login -e [email protected] -p password --mfa-secret SECRET

# Check auth status
monarch-money auth status

# Logout
monarch-money auth logout
```

### Transactions

```bash
# List recent transactions
monarch-money tx list --limit 20

# Search by date
monarch-money tx list --start-date 2026-01-01 --end-date 2026-01-31

# Search by merchant
monarch-money tx list --merchant "Walmart"

# Get transaction by ID
monarch-money tx get <transaction_id>

# Update category
monarch-money tx update <id> --category <category_id>

# Update merchant name
monarch-money tx update <id> --merchant "New Name"

# Add notes
monarch-money tx update <id> --notes "My notes here"
```

### Categories

```bash
# List all categories
monarch-money cat list

# List with IDs (for updates)
monarch-money cat list --show-ids
```

### Accounts

```bash
# List accounts
monarch-money acc list

# Show account details
monarch-money acc get <account_id>
```

### Doctor (Diagnostics)

```bash
# Run diagnostic checks
monarch-money doctor
```

Checks:
- Environment variables set
- API connectivity
- Session validity
- Node.js version

## Library Usage

Import and use the TypeScript library directly:

```typescript
import { MonarchClient } from 'monarch-money';

const client = new MonarchClient({ baseURL: 'https://api.monarch.com' });

// Login
await client.login({
  email: process.env.MONARCH_EMAIL,
  password: process.env.MONARCH_PASSWORD,
  mfaSecretKey: process.env.MONARCH_MFA_SECRET
});

// Get transactions
const transactions = await client.transactions.getTransactions({ limit: 10 });

// Get categories
const categories = await client.categories.getCategories();

// Get accounts
const accounts = await client.accounts.getAll();
```

## Common Workflows

### Find and Update a Transaction

```bash
# 1. Find the transaction
monarch-money tx list --date 2026-01-15 --merchant "Target"

# 2. Get category ID
monarch-money cat list --show-ids

# 3. Update the transaction
monarch-money tx update <transaction_id> --category <category_id>
```

### Search Transactions by Date Range

```bash
monarch-money tx list --start-date 2026-01-01 --end-date 2026-01-31 --limit 100
```

### Check Budget Status

```bash
monarch-money acc list
```

## Error Handling

| Error | Solution |
|-------|----------|
| "Not logged in" | Run `monarch-money auth login` |
| "MFA code required" | Set `MONARCH_MFA_SECRET` environment variable |
| "Invalid credentials" | Verify email/password work at app.monarchmoney.com |
| "Session expired" | Run `monarch-money auth login` again |

## Session Management

Sessions are cached locally at `~/.mm/session.json`. After initial login, subsequent commands reuse the saved session for faster execution.

To clear the session: `monarch-money auth logout`

## References

- [API.md](references/API.md) - GraphQL API details and advanced usage
- [TROUBLESHOOTING.md](references/TROUBLESHOOTING.md) - Common issues and solutions

Overview

This skill provides a TypeScript library and CLI for automating Monarch Money budget tasks. It lets you search and inspect transactions, update categories and merchants, list accounts and budgets, and manage authentication and sessions. It is designed for scripting, quick lookups, and integrating Monarch workflows into automation.

How this skill works

The CLI and library authenticate to Monarch Money using email, password, and a TOTP MFA secret. Once authenticated, commands call the Monarch GraphQL API to list, search, fetch, and update transactions, categories, and accounts. Sessions are cached locally for faster subsequent runs and can be cleared via logout.

When to use it

  • Search transactions by date, merchant, or amount from scripts or terminal
  • Batch-update or correct transaction categories and merchant names
  • Automate recurring budget checks and account listings
  • Diagnose authentication, session, or connectivity issues with doctor checks
  • Integrate Monarch data into other tools using the TypeScript client

Best practices

  • Store MONARCH_EMAIL, MONARCH_PASSWORD, and MONARCH_MFA_SECRET as environment variables for non-interactive use
  • Rotate and manage your MFA secret securely; use a hardware or software TOTP authenticator
  • Use cat list --show-ids before updating transactions to avoid wrong category assignments
  • Run monarch-money doctor periodically to catch session, API, or environment issues early
  • Cache and reuse sessions for automation but call auth logout when rotating credentials

Example use cases

  • Ad-hoc: find a purchase by merchant name and add a note or correct the category
  • Monthly close: export transactions for a date range, reconcile, and update miscategorized items
  • Automation: daily script that lists account balances and notifies when budget thresholds approach
  • Migration/backup: enumerate accounts, categories, and transactions via the TypeScript client for archival or reporting

FAQ

How do I get the MFA secret needed for automation?

Open Monarch settings > Two-Factor Authentication. Disable and re-enable 2FA if needed, click "Can't scan? View setup key," copy the base32 secret, and set MONARCH_MFA_SECRET.

Where is session data stored and how do I clear it?

Sessions are cached at ~/.mm/session.json. Clear sessions with monarch-money auth logout to force a fresh login.

I get "Not logged in" or "MFA code required" errors — what should I do?

Confirm MONARCH_EMAIL and MONARCH_PASSWORD are correct and set MONARCH_MFA_SECRET. Run monarch-money auth login, then re-run your command.