Skip to main content
Glama
nz-openbank-mcp

nz-openbank-mcp

Ask an AI assistant about your New Zealand bank accounts without handing your banking credentials to anyone new. nz-openbank-mcp is a Model Context Protocol server that talks to Akahu, the NZ open-finance service, using a Personal App you create and control. It runs on your own machine, starts read-only, and asks before anything changes.

Unofficial. Not affiliated with or endorsed by Akahu or any bank.

Try asking

  • "What did I spend on groceries last month, and at which shops?"

  • "Which subscriptions am I paying for, and how much do they cost per year?"

  • "Show my balances across every account."

  • "Find every payment to my landlord this year."

  • "Anything pending that has not settled yet?"

  • "Compare my eating-out spend in September and October."

Related MCP server: HEY MCP

Why it is safe to try

Read-only by default

Write tools refuse until you set AKAHU_READ_ONLY=false.

Consent per write

With writes on, every write asks you first and shows exactly what will be sent.

Local and private

Runs on your machine over stdio and talks only to api.akahu.io. Tokens and transaction contents are never logged.

Account masking on request

Set AKAHU_MASK_ACCOUNTS=true to show only the bank code, the last four digits and the suffix of account numbers. Off by default.

Small and tested

Thin wrappers over Akahu endpoints, strict typing, and 100% line and branch test coverage enforced in CI.

PyPI · Releases · Security policy

What it can do

The server exposes 14 tools. Ten only read; four change something and are off until you turn writes on.

Tool

Writes?

Purpose

acct_list_accounts

Every connected account, with account numbers and balances

acct_get_account

One account by id

acct_get_account_balance

Just the balance of one account

acct_get_pending_transactions

Unsettled transactions for one account

txn_get_transactions

Settled transactions, filtered by account, dates, category or amount (default 100)

txn_get_transaction

One transaction by id

txn_get_transactions_by_ids

Several transactions in one request

txn_get_pending_transactions

Unsettled transactions across all accounts

txn_search_transactions

Case-insensitive text search over description and merchant; without a start date, the 90 days up to the end date or today (default 50)

id_get_me

The Akahu user's profile

acct_refresh_all_accounts

yes

Ask Akahu to fetch fresh data for every account

acct_refresh_account

yes

Ask Akahu to fetch fresh data for one account

txn_report_transaction_issue

yes

Open a support ticket with Akahu about a transaction

id_verify_name

yes

Check a name against the account holder; needs an extra scope (see Limits) and may be charged per call

There are no spending reports, budgets or forecasts built in. The assistant works those out from the transactions, which keeps the server small and easy to audit.

Get your Akahu tokens

  1. Sign in at my.akahu.nz/developers and create a Personal App.

  2. Connect the bank accounts you want the assistant to see.

  3. Copy the App Token (app_token_...) and User Token (user_token_...).

Treat both like passwords. The install steps below keep them out of project files.

You also need uv. The plugins, the Desktop Extension and the generic client setup all run the server with uvx, which fetches the release and a matching Python.

Install

Where you use it

How

Where the tokens live

Claude Code

Plugin from this repo's marketplace

OS keychain, prompted at install

Claude Desktop

.mcpb Desktop Extension

OS keychain, prompted at install

Codex

Plugin from this repo's marketplace

Environment Codex starts in

Cursor

Plugin from this repo's marketplace

Cursor plugin settings

Grok Build

Plugin from this repo's marketplace

Environment Grok starts in

claude.ai, ChatGPT, grok.com

Self-hosted HTTPS server with OAuth

Your server's environment

ChatGPT Business

OpenAI Secure MCP Tunnel (no public server)

Your host's environment

Anything else that speaks MCP

uvx nz-openbank-mcp or npx -y nz-openbank-mcp@X.Y.Z

Environment of the client

Every option below starts with AKAHU_READ_ONLY=true and AKAHU_AUTOMATION_BYPASS=false.

Claude Code

/plugin marketplace add thatskiff33/nz-openbank-mcp
/plugin install nz-openbank-mcp@nz-openbank

Claude Code asks for both tokens and the two safety settings. /mcp should then list the server as connected. To change a setting later, open /plugin, pick the plugin and choose Configure options. More detail, including updates and removal, is in plugin/README.md.

Claude Desktop

Download nz-openbank-mcp-X.Y.Z.mcpb from the latest release and open it, or use Settings -> Extensions -> Advanced -> Install Extension. Desktop shows a form for the tokens and settings. To update, install the newer .mcpb.

The Claude Code plugin does not work in Claude Desktop, because Desktop cannot collect plugin settings yet.

Codex, Grok Build

Neither host can prompt for a plugin secret, so the tokens come from the environment you start the host in. Read them from your OS secret store rather than writing them into a dotfile:

# macOS
export AKAHU_USER_TOKEN="$(security find-generic-password -s akahu-user-token -w)"
export AKAHU_APP_TOKEN="$(security find-generic-password -s akahu-app-token -w)"
# Linux (libsecret)
export AKAHU_USER_TOKEN="$(secret-tool lookup service akahu-user-token)"
export AKAHU_APP_TOKEN="$(secret-tool lookup service akahu-app-token)"

In Codex, Grok Build and Cursor, an AKAHU_READ_ONLY or AKAHU_AUTOMATION_BYPASS already set in the environment the host starts in overrides the safe defaults.

Codex:

codex plugin marketplace add thatskiff33/nz-openbank-mcp
codex plugin add nz-openbank-mcp@nz-openbank
codex mcp list          # shows the akahu server

Codex passes only the five AKAHU_* settings through to the server. Update with codex plugin marketplace upgrade nz-openbank.

Grok Build:

grok plugin marketplace add thatskiff33/nz-openbank-mcp
grok plugin install nz-openbank-mcp --trust
grok mcp doctor akahu   # should report 14 tools

Grok also loads Claude Code plugins. Install in one of the two, not both, or you get two copies of the server.

Cursor

agent plugin marketplace add https://github.com/thatskiff33/nz-openbank-mcp

Install nz-openbank-mcp from Customize (or /plugins in the Cursor CLI), then enter the two tokens under Plugins -> Configure. Cursor stores them, not the repo. Leave the safety settings empty to keep the defaults. The server shows up as plugin-nz-openbank-mcp-akahu. Settings left unset there fall back to the environment Cursor started in. To try a local checkout, start the Cursor CLI with --plugin-dir /path/to/nz-openbank-mcp/plugin.

The Add to Cursor button at the top installs a plain MCP entry instead of the plugin. It reads AKAHU_USER_TOKEN and AKAHU_APP_TOKEN from the environment Cursor starts in, so set them as shown for Codex above.

Web connectors (claude.ai, ChatGPT, grok.com)

Web assistants can only reach servers on the public internet. Run the nz-openbank-mcp-http entrypoint behind HTTPS with OAuth, then add a custom connector in the assistant (for grok.com, at grok.com/connectors) pointing at the server's /mcp URL. In OAuth mode this server acts as the OAuth authorization server, Google confirms who is signing in, and only the Google accounts or Workspace domains you allow get through. Google never sees your Akahu tokens.

Setup, the Google client, the redirect allowlist and hardening are covered in docs/public-https-streamable-http.md, with a systemd example under deploy/linux-systemd/. For ChatGPT Business there is also OpenAI Secure MCP Tunnel, which connects the local stdio server outbound and needs no public endpoint; see docs/chatgpt-business-tunnel.md. grok.com's connector callback, https://grok.com/connectors-oauth-exchange-code/, is not in the default redirect list. NZ_OPENBANK_MCP_ALLOWED_REDIRECT_URIS replaces that list, so include any default entries you still need alongside it.

Any other MCP client

Point the client at this command and give it the settings as environment variables:

uvx nz-openbank-mcp            # or pin: uvx --from nz-openbank-mcp==X.Y.Z nz-openbank-mcp

Clients that expect an npm package can use npx -y nz-openbank-mcp@X.Y.Z instead. It is a small launcher with no dependencies that runs the PyPI release of the same version through uvx, so it still needs uv.

