Skip to content

Configuration

starling-mcp is configured with environment variables. Any variable can instead be read from a file by setting <NAME>_FILE to the file’s path (for Docker secrets). For example, STARLING_ACCESS_TOKEN_FILE=/run/secrets/starling_token.

Variable Default Meaning
STARLING_ACCESS_TOKEN required A Starling personal access token, from developer.starlingbank.com under Personal Access. Tick only read scopes. See Getting started.
STARLING_ACCESS_TOKEN_<NAME> none Another account holder’s token, such as STARLING_ACCESS_TOKEN_BUSINESS. See Multiple account holders.
STARLING_OWN_ACCOUNTS none Your own (personal) accounts at other banks, so transfers to them are treated as internal. On a business holder, payments to them are owner pay. See Your own accounts and your company.
STARLING_COMPANY_ACCOUNTS none Your company’s accounts at other banks, so pay from them is recognised as owner pay. On a business holder, moves to and from them are internal.
STARLING_YEAR_END none The last day of your company’s accounting year, as MM-DD (for example 03-31). Enables the accounting-year and last-accounting-year periods.
STARLING_SHOW_IDENTIFIERS false Show full account numbers, sort codes, IBANs and addresses. Off, they are masked as ••••1234. The opt-in raw tool is not masked.
STARLING_CACHE_SECONDS 300 How long transaction feeds are kept in memory. Raise it to make repeated questions faster, lower it to see new payments sooner.
STARLING_API_URL https://api.starlingbank.com The API base URL. Must be https://, except for localhost. Starling’s sandbox is https://api-sandbox.starlingbank.com.
STARLING_TOOLSETS all Comma-separated toolsets: accounts, transactions, insights, bills, spaces, raw. all leaves out raw; name it (all,raw) to enable it.
STARLING_TIMEOUT_MS 30000 Timeout for each request to Starling.
STARLING_AUDIT_LOG off stderr, or a file path, to record audited calls as JSON lines.

The server is read-only and has no setting that changes that. Its client only ever sends GET requests.

A Starling token belongs to one account holder: you, or your business. To use a personal and a business account, make a token for each and set one variable per holder:

Terminal window
STARLING_ACCESS_TOKEN=<personal token>
STARLING_ACCESS_TOKEN_BUSINESS=<business token>

STARLING_ACCESS_TOKEN is the holder called default. The part after STARLING_ACCESS_TOKEN_ is the holder’s name, in lower case: business, or ltd, joint and so on (1 to 32 letters, digits or underscores). Every tool takes an optional holder argument that picks one; without it, the tool uses default. starling_get_overview lists the other holders.

Insight tools look at one holder at a time, so personal and business money never appear in one total. Holders are also what lets starling-mcp recognise owner pay: when a company account (one holder) pays your personal account (another), both sides are recognised.

STARLING_ACCESS_TOKEN_<NAME>_FILE works for each too.

Money moving between your own accounts is not spending or income, and pay from your own company is not an ordinary payment. starling-mcp sorts every transaction into one of these:

  • Internal. Round-ups, moves to and from your own Spaces, moves between your own Starling accounts, and moves to or from accounts elsewhere that you have listed in STARLING_OWN_ACCOUNTS (an ISA, another bank’s account, a credit card). Left out of spending and income, and reported separately.
  • Owner pay. Money between your company and you: a director’s salary, dividends or drawings. On the company’s side it isn’t spending; on your personal side it isn’t internal, it is income from the company. Recognised between configured holders, from STARLING_COMPANY_ACCOUNTS, and from Starling’s business categories (DIRECTORS_WAGES, DIVIDENDS, PERSONAL_WITHDRAWALS).
  • Everything else is spending and income as normal.

Both lists take comma-separated entries. An entry is either a name or a sort code and account number:

Terminal window
STARLING_OWN_ACCOUNTS="J SMITH ISA, 12-34-56 / 87654321"
STARLING_COMPANY_ACCOUNTS="SMITH CONSULTING LTD"
  • Names match the counterparty name on a payment, ignoring case and punctuation (Ltd and Limited are the same). A name never matches a card merchant.
  • Sort code and account number (12-34-56 / 87654321, dashes optional) match the payee’s bank details, which is the more reliable form where Starling gives them.

The same two lists work from either side, so one configuration covers a personal and a business holder:

Listed in On a personal holder On a business holder (BUSINESS or SOLE_TRADER)
STARLING_OWN_ACCOUNTS (your personal accounts) Internal: your money moving between your accounts Owner pay: the company paying you
STARLING_COMPANY_ACCOUNTS (your company’s accounts) Owner pay: the company paying you Internal: the company’s money moving between its own accounts

