Skip to content

Security

starling-mcp gives an AI assistant read access to your Starling Bank account. This page explains what that means and how to set it up safely. To report a vulnerability, see the security policy.

starling-mcp is an unofficial community project. It isn’t affiliated with Starling Bank.

starling-mcp cannot move money. There are no payment, transfer, payee, Space deposit or withdrawal, or card control tools, and the Starling client inside it exposes only GET. The opt-in raw tool is GET only too. This isn’t a setting that is off by default: there is no code path that sends anything else, and a test checks it.

Even so, you should treat the token you give it as if it were stronger, and make it read-only (below). Then the limit is enforced by Starling as well as by starling-mcp.

Four things need protecting:

  1. The MCP endpoint. Anyone who can send requests to /mcp can use every registered tool with your token: they can read your balances, transactions, payees, cards and Spaces. They can’t move money.
  2. The token. A Starling personal access token has the scopes you ticked when you made it. A token with payment scopes could move money if it leaked, through Starling’s API, whatever starling-mcp does. It stays valid until you delete it.
  3. The assistant’s judgement. A model can misunderstand a request, or be steered by malicious text it reads (prompt injection), for example from a web page or document pasted into the same conversation. Payment references and counterparty names in your transactions are written by other people and are passed to the model. Because starling-mcp can’t pay or transfer, the worst a manipulated model can do is read data it could already read and say something misleading.
  4. Your data, on its way to the model. Whatever the tools return, such as balances, merchants and payees, is sent to your AI provider as part of the conversation. Check that you’re comfortable with your provider’s data handling.

The best defence is to limit what is possible, not to rely on the model behaving.

Layer Setting What it does
Read-only client Built in The Starling client has no method for anything but GET. There are no tools that pay, transfer or edit.
Read-only tokens Your token’s scopes Tick only the read scopes (see Getting started). At start-up, starling-mcp checks each token and logs a warning if it has a payment or write scope, and starling_get_token_info tells the assistant. It never fails because of it.
Toolsets STARLING_TOOLSETS Tools outside the listed toolsets don’t exist. The model can’t see or call them. The raw toolset (a GET to any API path) is opt-in: the default, all, leaves it out, and it’s only enabled when named.
Masked identifiers STARLING_SHOW_IDENTIFIERS (off by default) Account numbers, sort codes, IBANs and addresses show as ••••1234. The opt-in raw tool returns what Starling sends, unmasked, which is one more reason it is off by default.
Audit log STARLING_AUDIT_LOG (off by default) Appends a JSON line for every call of the raw tool, with secret-looking arguments redacted. It records what happened; it doesn’t prevent anything. See Audit log.
No secret output Built in No tool returns the token. Every response from Starling, successful or not, is scrubbed of it before a tool sees it, as are error messages and audit log entries.
No redirects, https only Built in Requests to Starling never follow redirects, so the token only goes to the configured URL. STARLING_API_URL must be https:// (plain http:// only for localhost) and can’t contain a user name or password. Responses are capped at 64 MiB. A request that Starling answers with 429 or 503 is retried with a back-off; nothing other than GET is ever sent.
Endpoint auth MCP_AUTH_TOKEN Bearer token required on every request, checked in constant time. The http transport refuses to start without one, or with one shorter than 16 characters.
Host and Origin allow-list MCP_ALLOWED_HOSTS Rejects requests with an unexpected Host header, or with an Origin header (sent by browsers) that isn’t on the list. This blocks DNS-rebinding and cross-site attacks from browser pages. Required when running without a token. /mcp only accepts POST with a JSON body.
Container Built in A distroless image with no shell, running as a non-root user with nothing to write. The default compose.yaml uses a read-only root filesystem, cap_drop: [ALL] and no-new-privileges.
Nothing stored Built in Transactions are held in memory for STARLING_CACHE_SECONDS and never written to disk.
  • Make it read-only. Starling lets you choose the scopes, so there is no reason to leave a payment scope on.
  • Keep it in .env (not committed; .env is in .gitignore and .dockerignore) or, better, a Docker secret with STARLING_ACCESS_TOKEN_FILE.
  • Don’t paste it into a chat with the assistant. starling-mcp never needs it from the model.
  • The token is sent to the configured Starling API address only (api.starlingbank.com).
  • If you think it has leaked, delete it in the developer portal and make a new one. Update .env and restart.
  • A business account needs its own token. Keep each one as carefully as the first.

The default (lowest risk):

  • A read-only token with only the scopes you want to share
  • raw left out (it is unless you name it)
  • Masked identifiers
  • MCP_AUTH_TOKEN set, even on a home network, if you use the HTTP transport

Narrower:

  • STARLING_TOOLSETS listing only what you use, for example accounts,insights
  • Tick fewer scopes: a tool whose scope is missing says so, and the rest keep working

Wider (only if you need it):

  • Add raw (all,raw) and set STARLING_AUDIT_LOG so you can see what the assistant fetched
  • STARLING_SHOW_IDENTIFIERS=true only if you want the assistant to see full account numbers
  • Set MCP_AUTH_TOKEN to a long random value.
  • Publish the port only where it’s needed: on a LAN address, or on 127.0.0.1 behind a reverse proxy.
  • Never expose port 8080 directly to the internet. If traffic crosses a network you don’t trust, put TLS in front of it. See Deployment. Prefer a VPN to a public endpoint.
  • Set MCP_ALLOWED_HOSTS to the hostname clients use.
  • The server only needs outbound HTTPS to api.starlingbank.com. If your firewall allows, restrict it to that.
  • The token has only read scopes, and no :create or :update scopes.
  • MCP_AUTH_TOKEN is set to a long random value (openssl rand -hex 32) if you use HTTP.
  • The port is only reachable from machines that need it, or published on 127.0.0.1 behind a proxy.
  • TLS terminates at a reverse proxy if traffic crosses an untrusted network. Prefer a VPN to a public endpoint.
  • STARLING_TOOLSETS lists only the toolsets you use, and raw is left out unless needed.
  • Tokens are in a secret or an .env file that isn’t committed or shared.
  • The image is pinned to a version, and you update when security releases come out (watch the repository’s releases).