Sandbox
@robcerda/monarch-mcp-server

MCP server for Monarch Money in Claude Code

This server connects Claude Code to Monarch Money through MCP. It exposes tools for accounts, transactions, budgets, cash flow, goals, tags, rules, splits, and recurring streams, so your agent can inspect and update your finances from chat.

366 stars148 forksPythonUpdated 8d ago
Who it's for

Builders who want Claude Code to read and manage Monarch Money data through MCP.

What it delivers

You can ask your agent to check balances, review transactions, and update budgets without leaving Claude Code.

What it does

Account access

Get accounts, holdings, sync health, balance history, and refresh account data.

Transaction management

List, search, create, update, delete, review, tag, categorize, split, and bulk-categorize transactions.

Budget and goal tools

Read budgets and goals, set budget amounts, and update savings goal contributions and targets.

Rules and recurring streams

Create, update, reorder, and delete auto-categorization rules, and review recurring transaction streams.

Authentication helpers

Set up login once with a secure browser token, email and password, MFA, or a legacy session token.

How to get it

  1. 1Clone this repository
    git clone https://github.com/robcerda/monarch-mcp-server.git
    cd monarch-mcp-server
  2. 2Using uv (recommended)
    uv sync --locked
  3. 3Using pip
    pip install -r requirements-lock.txt --require-hashes
    pip install -e . --no-deps
  4. 4Open a terminal and run
    cd /path/to/your/monarch-mcp-server
    uv run python login_setup.py        # or: python login_setup.py
  5. 5macOS / Linux — ~/.config/monarch-mcp/cookie.txt (respects $XDG_CONFIG_HOME)
    mkdir -p ~/.config/monarch-mcp
    # paste the cookie value into the file with your editor, then:
    chmod 600 ~/.config/monarch-mcp/cookie.txt
  6. 6Windows — %APPDATA%\monarch-mcp\cookie.txt
    New-Item -ItemType Directory -Force "$env:APPDATA\monarch-mcp" | Out-Null
    notepad "$env:APPDATA\monarch-mcp\cookie.txt"   # paste the cookie value, save, close

README

MseeP.ai Security Assessment Badge

Monarch Money MCP Server

A Model Context Protocol (MCP) server for integrating with the Monarch Money personal finance platform. This server provides seamless access to your financial accounts, transactions, budgets, and analytics through Claude Desktop and Claude Code.

My MonarchMoney referral: https://www.monarchmoney.com/referral/ufmn0r83yf?r_source=share

Built with the MonarchMoneyCommunity Python library - An actively maintained community fork of the Monarch Money API with full MFA support.

monarch-mcp-server MCP server

🚀 Quick Start

1. Installation

  1. Clone this repository:

    git clone https://github.com/robcerda/monarch-mcp-server.git
    cd monarch-mcp-server
    
  2. Install dependencies:

    Using uv (recommended):

    uv sync --locked
    

    --locked installs exactly what uv.lock pins, verified against the hashes it records, and refuses to re-resolve. Without it, uv sync is free to pick up whatever versions happen to satisfy the ranges today.

    Using pip:

    pip install -r requirements-lock.txt --require-hashes
    pip install -e . --no-deps
    

    requirements-lock.txt is generated from uv.lock and pins every transitive dependency with hashes, so --require-hashes gives the pip path the same guarantee as the uv one. --no-deps on the second command stops pip re-resolving what the first command just pinned.

    pip install -r requirements.txt still works and installs exactly the same set. That file is now a one line include of requirements-lock.txt, kept so existing setups and scripts do not break. The pins moved out of it because a root requirements.txt gets resolved as an independent manifest, which had started producing a pinned set that disagreed with uv.lock.

  3. Configure Claude Desktop: Add this to your Claude Desktop configuration file:

    macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    Windows: %APPDATA%\Claude\claude_desktop_config.json

    {
      "mcpServers": {
        "Monarch Money": {
          "command": "/opt/homebrew/bin/uv",
          "args": [
            "run",
            "--locked",
            "--project",
            "/path/to/your/monarch-mcp-server",
            "monarch-mcp-server"
          ]
        }
      }
    }
    

    Important: Replace /path/to/your/monarch-mcp-server with your actual path!

    uv run --locked --project resolves dependencies from the repo's uv.lock, and monarch-mcp-server is the console script declared in pyproject.toml. --locked matters: without it, a lockfile that has drifted from pyproject.toml is silently re-resolved against PyPI and the recorded hashes stop being enforced. With it, drift is a startup error. Earlier versions of this README used uv run --with 'mcp[cli]', which builds a fresh unpinned environment on every launch and silently picks up whatever the newest release happens to be. That is what broke every install when the MCP SDK published 2.0, and the client only reported it as the server disconnecting. Pinning the launch to the lockfile means a new upstream release cannot change what your server runs.

  4. Restart Claude Desktop

OR

  1. Configure Claude Code (CLI): Add this to your Claude Code configuration file:

    Global (all projects):

    macOS/Linux: ~/.claude.json

    Windows: %USERPROFILE%\.claude.json

    {
      "mcpServers": {
        "Monarch Money": {
          "command": "/opt/homebrew/bin/uv",
          "args": [
            "run",
            "--locked",
            "--project",
            "/path/to/your/monarch-mcp-server",
            "monarch-mcp-server"
          ]
        }
      }
    }
    

    Project-level (specific directory):

    Create .mcp.json in your project directory:

    {
      "Monarch Money": {
        "command": "/opt/homebrew/bin/uv",
        "args": [
          "run",
          "--locked",
          "--project",
          "/path/to/your/monarch-mcp-server",
          "monarch-mcp-server"
        ]
      }
    }
    

    If installed via pip instead of uv, use:

    {
      "command": "python",
      "args": ["/path/to/your/monarch-mcp-server/src/monarch_mcp_server/server.py"]
    }
    

    Important: Replace /path/to/your/monarch-mcp-server with your actual path!

  2. Restart Claude Code

2. One-Time Authentication Setup

Important: For security and MFA support, authentication is done outside of Claude.

Open a terminal and run:

cd /path/to/your/monarch-mcp-server
uv run python login_setup.py        # or: python login_setup.py

The script offers three login paths:

Option 1 (recommended): Session cookies from your browser

Long-lived sessions, supports SSO accounts, and sidesteps Cloudflare CAPTCHA gates on programmatic login. Steps:

  1. Log in to https://app.monarch.com in Chrome or Firefox.

  2. Open DevTools (F12) → Network tab.

  3. Click any request whose Name starts with graphql (or any request to api.monarch.com).

  4. Scroll to Request Headers, find the cookie: header, and copy the full value.

  5. Save it to the cookie file for your platform (recommended), then re-run the script — it reads the file automatically:

    macOS / Linux~/.config/monarch-mcp/cookie.txt (respects $XDG_CONFIG_HOME):

    mkdir -p ~/.config/monarch-mcp
    # paste the cookie value into the file with your editor, then:
    chmod 600 ~/.config/monarch-mcp/cookie.txt
    

    Windows%APPDATA%\monarch-mcp\cookie.txt:

    New-Item -ItemType Directory -Force "$env:APPDATA\monarch-mcp" | Out-Null
    notepad "$env:APPDATA\monarch-mcp\cookie.txt"   # paste the cookie value, save, close
    

    Files under your user profile are already ACL-restricted to your account on Windows; no chmod equivalent is needed for typical single-user machines.

    To use a different location on any platform, set the MONARCH_MCP_COOKIE_FILE environment variable to the full path.

    Alternatively, paste the value at the interactive prompt — but note that POSIX terminals silently truncate pasted input at the canonical-mode buffer limit (MAX_CANON, 1024 bytes on macOS/Linux), and real Monarch cookie headers are usually longer than that, so the prompt path fails with a confusing auth error for most users. The cookie file has no length limit and survives repo updates.

The script verifies the cookies against the live API before saving them to your system keyring. The cookie file is only read at setup time; the running MCP server uses the keyring session.

Option 2: Email and password

Standard interactive login. The script handles:

  • Email verification codes (Monarch may send one for a new device session even when MFA is off).
  • TOTP MFA codes if you have MFA enabled.
  • Cloudflare CAPTCHA detection: if Monarch blocks programmatic login, the script tells you to switch to option 1.

The resulting long-lived session token is saved to your system keyring.

Option 3: Legacy session token paste

Kept for users with an existing token captured before the May 2026 API change. Monarch may no longer accept token-only auth on the GraphQL endpoint; if the verification call returns 401, fall back to option 1.

3. Start Using

Once authenticated, use these tools directly in Claude Desktop or Claude Code:

  • get_accounts - View all your financial accounts
  • get_transactions - Recent transactions with filtering
  • get_budgets - Budget information and spending
  • get_cashflow - Income/expense analysis

✨ Features

📊 Account Management

  • Get Accounts: View all linked financial accounts with balances and institution info
  • Get Account Holdings: See securities and investments in investment accounts
  • Refresh Accounts: Request real-time data updates from financial institutions

💰 Transaction Access

  • Get Transactions: Fetch transaction data with filtering by date, account, and pagination
  • Create Transaction: Add new transactions to accounts
  • Update Transaction: Modify existing transactions (amount, description, category, date)

🏷️ Category Management

  • Get Categories: List all transaction categories with groups, icons, and metadata
  • Get Category Groups: View category groups with their associated categories

📋 Transaction Review

  • Get Transactions Needing Review: Find transactions that need attention (uncategorized, no notes, flagged)
  • Set Transaction Category: Assign a category to a transaction
  • Update Transaction Notes: Add or update notes on transactions (great for receipt links)
  • Mark Transaction Reviewed: Clear the needs_review flag on transactions

📦 Bulk Operations

  • Bulk Categorize Transactions: Apply a category to multiple transactions at once

🔖 Tag Management

  • Get Tags: List all available tags with colors and usage counts
  • Set Transaction Tags: Apply tags to a transaction
  • Create Tag: Create a new tag with custom name and color

🔍 Advanced Search

  • Search Transactions: Comprehensive search with filters for merchant, category, account, tags, date ranges, and amounts
  • Get Transaction Details: Retrieve complete details for a single transaction
  • Delete Transaction: Remove a transaction
  • Get Recurring Transactions: View upcoming recurring transactions

🤖 Transaction Rules (Auto-Categorization)

  • Get Transaction Rules: List all auto-categorization rules
  • Create Transaction Rule: Create rules with merchant/amount conditions to auto-categorize
  • Update Transaction Rule: Modify existing rules
  • Delete Transaction Rule: Remove a rule

🔄 Merchant & Recurring Stream Management

  • Get Merchant: View a merchant's details including recurring transaction stream configuration
  • Update Merchant: Modify a merchant's name and/or recurring stream settings (frequency, amount, base date)
  • Review Recurring Stream: Accept, ignore, or reset recurring transaction streams detected by Monarch

✂️ Transaction Splits

  • Get Transaction Splits: View how a transaction has been split into parts
  • Split Transaction: Divide a single transaction into multiple parts with different categories or merchants

💵 Budget Management

  • Get Budgets: Access budget information including spent amounts and remaining balances by category
  • Set Budget Amount: Create or modify budget amounts for any category or category group

📈 Net Worth Tracking

  • Get Net Worth: Track total net worth over time with daily snapshots and trend analysis
  • Get Account Balance History: View historical balance data for any account
  • Get Net Worth by Account Type: See net worth breakdown across account types (checking, savings, investments, etc.)

📊 Financial Analysis

  • Get Cashflow: Analyze financial cashflow over specified date ranges with income/expense breakdowns
  • Get Transactions Summary: Quick high-level statistics about your transactions
  • Get Spending Summary: Spending breakdown by category with totals

🔐 Secure Authentication

  • One-Time Setup: Authenticate once, use for weeks/months
  • Email OTP Support: Handles Monarch's email verification flow for new devices/sessions
  • MFA Support: Full support for two-factor authentication
  • SSO/Google sign-in: Use monarch_login_with_token to paste a session token from your browser
  • Session Persistence: No need to re-authenticate frequently
  • Secure: Credentials never pass through Claude

🛠️ Available Tools

All 58 registered tools. Required parameters are listed first, optional ones are marked with a trailing question mark. This table is generated from the live tool registry and the functions' signatures, so it does not drift.

