Skip to main content
Glama
heritagebanknw-mcp

heritagebanknw-mcp

by jrolstad

heritagebanknw-mcp

License: MIT

An MCP (Model Context Protocol) server that provides read-only access to your Heritage Bank NW accounts via browser automation. Use it with Claude Code or any MCP-compatible client to query account balances and transaction history conversationally.

What it does

Exposes three tools:

Tool

Description

get_accounts

Returns all accounts with current balance, available balance, and YTD interest

get_balance

Returns balance details for a single account by ID

get_transactions

Returns transaction history for an account (date, description, amount, type, balance)

Authentication is handled automatically using Playwright to drive a Chromium browser. Sessions are persisted to session.json so subsequent calls run headlessly. If the session expires or MFA is required, a visible browser window opens for you to complete login.

Unlike older banking sites that require HTML scraping, Heritage Bank NW's online banking platform exposes a clean JSON API — so responses are structured and reliable.

Related MCP server: EU Open Banking MCP

Installation

Prerequisites

  • Python 3.11+

  • pip

Steps

  1. Clone the repository:

    git clone https://github.com/jrolstad/heritagebanknw-mcp.git
    cd heritagebanknw-mcp
  2. Install dependencies:

    pip install -r requirements.txt
  3. Install Playwright's Chromium browser:

    playwright install chromium
  4. Set your Heritage Bank NW credentials using one of the two options below.

Configure with Claude Code

Add the server to your Claude Code MCP settings (~/.claude.json under mcpServers). Credentials can be provided in the MCP config directly (recommended) or via a .env file.

Option A — credentials in MCP config (recommended)

{
  "mcpServers": {
    "heritagebanknw": {
      "type": "stdio",
      "command": "python",
      "args": ["/path/to/heritagebanknw-mcp/server.py"],
      "env": {
        "HERITAGEBANKNW_USERNAME": "your_username_here",
        "HERITAGEBANKNW_PASSWORD": "your_password_here"
      }
    }
  }
}

Option B — .env file

cp .env.example .env

Then edit .env:

HERITAGEBANKNW_USERNAME=your_username_here
HERITAGEBANKNW_PASSWORD=your_password_here

The server loads this automatically via python-dotenv on startup. The .env file is gitignored.

Usage

Once connected, you can ask Claude things like:

  • "List my Heritage Bank NW accounts with their balances"

  • "What are the last 20 transactions from my checking account?"

  • "What's the available balance on my savings account?"

  • "How much YTD interest has my savings account earned?"

Authentication and sessions

  • On first run, a Chromium browser window opens and logs in with your credentials.

  • If MFA or additional verification is required, you have 60 seconds to complete it in the browser window.

  • After a successful login, cookies are saved to session.json for future headless runs.

  • If a session expires, the browser window opens again automatically.

  • session.json is gitignored — do not commit it.

Development

Project structure

heritagebanknw_client.py   # Playwright auth + JSON API client
server.py                  # MCP server (FastMCP) — exposes tools to MCP clients
requirements.txt           # Python dependencies
.env.example               # Credential template
session.json               # Persisted browser session cookies (gitignored)

How it works

heritagebanknw_client.py uses Playwright to authenticate against the Heritage Bank NW online banking platform (/nxg-olb/live/), then calls the bank's internal JSON API directly using the browser's fetch (so session cookies are automatically included).

Key API endpoints:

  • GET /nxg-olb-bff/live/ui/v1/accounts — all accounts with balances

  • GET /nxg-olb-bff/live/ui/v1/accounts/{id}/transactions — transaction history

Key functions:

  • _get_json() — handles auth/session and calls an API endpoint via browser fetch

  • get_accounts() — returns all accounts

  • get_balance() — returns one account by ID

  • get_transactions() — returns transactions for an account with date range

Running locally

python server.py

Or via the MCP CLI:

mcp dev server.py

Adding new tools

  1. Add a new async function to heritagebanknw_client.py that calls the relevant API endpoint via _get_json().

  2. Register it as a tool in server.py using the @mcp.tool() decorator.

  3. Reconnect your MCP client to pick up the new tool.

Dependencies

Package

Purpose

mcp

MCP server framework (FastMCP)

playwright

Headless browser automation for authentication

python-dotenv

Loading credentials from .env

License

MIT

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables read-only access to personal bank accounts via the TrueLayer API, allowing querying of accounts, balances, transactions, and generating financial analytics such as spending by category, subscriptions, and monthly summaries.
      9
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables secure, read-only access to personal European bank accounts through Enable Banking and Cloudflare Workers, allowing MCP clients to list accounts, retrieve balances, search transactions, and summarize cash flow.
      3
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables read-only access to Banco General accounts, cards, and pension data through MCP, allowing balance checks, transaction searches, and spending summaries without moving funds.
      14
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables querying linked bank account balances and transactions through MCP tools, with manual sync and read-only access from any MCP client.
      1
      MIT