examples/claude_desktop_config.json shows the shape most JSON-configured clients expect. To use it with Claude Desktop instead of the extension, merge it into the config file and restart:

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

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

Docker

Each release is also published as a multi-arch image (amd64 and arm64), running as a non-root user with read-only mode on:

docker run -i --rm -e AKAHU_USER_TOKEN -e AKAHU_APP_TOKEN ghcr.io/thatskiff33/nz-openbank-mcp

-e NAME with no value passes the variable through from your shell, so the tokens stay out of the command line. For a JSON-configured client, use "command": "docker" with those arguments. For the HTTP server, run nz-openbank-mcp-http in the image; see the HTTPS guide.

To build the image from a checkout, build the wheel first; the image installs it rather than building the package itself:

uv build --wheel --build-constraints .github/build-constraints/requirements.txt --require-hashes
docker build -t nz-openbank-mcp .

Settings

The server reads settings from its process environment, plus an env file only when AKAHU_ENV_FILE names one (process values win). It never picks up a .env file from the working directory.

Variable

Default

Meaning

AKAHU_USER_TOKEN

(required)

Your User Token

AKAHU_APP_TOKEN

(required)

Your Personal App's App Token

AKAHU_READ_ONLY

true

Refuse every write tool

AKAHU_AUTOMATION_BYPASS

false

Skip the confirmation prompt for the two refresh tools

AKAHU_MASK_ACCOUNTS

false

Show only the bank code, last four digits and suffix of account numbers

AKAHU_REQUEST_TIMEOUT

10

Seconds per Akahu request (1 to 120)

AKAHU_LOG_LEVEL

INFO

DEBUG, INFO, WARNING, ERROR or CRITICAL

AKAHU_ENV_FILE

(unset)

Absolute path to an env file to load; on Linux and macOS it must be yours (or root's) and not writable by group or others

AKAHU_BASE_URL

https://api.akahu.io/v1

Must stay on api.akahu.io unless the next setting is on

AKAHU_ALLOW_CUSTOM_BASE_URL

false

Allow another API host; honoured only from the process environment, never from an env file

The server logs a warning at startup when a custom API host is in use. Set AKAHU_ENV_FILE and AKAHU_ALLOW_CUSTOM_BASE_URL only in your own shell or host config, never in project files of a repository you cloned.

The HTTP entrypoint has its own NZ_OPENBANK_MCP_* settings, listed in .env.example and the HTTPS guide.

How writes are guarded

Three checks sit in front of every write tool:

  1. Read-only switch. With AKAHU_READ_ONLY=true the tool refuses before any request leaves your machine.

  2. Confirmation. With writes on, the server asks you to approve each call through your assistant's confirmation prompt. The prompt lists every value that will be sent, such as the full text of a support ticket comment, in quotes with hidden characters made visible. Values over 1,000 characters are refused rather than shortened. Declining or dismissing the prompt cancels the call.

  3. Narrow bypass. AKAHU_AUTOMATION_BYPASS=true skips the prompt only for acct_refresh_all_accounts and acct_refresh_account, which just ask Akahu to re-sync. Each skipped prompt is logged, the startup banner lists these tools, and the server will not start with the bypass on while read-only is also on. Support tickets and name checks always ask.

Limits

Akahu Personal Apps cannot reach app-scoped endpoints, so this server has no tools for categories (transactions carry theirs inline), the list of supported banks, payments or webhooks.

id_verify_name needs a scope you enable for your Personal App at my.akahu.nz/developers; without it Akahu answers 403.

Pending transactions have no id, can change before they settle, and are marked "pending": true.

txn_get_transactions and txn_search_transactions return at most limit items (100 and 50 by default, up to 500). When a result is full, it has "limit_reached": true and more may exist; ask again with a higher limit or a narrower date range before adding anything up. They also read at most 20 pages of results from Akahu per call. When a range holds more, the result has "truncated": true; ask again with a narrower date range.

Reads and account refreshes are tried up to three times on network errors and Akahu server errors. Support tickets and name checks are sent once, because a request that timed out may still have reached Akahu. Rate-limit (429) responses are retried for every request.

Dates and amounts

Dates are New Zealand calendar days (Pacific/Auckland), even though Akahu stores UTC timestamps. A date-only filter such as start_date=2026-10-18 covers that whole NZ day, at either end of a range; a full ISO 8601 timestamp is passed to Akahu unchanged, and Akahu reads one without an offset as UTC. Amounts are formatted in each account's currency, so a USD account shows -USD 9.99. When an account's currency is unknown (no balance, or Akahu reports none), currency is null and amount has no currency symbol (for example -1,234.50); amount_raw is the same amount as a plain number, rounded to cents. Other date formats are rejected.

Privacy

  • Account numbers are shown in full by default. With AKAHU_MASK_ACCOUNTS=true, NZ account numbers are masked to the bank code, the last four account digits and the suffix, and in any other format every digit but the last four is masked.

  • Transaction descriptions and merchant names are passed through as the bank supplied them and are never masked. They can include account numbers, for example on transfers.

  • Tokens are never logged. Balances and transaction contents are not logged; request paths, which can include Akahu account or transaction ids, are logged with their status.

  • By default, over stdio, the server's only network traffic is to api.akahu.io (plus uvx downloading the package). HTTP mode adds Google for sign-in.

  • Account and date filters are sent to Akahu; category and amount filters are applied after the data arrives. Personal Apps have no finer-grained access control, so the token can read everything you connected.

The privacy policy covers who sees what, and the threat model lists each risk with its mitigation and the risks that remain.

Release files (wheel, sdist and .mcpb) carry GitHub build provenance, and PyPI uploads come from Trusted Publishing. To check a download:

gh attestation verify nz-openbank-mcp-X.Y.Z.mcpb --repo thatskiff33/nz-openbank-mcp

Report vulnerabilities privately through SECURITY.md.

Development

git clone https://github.com/thatskiff33/nz-openbank-mcp.git
cd nz-openbank-mcp
uv sync --extra dev
uv run pytest                 # 100% line and branch coverage is required
uv run ruff check . && uv run mypy src
FASTMCP_ENV_FILE=/dev/null uv run fastmcp dev src/nz_openbank_mcp/server.py

To use a local checkout from Claude Code:

claude mcp add nz-openbank --scope user \
  --env AKAHU_APP_TOKEN=app_token_... --env AKAHU_USER_TOKEN=user_token_... \
  -- uv --directory "$(pwd)" run nz-openbank-mcp

The host plugin manifests are generated. Edit plugin/plugin.base.toml, then run uv run --no-project python scripts/sync_plugin_manifests.py. Releases are described in PUBLISHING.md; further operator guides are in docs/.

Contributions are welcome: see CONTRIBUTING.md, the code of conduct and the changelog. Ask questions in Discussions.

License and disclaimer

Licensed under Apache-2.0; see LICENSE. Derived from nz-akahu-mcp by severity1 (Apache-2.0) and substantially modified; see NOTICE. Thank you to severity1 for building and open-sourcing the original, which this project would not exist without.

This software is provided as is. You are responsible for how you use it with your financial data. The maintainers accept no liability for data loss, unauthorised access or financial loss arising from its use.

Available Tools

14 tools
acct_get_accountGet AccountA
Read-onlyIdempotent

Fetch a single account by id.

Returns the same shape as one entry in list_accounts["accounts"]: id, name, type, status, formatted_account, connection, balance (formatted with currency), currency.

Inputs: account_id (required). Returns: object

acct_get_account_balanceGet Account BalanceA
Read-onlyIdempotent

Return just the balance for an account. Cheaper than get_account.

Returns {"id", "balance", "available", "currency"} where balance and available are currency-formatted strings (e.g. "$2,543.21" or "USD 100.00") and currency is the ISO 4217 code. All three are None if the account has no balance block; available alone is None if not reported; currency alone is None when Akahu reports none, and the amounts then have no symbol.

Inputs: account_id (required). Returns: object

acct_get_pending_transactionsGet Account Pending TransactionsA
Read-onlyIdempotent

List pending (not-yet-settled) transactions for one account.

Pending entries affect available balance immediately and can change or vanish before they settle. Returns {"account_id", "transactions": [...]} where each transaction has account_id, date (YYYY-MM-DD, NZ calendar day), description, amount (formatted in the account's currency, e.g. "-$5.50"), amount_raw (number rounded to cents; negative = debit), currency (None if the account reports none, in which case amount has no symbol), type, merchant, category and pending (always true). Pending entries have no id.

Inputs: account_id (required). Returns: object

acct_list_accountsList AccountsA
Read-onlyIdempotent

List every connected account with account numbers and formatted balances.

Returns {"accounts": [...]} where each entry has id, name, type (CHECKING/SAVINGS/CREDITCARD/FOREIGN/...), status, formatted_account (e.g. "01-0123-0123456-00"; masked as "01-****-***3456-00" when the server sets AKAHU_MASK_ACCOUNTS=true), connection (institution name, e.g. "ANZ"), balance (formatted with currency, e.g. "$2,543.21" or "USD 100.00") and currency (ISO 4217 code). balance and currency are None if the account has no balance block; currency alone is None when Akahu reports none, and balance then has no currency symbol.

Inputs: no named parameters. Returns: object

acct_refresh_accountRefresh AccountA
Idempotent

Trigger Akahu to fetch fresh data for one specific account.

Rate-limited by your bank. Idempotent within rate-limit windows. Use when you only need to refresh one account (e.g. checking before a payday lookup). Requires write consent unless AKAHU_AUTOMATION_BYPASS=true.

Returns {"success": bool, "message": str | None, "account_id": str}.

Inputs: account_id (required). Returns: object

acct_refresh_all_accountsRefresh All AccountsA
Idempotent

Trigger Akahu to fetch fresh data for every connected account.

Rate-limited by your bank. Idempotent within rate-limit windows. Use before a query that needs the freshest balance or transaction data. Requires write consent unless AKAHU_AUTOMATION_BYPASS=true. Returns {"success": bool, "message": str | None}.

Inputs: no named parameters. Returns: object

id_get_meGet MeA
Read-onlyIdempotent

Return identity/profile data for the connected Akahu user.

Returns {"id": str, "email": str | None, "name": str | None}, where name joins the profile's first_name and last_name when present.

Inputs: no named parameters. Returns: object

id_verify_nameVerify NameA

Verify a name against the account holder via Akahu's identity check.

If account_id is provided, the check is scoped to that one account (POST /verify/name/{account_id}); otherwise Akahu matches against every identity source the user has connected (POST /verify/name).

Requires the appropriate Personal-App scope grant in your Akahu portal; without it Akahu returns 403 Forbidden. May incur a per-call charge from your bank. Always elicits user confirmation (not bypass-eligible).

Returns {"success": bool, "item": dict | None, "message": str | None} where item is Akahu's match-result envelope (shape documented at https://developers.akahu.nz/docs/enduring-verify-name).

Inputs: family_name (required), initials, account_id, given_name, +1 more. Returns: object

txn_get_pending_transactionsGet Pending TransactionsA
Read-onlyIdempotent

List all pending (not-yet-settled) transactions across the user's accounts.

Pending transactions affect available balance immediately but do not appear in get_transactions until they settle, and they can change or vanish before then. Returns {"transactions": [...]} where each entry has account_id, date (YYYY-MM-DD, NZ calendar day), description, amount (formatted in the account's currency), amount_raw, currency (None if unknown), type, merchant, category and pending (always true). Pending entries have no id.

Inputs: no named parameters. Returns: object

txn_get_transactionGet TransactionA
Read-onlyIdempotent

Fetch one settled transaction by id.

Returns the same shape as one entry in get_transactions["transactions"].

Inputs: transaction_id (required). Returns: object

txn_get_transactionsGet TransactionsA
Read-onlyIdempotent

List settled transactions with optional filters.

Returns {"transactions": [...], "truncated": bool, "limit_reached": bool} where each entry has id, account_id, date (YYYY-MM-DD, NZ calendar day), description, amount (formatted in the account's currency, e.g. "-$12.50" or "-USD 9.99"), amount_raw (number rounded to cents; negative = debit), currency (ISO code, or None when the account's currency is unknown, in which case amount has no symbol, e.g. "-1,234.50"), type, merchant (str | None), category (str | None). The list is complete only when both flags are false. limit_reached is true when the result holds limit items, so more may exist: raise limit (up to 500) or narrow the dates before totalling. truncated is true when the scan stopped at the 20-page cap before reaching the end of the range; narrow the dates and call again.

Inputs: limit, category, end_date, account_id, +3 more. Returns: object

txn_get_transactions_by_idsGet Transactions By IDsA
Read-onlyIdempotent

Batch-fetch settled transactions by their ids in one request.

Useful when you have a list of transaction ids (e.g. from a prior query) and want to inspect them together. Returns {"transactions": [...]} with the same per-entry shape as get_transactions.

Inputs: ids (required). Returns: object

txn_report_transaction_issueReport Transaction IssueA

Submit a support ticket about a transaction to Akahu staff.

Sends a ticket to a human at Akahu support. Always elicits user confirmation (not bypass-eligible); the prompt shows every value in the ticket, including the comment. Pass every required value as an argument; older clients may ask the user for a missing one before that prompt. issue_type validation:

  • "DUPLICATE": requires other_transaction_id (the paired duplicate).

  • "ENRICHMENT_ERROR": requires fields=[...] listing affected field names.

  • "ENRICHMENT_SUGGESTION": requires fields=[...] listing suggested fields.

Returns {"success": bool, "message": str | None}.

Inputs: issue_type (required), transaction_id (required), fields, comment, +1 more. Returns: object

txn_search_transactionsSearch TransactionsA
Read-onlyIdempotent

Case-insensitive substring search across description and merchant name.

Searches settled transactions in a date window until limit matches are found. Without start_date the window is the 90 NZ days ending on end_date, or ending today. Use for free-text lookups; prefer get_transactions when filtering by account or amount. Returns {"transactions": [...], "truncated": bool, "limit_reached": bool} with the same shape and meaning as get_transactions: if limit_reached, more matches may exist, so raise limit (up to 500) or narrow the dates.

Inputs: query (required), limit, end_date, start_date. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 14 tools

    Disambiguation4/5

    Tools are split cleanly by resource (txn_/acct_/id_) and action, with the account-scoped vs global pending-transactions pair clearly differentiated in descriptions. The only mild overlap is among the four transaction-fetch tools (get one, list, batch-by-ids, search), but descriptions give explicit guidance on when to use each.

    Naming Consistency5/5

    Every name follows a strict prefix_verb_noun pattern (txn_get_transaction, acct_list_accounts, id_verify_name), with singular/plural used deliberately to distinguish one-vs-many. Prefix abbreviations are applied uniformly across all 14 tools.

    Tool Count5/5

    14 tools is well within the ideal 3-15 range and each one earns its place: a small read-oriented set covering accounts, transactions, identity and refresh. No redundant or filler tools.

    Completeness4/5

    Core read lifecycle is covered: list/get accounts, cheap balance lookup, settled and pending transactions, search, batch fetch, refresh, identity verification and issue reporting. Minor gaps exist around discovery of connections/institutions and payment or transfer initiation, but agents can work around these for the stated banking-data purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to sign in with OAuth 2.1 and read a user's WHOOP recovery, sleep, strain, and workout data through read-only tools, while also receiving and forwarding signed WHOOP webhooks to your endpoints.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to securely connect to a personal HEY account through OAuth and perform scoped email, search, contact, calendar, todo, thread, and sending operations.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables read-only access to personal European bank accounts through Enable Banking, allowing MCP clients to list accounts, retrieve balances, search and summarize transactions, and estimate spending with bounded, privacy-preserving tools.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP clients to access a user's Zerodha Kite Connect account for portfolio, order, margin, mutual fund, GTT, instrument, and optional live market data operations, with dry-run trading safeguards by default.
      36
      1
      MIT