bank-mcp

io.github.pritch56Published by GitHub account pritch56v0.1.2Updated Nov 3, 2026

Unofficial read-only MCP server for UK bank and card data via TrueLayer Open Banking

VerifiedSTDIODesktop onlyDatabasesFinance

Overview

AI-generated overview

Unofficial read-only MCP server that lets an assistant read your own linked UK bank and card accounts, balances and transactions via TrueLayer Open Banking.

What you can do
  • List linked banks with their consent expiry and reconnect status
  • List accounts and cards, optionally for one bank nickname
  • Read balances, for all banks or a single account
  • List transactions over a date range with paging, oldest first
  • List pending, not yet settled transactions
When to use it
Use it when you want an assistant to answer questions about your own UK bank and card data — balances, account lists, recent or pending transactions — without giving it any ability to move money.
Requirements
Local Python 3.11+ environment with uv or pip; the bank-mcp and bank-mcp-link commands. A free TrueLayer Console application with the Data API scopes enabled and the redirect URI TRUELAYER_CLIENT_ID and TRUELAYER_CLIENT_SECRET are required; TRUELAYER_ENV selects live (default) or sandbox. Each bank must be linked once through a browser sign-in.
Before you install
Requires your TrueLayer client secret (TRUELAYER_CLIENT_SECRET) in the server environment; keep it out of commits. Bank access tokens are stored in ~/.bank-mcp/tokens.json, so protect that file. Consent lasts about 90 days and must be renewed by re-linking. The server is read-only and requests only read scopes, but it is unofficial and not affiliated with TrueLayer or any bank; review SECURITY.md before linking real accounts. Account data is sent to TrueLayer and the assistant.

Installation

In SourceWeft

  1. Open bank-mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

bank-mcp

Unofficial, read-only MCP server for your own UK bank and card data, via TrueLayer Open Banking. It can read accounts, cards, balances and transactions. It cannot move money: only read scopes are ever requested.

Not affiliated with TrueLayer or any bank. See SECURITY.md before linking real accounts.

Setup

Requires Python 3.11+ and uv (or pip).

bash
git clone https://github.com/pritch56/bank-mcp.gitcd bank-mcpuv syncuv run bank-mcp-link --help

Or install the package into any environment with pip install .; this provides the bank-mcp (server) and bank-mcp-link (bank linking) commands.

Get TrueLayer credentials

  1. Create a free account at the TrueLayer Console.
  2. Create an application and note its client ID and client secret. Start with the sandbox, then switch to live.
  3. In the application's settings, add this redirect URI: http://localhost:3000/callback (use the same port as --port if you change it).
  4. Make sure the Data API is enabled with these scopes: info accounts cards balance transactions offline_access.
  5. Export the credentials in the shell you run bank-mcp-link from:
bash
export TRUELAYER_CLIENT_ID=your-client-idexport TRUELAYER_CLIENT_SECRET=your-client-secretexport TRUELAYER_ENV=sandbox   # or "live" (the default)

Never commit these values. .env files are git-ignored.

Link a bank

bank-mcp-link opens your bank's sign-in page in the browser and stores the resulting tokens under a nickname of your choice. You can link several banks.

bash
# Sandbox (no real bank needed)uv run bank-mcp-link --provider mock --name test --sandbox
# A real bank: use its TrueLayer provider id, for example ob-nationwideuv run bank-mcp-link --provider ob-nationwide --name nationwide
uv run bank-mcp-link --list               # linked banks and consent expiryuv run bank-mcp-link --remove nationwide  # forget a bank

If the browser does not open, copy the URL printed in the terminal. Linking waits five minutes for the redirect.

UK Open Banking consent lasts 90 days. When it lapses, tools return Reconnect required for '<bank>'; run bank-mcp-link again for that bank.

Tokens are stored in ~/.bank-mcp/tokens.json, readable only by you.

Configure your MCP client

Replace /path/to/bank-mcp with your checkout. The server reads the same TRUELAYER_* credentials from its environment, and uses the provider id and environment recorded when each bank was linked.

Claude Desktop

Add to claude_desktop_config.json (Settings > Developer > Edit Config), then restart Claude Desktop:

json
{  "mcpServers": {    "bank": {      "command": "uv",      "args": ["run", "--directory", "/path/to/bank-mcp", "bank-mcp"],      "env": {        "TRUELAYER_CLIENT_ID": "your-client-id",        "TRUELAYER_CLIENT_SECRET": "your-client-secret",        "TRUELAYER_ENV": "live"      }    }  }}

Claude Code

bash
claude mcp add bank \  --env TRUELAYER_CLIENT_ID=your-client-id \  --env TRUELAYER_CLIENT_SECRET=your-client-secret \  --env TRUELAYER_ENV=live \  -- uv run --directory /path/to/bank-mcp bank-mcp

Host it on Cloudflare Workers

To run the server remotely instead of over stdio, see worker/README.md: a TypeScript Worker with Workers KV for tokens, protected by Cloudflare Access.

Tools

bank-mcp (stdio) exposes five read-only tools. Each except list_connections takes an optional bank nickname; leave it out to query every linked bank.

ToolReturns
list_connectionsLinked banks and consent expiry
list_accountsAccounts and cards
get_balanceBalances (optionally one account_id)
list_transactionssince/before dates, limit/offset paging, include_pending
list_pendingPending transactions

When all banks are queried, the working banks are still returned and the failing ones are listed under errors.

Configuration

VariableMeaning
TRUELAYER_CLIENT_ID / TRUELAYER_CLIENT_SECRETTrueLayer Console credentials (required)
TRUELAYER_ENVlive (default) or sandbox
TRUELAYER_PROVIDER_IDProvider id; set automatically per bank by bank-mcp-link
BANK_TOKEN_FILEToken file path (default ~/.bank-mcp/tokens.json)
BANK_MAX_RANGE_DAYSLongest date range a single transaction query may span
BANK_TRUELAYER_REFRESH_TOKENOptional refresh-token seed

Development

See CONTRIBUTING.md. Release history is in CHANGELOG.md.

Licence

MIT

Source: README.md at commit f5a0f02

Tools

5

list_connections

List linked banks with consent expiry. Banks needing re-linking say 'reconnect_required'.

Takes no parameters.

list_accounts

List accounts and cards. `bank` is a nickname; omit it to query all linked banks.

Parametersbank

get_balance

Balances. `bank` is a nickname (omit for all banks); `account_id` narrows to one account.

Parametersbankaccount_id

list_transactions

Transactions with since <= date < before (ISO dates; default the last 30 days), oldest first. Page with `limit` and `offset`; `next_offset` is null on the last page.

Parametersbanklimitsincebeforeoffsetaccount_idinclude_pending

list_pending

Pending (not yet settled) transactions. `bank` is a nickname; omit it for all banks.

Parametersbanklimitoffsetaccount_id

Version history

1
  1. v0.1.2LatestOct 29, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts