Monzo Mcp

io.github.partymola由 GitHub 账号 partymola 发布v0.13.0更新于 Nov 6, 2026

Read-only MCP server for the Monzo banking API: OAuth, local transaction cache, spending analysis.

已验证STDIO仅桌面金融数据与分析

概览

AI 生成的概览

面向 Monzo 银行 API 的只读 MCP 服务器,让助手查看账户、余额和储蓄罐,同步交易到本地缓存并分析消费。

可以做什么
  • 从 Monzo 实时 API 列出账户、当前余额、当日支出和储蓄罐
  • 将交易同步到本地 SQLite 缓存,可按 since 日期回补历史
  • 列出并筛选缓存交易,按商户、收款人、描述或备注搜索
  • 生成消费分析,包括分类明细、主要商户和月度对比
  • 显示缓存中的转账对手方信息,如收款人姓名、排序码和账号
适用场景
适合让助手回答关于自己 Monzo 账户、余额和储蓄罐的问题,或借助本地缓存检索和分析超出 Monzo 90 天限制的消费记录。它只读,适合分析而非付款。
运行要求
本地进程:需 Python 3.13+ 及 uv 或 pip,从 git 克隆安装(未发布到 PyPI),或使用已发布的 docker 容器镜像。需要 Monzo 账户,并在 developers.monzo.com 注册 OAuth 客户端,重定向地址为 ID 和密钥在交互式 auth 命令中输入。可选环境变量 MONZO_MCP_CONFIG_DIR、MONZO_MCP_DB_PATH、MONZO_MCP_CALLBACK_HOST。使用 Docker 时必须在 /data 挂载卷。
安装前请注意
auth 步骤会把 OAuth 客户端 ID 与密钥以及访问和刷新令牌以 JSON 文件保存在配置目录,需保护该目录和挂载卷。服务器没有写入类工具,无法转账,但会把真实银行数据(含收款人姓名、排序码和账号)读入本地 SQLite 缓存。完整历史回补仅在 Monzo App 中批准登录后五分钟内有效,错过则只会静默获得 90 天数据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Monzo Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

monzo-mcp

[CI] [License: GPL v3] [Python 3.13+] [Glama MCP Server]

MCP server for the Monzo banking API. Read-only access to accounts, balances, pots, transactions, and spending analysis - all through Claude Code or any MCP client.

Unlike other Monzo MCP implementations that use raw bearer tokens (which expire in 6 hours), this server handles full OAuth with automatic token refresh.

Features

  • 7 read-only tools - no write operations, no money movement
  • OAuth with auto-refresh - tokens refresh automatically, no manual regeneration
  • Local transaction cache - SQLite database survives Monzo's 90-day SCA window
  • Auto-sync on demand - the cache-reading tools run an incremental sync automatically if the cache wasn't synced today, so you rarely need to call monzo_sync by hand
  • Spending analysis - category breakdowns, top merchants, month-over-month comparison
  • Transaction search - search by merchant, payee (counterparty), description, or notes across cached history
  • Counterparty details - bank transfers (faster payments, p2p, Bacs) are cached with the payee's name, sort code, and account number

Tools

ToolDescriptionData source
monzo_list_accountsList accounts with types and IDsLive API
monzo_get_balanceCurrent balance and spend todayLive API
monzo_list_potsSavings pots and balancesLive API
monzo_syncSync transactions to local cacheLive API -> SQLite
monzo_list_transactionsList/filter cached transactionsLocal cache (auto-syncs if stale)
monzo_search_transactionsSearch by merchant/payee/description/notesLocal cache (auto-syncs if stale)
monzo_spendingSpending analysis with category breakdownLocal cache (auto-syncs if stale)

Prerequisites

  • Python 3.13+ (tested on 3.13, 3.14 and 3.15, on Linux, macOS and Windows, in CI)
  • uv (recommended) or pip
  • A Monzo account with an OAuth client registered at developers.monzo.com

Installation

bash
git clone https://github.com/partymola/monzo-mcp.gitcd monzo-mcpuv venv --python 3.13 .venvuv pip install -e .

This package is not on PyPI - the name belongs to an unrelated project. A container image is published instead; see Docker.

Setup

1. Register a Monzo OAuth client

Go to developers.monzo.com and create an OAuth client:

  • Set the redirect URL to http://localhost:6600/callback
  • Note your Client ID and Client Secret

2. Authenticate

bash
monzo-mcp auth

This opens your browser for Monzo OAuth. After authorizing, approve the login in your Monzo app within 5 minutes for full transaction history access (Monzo's SCA window).

3. Register with Claude Code

bash
claude mcp add -s user monzo -- /path/to/monzo-mcp/.venv/bin/monzo-mcp

On Windows the console script is at .venv\Scripts\monzo-mcp.exe.

4. First sync

In Claude Code, run monzo_sync to populate the local transaction cache. Do this immediately after auth to take advantage of the SCA window (up to 11 months of history).

Docker

Images are published to ghcr.io/partymola/monzo-mcp. Tags carry a v prefix (:vX.Y.Z), and :latest follows the most recent release.

The container needs a volume. Credentials and the transaction cache live under /data; with nothing mounted there, the container still starts and every tool reports that it is not configured, and anything you authorise is lost as soon as the container is replaced.

First register an OAuth client as described in Setup step 1 - auth prompts for the Client ID and secret, and there is no way to supply them later. The redirect URL is http://localhost:6600/callback, the same as a source install.

Authenticate once, into a named volume. Decide before you run this whether you want a bind mount instead - switching afterwards means authorising again:

bash
docker volume create monzo-mcp-datadocker run --rm -it \  -v monzo-mcp-data:/data \  -p 127.0.0.1:6600:6600 \  ghcr.io/partymola/monzo-mcp:latest auth

The published port is needed only for this step, so the OAuth redirect can reach the container. Binding it to 127.0.0.1 keeps the callback listener off your network. No browser opens - the container has none - so copy the URL it prints. Then approve the login in your Monzo app within 5 minutes (see Monzo SCA window).

Then register the server, reusing the same volume:

bash
claude mcp add -s user monzo -- \  docker run --rm -i -v monzo-mcp-data:/data ghcr.io/partymola/monzo-mcp:latest

-i is required - the server speaks JSON-RPC over stdin and stdout.

Sync straight away. The 11-month backfill closes 5 minutes after you approve in the Monzo app (see Monzo SCA window), and this route is longer than a source install - so call monzo_sync as soon as the server is registered. Miss it and you silently get 90 days instead, with no error.

To keep the files somewhere you can read them, use a bind mount instead of a named volume. The container runs as root and writes credentials owner-only, so without --user they end up root-owned:

bash
mkdir -p ~/monzo-mcp-data/configdocker run --rm -it \  -v ~/monzo-mcp-data:/data \  --user $(id -u):$(id -g) \  -p 127.0.0.1:6600:6600 \  ghcr.io/partymola/monzo-mcp:latest auth

Pass the same -v and --user to the server command. Create the directory first - --user against a named volume fails, because the volume initialises root-owned from the image.

CLI

monzo-mcp              Start the MCP server (stdio transport)monzo-mcp auth         Interactive OAuth setup (opens the browser)monzo-mcp --version    Print the installed package version

Configuration

All configuration is via environment variables (optional):

VariableDefaultDescription
MONZO_MCP_CONFIG_DIR<package>/config/Directory for OAuth credentials and tokens
MONZO_MCP_DB_PATH<package>/monzo.dbPath to SQLite transaction cache
MONZO_MCP_CALLBACK_HOSTlocalhostInterface the auth callback server binds to. The redirect URI is unaffected

The container image sets the first two under /data, because the package-relative defaults resolve into the interpreter's lib directory there, which cannot be mounted. It sets the third to 0.0.0.0, because a published port arrives on the container's bridge interface and a localhost bind refuses it.

Credential files (created by monzo-mcp auth):

  • config/monzo_client.json - OAuth client ID and secret
  • config/monzo_tokens.json - Access and refresh tokens (auto-refreshed)

Monzo SCA window

Monzo's Strong Customer Authentication (SCA) limits transaction history access:

  • Within 5 minutes of app approval: up to ~11 months of history
  • After the window expires: only the last 90 days

The local SQLite cache preserves all synced transactions permanently, so run monzo_sync promptly after monzo-mcp auth.

To backfill a specific range, pass since to monzo_sync - an ISO date (2026-01-01) or datetime (2026-01-01T14:30:00Z). Within the last 90 days this works at any time. Reaching further back only works inside the SCA window; outside it the request is refused, and the sync quietly fetches only what is newer than the newest cached transaction.

Older cached transactions gain fields added in newer versions (e.g. counterparty/payee details on bank transfers) only when re-fetched, which a post-auth full sync does for the history it re-pulls.

Security

  • Zero write tools - cannot send money, move funds between pots, or modify transactions
  • Monzo API itself cannot send money to external accounts
  • Tokens stored as JSON files in the config/ directory (gitignored)
  • All API calls are GET requests with Bearer token auth

Troubleshooting

  • "SCA required" or only 90 days of history - re-run monzo-mcp auth and approve the login in the Monzo app within 5 minutes, then sync straight away (see the SCA window above).
  • Token expired / no refresh - re-run monzo-mcp auth to re-authorise.
  • "No transaction data available" - the cache is empty, and the rest of the message says why. If it says the last sync failed, run monzo_sync to see the error. Run monzo-mcp auth only if it says the stored credentials were refused or cannot be used, or that the login needs approving in the Monzo app, and then call monzo_sync once.
  • Every tool reports "not configured" under Docker, or authentication does not survive a restart - nothing is mounted at /data. See Docker; the same volume must be passed to the auth run and to the server.
  • auth sits on "Waiting for callback..." after you approve - the callback was not delivered. Press Ctrl-C and run it again. Under Docker, check the port is published (-p 127.0.0.1:6600:6600).

Contributing

See CONTRIBUTING.md for development setup, the test workflow, and the pre-commit hook. Changes are tracked in CHANGELOG.md.

License

GPL-3.0-or-later. See LICENSE.

来源:README.md,提交 6c6e0fb

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:该软件包类型无法在沙箱中运行。

版本历史

5
  1. v0.13.0最新Nov 6, 2026
  2. v0.12.0Nov 4, 2026
  3. v0.11.1Nov 3, 2026
  4. v0.10.0Sep 29, 2026
  5. v0.9.0Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分