Monzo Banking Skill
Access your Monzo bank account to check balances, view transactions, manage savings pots, and send notifications to your Monzo app.
Prerequisites
Before setting up this skill, you need:
- - A Monzo account (UK personal, joint, or business account)
- The Monzo app installed on your phone (for SCA approval)
- OpenClaw running with workspace access
- Standard tools:
curl, jq, openssl, bc (pre-installed on most Linux systems)
Quick Start (TL;DR)
CODEBLOCK0
Detailed Setup Guide
Step 1: Set the Encryption Password
The MONZO_KEYRING_PASSWORD environment variable is used to encrypt your Monzo credentials at rest. Choose a strong, unique password and don't lose it — you'll need it if you ever move or restore the skill.
There are several ways to provide this variable. Choose whichever fits your setup:
Option A: OpenClaw skill config (simplest)
Add to your OpenClaw config (e.g. openclaw.json):
CODEBLOCK1
Then restart: INLINECODE6
Note: This stores the password in plaintext in the config file. Ensure the file has restrictive permissions (chmod 600) and is not checked into version control.
Option B: Shell environment (keeps password out of config files)
Add to your shell profile (~/.bashrc, ~/.zshrc, etc.):
CODEBLOCK2
Then restart your shell and OpenClaw.
Option C: systemd EnvironmentFile (for server deployments)
Create a secrets file (e.g. /etc/openclaw/monzo.env):
CODEBLOCK3
Set permissions: INLINECODE11
Reference it from your systemd unit with EnvironmentFile=/etc/openclaw/monzo.env.
Option D: Password manager / secrets manager
Use your preferred secrets tool to inject the env var at runtime. Any method that sets MONZO_KEYRING_PASSWORD in the process environment will work.
Step 2: Create Monzo OAuth Client
- 1. Go to https://developers.monzo.com/ and sign in with your Monzo account
- Click "Clients" → "New OAuth Client"
- Fill in:
-
Name:
OpenClaw (or your preferred name)
-
Logo URL:
(leave blank)
-
Redirect URLs:
http://localhost ← exactly this, no trailing slash
-
Description:
(leave blank)
-
Confidentiality:
Confidential ← ⚠️ Important! Enables refresh tokens
- 4. Click Submit
- Note your Client ID (
oauth2client_...) and Client Secret (mnzconf....)
Step 3: Run the Setup Wizard
CODEBLOCK4
The wizard will:
- 1. Ask for your Client ID and Client Secret
- Give you an authorization URL to open in your browser
- Ask you to paste the redirect URL back
- Exchange the code for access tokens
- Save encrypted credentials
Alternative: Non-interactive mode (useful for automation or agents):
CODEBLOCK5
Step 4: Approve in Monzo App (SCA)
⚠️ This step is required! Monzo requires Strong Customer Authentication.
- 1. Open the Monzo app on your phone
- Look for a notification about "API access" or a new connection
- Tap to approve
If you don't see a notification:
- - Go to Account → Settings → Privacy & Security → Manage connected apps
- Find and approve your client
After approving, complete setup:
CODEBLOCK6
Step 5: Verify It Works
CODEBLOCK7
You should see your account info and current balance. You're done! 🎉
For the Agent
This section tells the agent how to use this skill effectively.
When to Use This Skill
Use this skill when the user asks about:
- - Balance: "How much money do I have?", "What's my balance?"
- Transactions: "What did I spend on X?", "Show recent transactions"
- Spending analysis: "How much did I spend on coffee this month?"
- Savings: "How much is in my savings?", "Move £X to my holiday pot"
- Notifications: "Send a reminder to my Monzo app"
Common Patterns
CODEBLOCK8
Important Notes for Agents
- 1. Money is in pence: £50 = 5000, £1.50 = 150
- Dates can be relative:
--since 7d means last 7 days - Use human-readable output by default (no
--json flag) - Pot IDs: Use
scripts/pots.sh first to get pot IDs before depositing/withdrawing - Multiple accounts: User may have personal, joint, and business accounts. Default is personal. Use
scripts/whoami.sh to see all accounts.
Error Handling
If you see forbidden.insufficient_permissions:
- - Tell the user to check their Monzo app and approve API access
- Then run INLINECODE23
If you see MONZO_KEYRING_PASSWORD not set:
- - The env var isn't available in the process environment
- Guide user to set it using one of the methods in Step 1 of the setup guide
Script Reference
balance - Check Account Balance
CODEBLOCK9
Output:
CODEBLOCK10
transactions - Transaction History
Fetches all available transactions (paginated), displayed newest first.
CODEBLOCK11
Output:
CODEBLOCK12
pots - Savings Management
CODEBLOCK13
Output (list):
CODEBLOCK14
feed - Send App Notifications
CODEBLOCK15
whoami - Check Authentication
CODEBLOCK16
receipt - Attach Receipts to Transactions
CODEBLOCK17
webhooks - Manage Webhooks (Advanced)
CODEBLOCK18
Troubleshooting
"forbidden.insufficient_permissions"
Most common issue! Monzo requires app approval (SCA).
Fix:
- 1. Open Monzo app → check for notification → approve
- Or: Account → Settings → Privacy & Security → Manage connected apps → approve
- Run: INLINECODE25
"MONZOKEYRINGPASSWORD not set"
The env var isn't available in the process environment.
Fix: Set MONZO_KEYRING_PASSWORD using any of the methods described in Step 1 of the setup guide, then restart OpenClaw.
"Authorization code has been used"
Each auth code is single-use. Start fresh:
CODEBLOCK19
"No refresh token received"
Your OAuth client isn't set to "Confidential". Create a new client with Confidentiality = Confidential, then:
CODEBLOCK20
"Credentials file not found"
Run setup first:
CODEBLOCK21
"Failed to decrypt credentials"
Wrong MONZO_KEYRING_PASSWORD. Check your config matches what you used during setup.
Security Notes
- - Credentials are encrypted at rest (AES-256-CBC)
- Encryption key is your INLINECODE28
- Access tokens auto-refresh (no manual intervention needed)
- File permissions are set to 600 (owner only)
- All API calls use HTTPS
- No sensitive data is logged
Files
CODEBLOCK22
Credentials: ~/.openclaw/credentials/monzo.json (encrypted, or ~/.clawdbot/credentials/monzo.json on older installs)
API Coverage
| Feature | Scripts |
|---|
| Authentication | setup, whoami |
| Balance |
balance |
| Transactions | transactions |
| Pots (Savings) | pots |
| Feed (Notifications) | feed |
| Receipts | receipt |
| Webhooks | webhooks |
Monzo 银行技能
访问您的 Monzo 银行账户,查询余额、查看交易记录、管理储蓄罐,并向您的 Monzo 应用发送通知。
前提条件
在设置此技能之前,您需要:
- - 一个 Monzo 账户(英国个人、联名或企业账户)
- 手机上安装 Monzo 应用(用于 SCA 授权)
- 运行中的 OpenClaw,且具有工作区访问权限
- 标准工具:curl、jq、openssl、bc(大多数 Linux 系统预装)
快速入门
bash
1. 设置 MONZOKEYRINGPASSWORD 环境变量(参见下方设置密码部分)
2. 在 https://developers.monzo.com/ 创建 OAuth 客户端
- 设置保密性:保密
- 设置重定向 URL:http://localhost
3. 运行设置
scripts/setup.sh
4. 在 Monzo 应用中批准,然后:
scripts/setup.sh --continue
5. 测试
scripts/balance.sh
详细设置指南
步骤 1:设置加密密码
MONZOKEYRINGPASSWORD 环境变量用于加密存储您的 Monzo 凭证。请选择一个强密码并妥善保管——如果您迁移或恢复此技能,将需要它。
有几种方式提供此变量,请选择适合您设置的方式:
选项 A:OpenClaw 技能配置(最简单)
添加到您的 OpenClaw 配置中(例如 openclaw.json):
json5
{
skills: {
entries: {
monzo: {
enabled: true,
env: {
MONZOKEYRINGPASSWORD: 在此处选择一个安全密码
}
}
}
}
}
然后重启:openclaw gateway restart
注意: 这会将密码以明文形式存储在配置文件中。请确保文件权限严格(chmod 600),且不要提交到版本控制。
选项 B:Shell 环境(将密码保留在配置文件之外)
添加到您的 shell 配置文件(~/.bashrc、~/.zshrc 等):
bash
export MONZOKEYRINGPASSWORD=在此处选择一个安全密码
然后重启您的 shell 和 OpenClaw。
选项 C:systemd EnvironmentFile(用于服务器部署)
创建一个密钥文件(例如 /etc/openclaw/monzo.env):
MONZOKEYRINGPASSWORD=在此处选择一个安全密码
设置权限:chmod 600 /etc/openclaw/monzo.env
在 systemd 单元中引用:EnvironmentFile=/etc/openclaw/monzo.env。
选项 D:密码管理器/密钥管理器
使用您偏好的密钥工具在运行时注入环境变量。任何能在进程环境中设置 MONZOKEYRINGPASSWORD 的方法都可行。
步骤 2:创建 Monzo OAuth 客户端
- 1. 访问 https://developers.monzo.com/ 并使用您的 Monzo 账户登录
- 点击 Clients → New OAuth Client
- 填写:
-
名称:OpenClaw(或您偏好的名称)
-
Logo URL:
(留空)
-
重定向 URL:http://localhost ← 必须完全一致,无尾部斜杠
-
描述:
(留空)
-
保密性:
保密 ← ⚠️ 重要!启用刷新令牌
- 4. 点击 Submit
- 记下您的 Client ID(oauth2client_...)和 Client Secret(mnzconf....)
步骤 3:运行设置向导
bash
scripts/setup.sh
向导将:
- 1. 询问您的 Client ID 和 Client Secret
- 提供一个授权 URL,供您在浏览器中打开
- 要求您粘贴返回的重定向 URL
- 将代码交换为访问令牌
- 保存加密的凭证
替代方案:非交互模式(适用于自动化或代理):
bash
scripts/setup.sh --non-interactive \
--client-id oauth2client_xxx \
--client-secret mnzconf.xxx \
--auth-code eyJ...
步骤 4:在 Monzo 应用中批准(SCA)
⚠️ 此步骤是必需的! Monzo 要求强客户认证。
- 1. 在手机上打开 Monzo 应用
- 查找关于API 访问或新连接的提示
- 点击批准
如果您没有看到提示:
- - 前往 账户 → 设置 → 隐私与安全 → 管理已连接的应用
- 找到并批准您的客户端
批准后,完成设置:
bash
scripts/setup.sh --continue
步骤 5:验证是否正常工作
bash
检查认证
scripts/whoami.sh
检查余额
scripts/balance.sh
您应该能看到您的账户信息和当前余额。大功告成!🎉
供代理使用
本节告诉代理如何有效使用此技能。
何时使用此技能
当用户询问以下内容时使用此技能:
- - 余额:我有多少钱?,我的余额是多少?
- 交易:我在 X 上花了多少钱?,显示最近的交易
- 消费分析:我这个月买咖啡花了多少钱?
- 储蓄:我的储蓄罐里有多少钱?,转 £X 到我的假期罐
- 通知:发送提醒到我的 Monzo 应用
常见模式
bash
我有多少钱?
scripts/balance.sh
显示最近的交易 / 我花了什么?
scripts/transactions.sh # 所有可用交易,最新优先
显示最近 5 笔交易
scripts/transactions.sh --limit 5 # 最近 5 笔
我这周花了什么?
scripts/transactions.sh --since 7d
我这个月买咖啡花了多少钱?
scripts/transactions.sh --search coffee --since 30d
我的储蓄罐有哪些?
scripts/pots.sh
在我的假期基金里存 £50
scripts/pots.sh deposit pot_XXXXX 5000 # 金额以便士为单位!
发送提醒到我的手机
scripts/feed.sh --title 别忘了! --body 检查燃气表
给代理的重要提示
- 1. 金额以便士为单位:£50 = 5000,£1.50 = 150
- 日期可以是相对的:--since 7d 表示最近 7 天
- 默认使用人类可读的输出(无 --json 标志)
- 罐 ID:在存入/取出前,先使用 scripts/pots.sh 获取罐 ID
- 多个账户:用户可能有个人、联名和企业账户。默认为个人账户。使用 scripts/whoami.sh 查看所有账户。
错误处理
如果看到 forbidden.insufficient_permissions:
- - 告诉用户检查他们的 Monzo 应用并批准 API 访问
- 然后运行 scripts/setup.sh --continue
如果看到 MONZOKEYRINGPASSWORD not set:
- - 环境变量在进程环境中不可用
- 引导用户使用设置指南步骤 1 中的方法之一进行设置
脚本参考
balance - 检查账户余额
bash
scripts/balance.sh # 默认账户
scripts/balance.sh acc_... # 指定账户
scripts/balance.sh --json # JSON 输出
输出:
当前余额:£1,234.56
总计(含储蓄罐):£2,500.00
今日已花费:£12.34
transactions - 交易历史
获取所有可用交易(分页),按最新优先显示。
bash
scripts/transactions.sh # 所有交易,最新优先
scripts/transactions.sh --limit 10 # 最近 10 笔
scripts/transactions.sh --since 7d # 仅最近 7 天
scripts/transactions.sh --since 2026-01-01 # 自指定日期起
scripts/transactions.sh --search coffee # 按商户/描述/备注搜索
scripts/transactions.sh --search Pret --since 30d # 组合筛选
scripts/transactions.sh --id tx_... # 获取指定交易
scripts/transactions.sh --json # JSON 输出
输出:
日期 金额 描述 类别
============ ========== =================================== ===============
2026-01-29 -£3.50 Pret A Manger eating_out
2026-01-29 -£12.00 TfL transport
202