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.
What it can never do
Section titled “What it can never do”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.
Threat model
Section titled “Threat model”Four things need protecting:
- The MCP endpoint. Anyone who can send requests to
/mcpcan use every registered tool with your token: they can read your balances, transactions, payees, cards and Spaces. They can’t move money. - 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.
- 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.
- 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.
Layers of protection
Section titled “Layers of protection”| 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. |
The token
Section titled “The token”- 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;.envis in.gitignoreand.dockerignore) or, better, a Docker secret withSTARLING_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
.envand restart. - A business account needs its own token. Keep each one as carefully as the first.
Recommended setups
Section titled “Recommended setups”The default (lowest risk):
- A read-only token with only the scopes you want to share
rawleft out (it is unless you name it)- Masked identifiers
MCP_AUTH_TOKENset, even on a home network, if you use the HTTP transport
Narrower:
STARLING_TOOLSETSlisting only what you use, for exampleaccounts,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 setSTARLING_AUDIT_LOGso you can see what the assistant fetched STARLING_SHOW_IDENTIFIERS=trueonly if you want the assistant to see full account numbers
Network exposure
Section titled “Network exposure”- Set
MCP_AUTH_TOKENto a long random value. - Publish the port only where it’s needed: on a LAN address, or on
127.0.0.1behind 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_HOSTSto the hostname clients use. - The server only needs outbound HTTPS to
api.starlingbank.com. If your firewall allows, restrict it to that.
Checklist
Section titled “Checklist”- The token has only read scopes, and no
:createor:updatescopes. -
MCP_AUTH_TOKENis 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.1behind a proxy. - TLS terminates at a reverse proxy if traffic crosses an untrusted network. Prefer a VPN to a public endpoint.
-
STARLING_TOOLSETSlists only the toolsets you use, andrawis left out unless needed. - Tokens are in a secret or an
.envfile 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).