These use made-up names and figures.

  • Your company pays you. SMITH CONSULTING LTD has its own Starling business account and sends J SMITH £2,500 on the 25th. With both tokens configured, the business holder sees £2,500 of owner pay out, not spending, and the personal holder sees £2,500 of owner pay in, not an internal move. Neither side’s spending total includes it, and starling_owner_pay reports it either way.
  • The company banks elsewhere. If SMITH CONSULTING LTD is at another bank, the personal holder sees £2,500 arriving from that name. Add the name (or its sort code and account number) to STARLING_COMPANY_ACCOUNTS and the payment is owner pay. Without it, it looks like ordinary income from a payer.
  • The company’s savings or tax account elsewhere. SMITH CONSULTING LTD banks with Starling and keeps a tax reserve at another bank. List that account in STARLING_COMPANY_ACCOUNTS: on the business holder the transfers to it are internal, not owner pay or spending, and on the personal holder pay from it is owner pay.
  • Your Starling account to your ISA elsewhere. You send £500 a month to J SMITH ISA, held at another provider. Until you list it, that is a payment to a person. List it in STARLING_OWN_ACCOUNTS and it becomes an internal move, left out of spending and shown in excluded.
  • A possible own account. If a counterparty looks like your own name but isn’t listed (say J SMITH, paid £1,500 a month), the tools don’t guess. They list it under suspected_own_accounts in the result, with a hint such as “possible own account: J SMITH, £1,500 a month; add it to STARLING_OWN_ACCOUNTS to treat it as internal”.

Every insight result says what it left out and how much, so you can check a total.

STARLING_YEAR_END=03-31 says your company’s accounting year ends on 31 March, so a business question can use accounting-year or last-accounting-year as a period. UK tax years (6 April to 5 April) need no setting.

Every tool’s description uses some of the model’s context, and some clients limit how many tools they accept. List only the toolsets you need:

Terminal window
STARLING_TOOLSETS=accounts,transactions,insights
Toolset Tools
accounts starling_get_overview, starling_get_account, starling_list_cards, starling_get_token_info
transactions starling_list_transactions, starling_get_transaction, starling_export_transactions
insights starling_spending_summary, starling_find_recurring, starling_upcoming_payments, starling_income, starling_balance_history, starling_owner_pay, starling_find_unusual
bills starling_list_direct_debits, starling_list_standing_orders, starling_list_payees
spaces starling_list_spaces
raw starling_rest_get. Opt-in: all leaves it out, so name it (all,raw). It returns what Starling sends, with account numbers and addresses unmasked.

The five prompts are always available.

STARLING_AUDIT_LOG records calls as one JSON line each, with the time, the tool, the arguments (anything secret-looking redacted), the outcome and any error. Only calls of the opt-in raw tool are recorded: the curated tools can only read what they are designed to show. It records what happened; it doesn’t prevent anything.

  • stderr writes the lines to the server’s error output (the container log, or Claude Desktop’s MCP log).
  • A file path appends to that file, creating it with mode 0600. Its folder must exist. In Docker, mount a writable directory (the image runs as UID 65532), because the root filesystem is read-only.
Variable Default Meaning
MCP_TRANSPORT stdio (the Docker image: http) stdio or http.
MCP_HTTP_HOST 127.0.0.1 (the Docker image: 0.0.0.0) The address the HTTP server listens on.
MCP_HTTP_PORT 8080 The HTTP port.
MCP_AUTH_TOKEN none Bearer token for /mcp, at least 16 characters. Required for http. Generate one with openssl rand -hex 32.
MCP_ALLOWED_HOSTS none Comma-separated host names clients use, for the Host and Origin allow-list. An entry without a port matches an Origin only on port 80 or 443; list host:port for other ports.
MCP_ALLOW_UNAUTHENTICATED false Serve /mcp without a token, for use behind something else that authenticates. Needs MCP_ALLOWED_HOSTS.

Boolean values accept true/false, 1/0, yes/no and on/off.

Keep tokens out of .env by mounting them as secrets and pointing the _FILE variables at them:

services:
starling-mcp:
image: ghcr.io/mattoddie/starling-mcp:latest
environment:
MCP_AUTH_TOKEN_FILE: /run/secrets/mcp_auth_token
STARLING_ACCESS_TOKEN_FILE: /run/secrets/starling_token
secrets: [mcp_auth_token, starling_token]
secrets:
mcp_auth_token:
file: ./secrets/mcp_auth_token
starling_token:
file: ./secrets/starling_token

A trailing newline in the file is ignored.