ToolDescriptionParameters
add_transaction_tagAdd a tag to a transaction, preserving any tags already on ittransaction_id, tag_id
bulk_categorize_transactionsApply the same category to multiple transactions at oncetransaction_ids, category_id, mark_reviewed?, dry_run?
categorize_transactionAssign a category to a transactiontransaction_id, category_id
check_auth_statusReport the stored session and its auth modeNone
create_transactionCreate a new transaction in Monarch Moneydate, account_id, amount, merchant_name, category_id, notes?, update_balance?
create_transaction_categoryCreate a new transaction categorygroup_id, transaction_category_name, icon?, rollover_enabled?, rollover_type?
create_transaction_ruleCreate a new transaction auto-categorization rulemerchant_criteria_operator?, merchant_criteria_value?, merchant_criteria_values?, merchant_criteria?, original_statement_operator?, original_statement_values?, original_statement_criteria?, use_original_statement?, amount_operator?, amount_value?, amount_lower?, amount_upper?, amount_is_expense?, set_category_id?, set_merchant_name?, add_tag_ids?, link_goal_id?, hide_from_reports?, review_status?, account_ids?, category_ids?, apply_to_existing?
create_transaction_tagCreate a new transaction tagname, color
debug_session_loadingDiagnose session loading problemsNone
delete_transactionDelete a transaction from Monarch Moneytransaction_id
delete_transaction_ruleDelete a transaction rulerule_id
get_account_balance_historyGet historical balance data for a specific accountaccount_id
get_account_holdingsGet investment holdings for a specific accountaccount_id
get_account_sync_healthReport the health of each linked institution connectionstale_after_days?
get_accountsGet all financial accounts from Monarch MoneyNone
get_budgetsGet budget information from Monarch Moneystart_date?, end_date?
get_cashflowGet cashflow analysis from Monarch Moneystart_date?, end_date?
get_cashflow_by_monthGet spending trends over time, broken down by category and monthstart_date, end_date
get_category_detailsGet a single category's details including budget amounts for a monthcategory_id, month?
get_debt_paydownGet the debt paydown plan and the accounts feeding itmethod?
get_goal_contributionsShow a goal's budgeted contributions, broken down by funding accountgoal_id, month?
get_goalsList Monarch savings and debt-paydown goalsNone
get_merchantGet a merchant's details including recurring transaction stream configurationmerchant_id
get_net_worthGet net worth history over timestart_date?, end_date?, account_type?
get_net_worth_by_account_typeGet net worth breakdown by account type over timestart_date, timeframe?
get_recurring_transactionsGet upcoming recurring transactionsstart_date?, end_date?
get_spending_summaryGet a spending summary broken down by category, category group, and merchantstart_date?, end_date?
get_transaction_categoriesGet all available transaction categories from Monarch MoneyNone
get_transaction_category_groupsGet all transaction category groups (parent groupings for categories)None
get_transaction_detailsGet full details for a specific transactiontransaction_id
get_transaction_rulesGet all transaction auto-categorization rules from Monarch MoneyNone
get_transaction_splitsGet the splits for a transactiontransaction_id
get_transaction_tagsGet all available transaction tags from Monarch MoneyNone
get_transactionsGet transactions from Monarch Moneylimit?, offset?, start_date?, end_date?, account_id?, search?, category_ids?, category_group_ids?, account_ids?, tag_ids?, has_notes?, is_split?, is_recurring?, wide_search?, search_scan_limit?
get_transactions_needing_reviewGet transactions that need review based on various criterianeeds_review?, days?, uncategorized_only?, without_notes_only?, limit?, offset?, account_id?
get_transactions_summaryGet a high-level summary of transactionsNone
mark_transaction_reviewedMark a transaction as reviewed (clears the needs_review flag)transaction_id
monarch_loginSign in via a secure form in the client UINone
monarch_login_with_tokenSign in with a browser copied session tokenNone
monarch_logoutClear the stored session and drop the cached clientNone
monarch_whoamiReport who is signed in and what the account's plan entitles it toNone
refresh_accountsRequest account data refresh from financial institutionsaccount_ids?
reorder_transaction_ruleMove a transaction rule to a new position in the evaluation orderrule_id, new_order
review_recurring_streamSet the review status of a recurring transaction streamstream_id, review_status
search_transactionsSearch and filter transactions with comprehensive filtering optionssearch?, limit?, offset?, start_date?, end_date?, category_ids?, account_ids?, tag_ids?, has_attachments?, has_notes?, hidden_from_reports?, is_split?, is_recurring?
set_budget_amountSet or update a budget amount for a category or category groupamount, category_id?, category_group_id?, start_date?, apply_to_future?
set_goal_contributionSet the budgeted monthly contribution to a goal from one funding accountgoal_id, account_id, amount
set_transaction_tagsSet tags on a transactiontransaction_id, tag_ids
setup_authenticationGet setup instructionsNone
split_transactionSplit a transaction into multiple parts with different categories/merchantstransaction_id, splits
update_accountUpdate an account's name, balance, type or visibility settingsaccount_id, name?, balance?, account_type?, account_sub_type?, include_in_net_worth?, hide_from_summary_list?, hide_transactions_from_reports?, dry_run?
update_categoryUpdate an existing category's settingscategory_id, name?, icon?, group_id?, category_type?, exclude_from_budget?, budget_variability?, rollover_enabled?, rollover_start_month?, rollover_starting_balance?, rollover_frequency?, rollover_target_amount?, rollover_type?, confirm_rollover_reset?, dry_run?
update_merchantUpdate a merchant's name and/or recurring transaction stream settingsmerchant_id, name?, is_recurring?, frequency?, base_date?, amount?, is_active?
update_savings_goalUpdate a savings goal's target or monthly contributiongoal_id, target_amount?, target_date?, name?, priority?, goal_type?, is_sinking_fund?
update_transactionUpdate an existing transaction in Monarch Moneytransaction_id, category_id?, merchant_name?, goal_id?, amount?, date?, hide_from_reports?, needs_review?, notes?
update_transaction_notesUpdate the notes/memo for a transactiontransaction_id, notes, receipt_url?
update_transaction_ruleUpdate an existing transaction rulerule_id, merchant_criteria_operator?, merchant_criteria_value?, merchant_criteria_values?, merchant_criteria?, original_statement_operator?, original_statement_values?, original_statement_criteria?, use_original_statement?, amount_operator?, amount_value?, amount_lower?, amount_upper?, amount_is_expense?, set_category_id?, set_merchant_name?, add_tag_ids?, link_goal_id?, hide_from_reports?, review_status?, account_ids?, category_ids?, clear_category?, clear_merchant?, clear_tags?, clear_goal_link?, clear_review_status?, apply_to_existing?
upload_account_balance_historyUpload corrected balance snapshots for an accountaccount_id, corrections, dry_run?

📝 Usage Examples

View Your Accounts

Use get_accounts to show me all my financial accounts

Get Recent Transactions

Show me my last 50 transactions using get_transactions with limit 50

get_transactions returns a JSON object with tool, args, count, total_count, truncated, search, and data so large agent-tools/<uuid>.txt responses are self-describing. Transaction rows live in data and include original_statement / plaid_description when Monarch provides the underlying Plaid statement text, plus currency, direction, direction_source, transaction_type, category_group, and category_group_id when those values can be derived from Monarch response data. When Monarch's server-side search errors or returns no rows, wide_search scans recent transactions locally across merchant, original statement, description, notes, category, account, and tags.

Check Spending vs Budget

Use get_budgets to show my current budget status

Set a Budget Amount

Set my grocery budget to $600 for this month using set_budget_amount

Apply Budget to All Future Months

Set my entertainment budget to $150 and apply it to all future months using set_budget_amount with apply_to_future=true

Track Net Worth Over Time

Show my net worth trend for the past year using get_net_worth

View Account Balance History

Show me how my savings account balance has changed over time using get_account_balance_history

Net Worth Breakdown by Account Type

Show my net worth breakdown by account type using get_net_worth_by_account_type

Analyze Cash Flow

Get my cashflow for the last 3 months using get_cashflow

List Available Categories

Show me all available categories using get_transaction_categories

Review Uncategorized Transactions

Show me transactions from the last 7 days that need review using get_transactions_needing_review

Bulk Categorize Transactions

Categorize these three transactions as "Groceries" using bulk_categorize_transactions

Tag a Transaction

Add the "Tax Deductible" tag to this transaction using set_transaction_tags

Search for Transactions

Find all Amazon transactions from the last month using search_transactions

View Recurring Bills

Show me my upcoming recurring transactions using get_recurring_transactions

Create Auto-Categorization Rule

Create a rule to automatically categorize Amazon transactions as "Shopping" using create_transaction_rule

Split a Transaction

Split this $100 Costco transaction into $60 for Groceries and $40 for Household using split_transaction

Get Transaction Statistics

Give me a quick summary of my transactions using get_transactions_summary

View Spending by Category

Show my spending breakdown by category for last month using get_spending_summary

Update a Recurring Bill Amount

Update PennyMac's recurring stream to $1,460.93 monthly using update_merchant

Review Recurring Streams

Approve the Netflix recurring stream using review_recurring_stream

📅 Date Formats

  • All dates should be in YYYY-MM-DD format (e.g., "2024-01-15")
  • Transaction amounts: positive for income, **negativ

Files in the repo

Repository payload11 top-level entries
  • .github
  • src
  • tests
  • .gitignore
  • LICENSE
  • login_setup.py
  • pyproject.toml
  • README.md
  • requirements-lock.txt
  • requirements.txt
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k
t8y2/dbxConnectors

20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。

19k

The fastest browser for AI agents to run browser automation, built for sharing your logged-in browser state with your AI agents, like Codex or Claude Code, without disturbing you. Zero cost, zero config.

16k
noskillish/
bankmcp

BankMCP™: your AI can now read your bank. Self-hosted, read-only MCP server for your own bank accounts via open banking (Enable Banking). Standard MCP; tested with Claude and Ollama.

177

Open-source auth gateway connecting 1400+ SaaS providers to AI agents through SDK, CLI, MCP, HTTP, and OpenAPI.

5.7k