akahu-mcp
akahu-mcp
一个将 Akahu(新西兰开放银行)数据暴露给 Claude 等 LLM 智能体的 MCP 服务器。它允许智能体列出你的银行账户、检查投资持仓并提取交易记录以进行分析。
本地 SQLite 缓存 (cache.db) 会在磁盘上保留最近约 90 天的交易记录并进行增量刷新。缓存 TTL 为 24 小时,以匹配 Akahu Personal 每天一次的上游刷新频率;智能体可以在任何工具上通过 force=True 来绕过缓存。
工具
list_accounts(force=False)— 银行/存款账户及其余额。不包含 Sharesight。get_share_holdings(force=False)— Sharesight 投资组合:总价值、明细(回报/资本/货币/股息)以及各持仓行。list_transactions(account, start=None, end=None, limit=100, force=False)— 从本地缓存中获取某个账户的交易记录,如果缓存超过 24 小时,则先从 Akahu 刷新。account通过 ID 或模糊名称子字符串进行匹配。
Related MCP server: financy
设置
如果尚未安装,请安装
uv。设置一个 Akahu 个人应用 (Personal App) — 这些是免费的单用户应用,你可以针对自己的 Akahu 账户创建。你将获得一个
app_token(个人应用的 ID)和一个属于你自己的user_token。在项目根目录创建一个
.env文件:AKAHU_USER_TOKEN=user_token_xxx AKAHU_APP_TOKEN=app_token_xxx运行
uv sync安装依赖。冒烟测试:
uv run python -m akahu_mcp.sync— 应该会打印出你的账户并获取第一个账户的交易记录。
集成到 MCP 主机
Claude Code
claude mcp add akahu --scope user -- uv --directory /absolute/path/to/akahu-mcp run akahu-mcpClaude Desktop
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或你平台上的对应位置:
{
"mcpServers": {
"akahu": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/akahu-mcp", "run", "akahu-mcp"]
}
}
}如果你的主机无法在 PATH 中找到 uv,请将 "uv" 替换为 which uv 命令返回的绝对路径。
注意事项
基于 Akahu 个人应用 构建并测试,该应用每天仅刷新一次上游数据,因此缓存 TTL 设置为 24 小时。商业计划中也存在相同的端点,但在那种情况下可能值得缩短 TTL。
legacy/目录包含本项目最初的两个脚本 (akahu.py,list_accounts.py)。它们仍然可以独立运行 — 使用uv sync --group legacy安装它们的依赖,然后运行uv run --group legacy python legacy/list_accounts.py。
Available Tools
3 toolslist_accountsA
List the user's bank/depository accounts (excludes Sharesight, which has its own tool). Cached for 24h; pass force=True to refresh from Akahu.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses caching (24h) and refresh mechanism (force=True), which is good for a read tool. It does not mention auth requirements or error cases, but the core behavior is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose, then additional details. Every word earns its place, no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists (context signal), the description needn't explain return values. It covers purpose, scope, caching, and parameter usage. For a list tool with one optional parameter, this is complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% parameter description coverage, so the description compensates by explaining the 'force' parameter: pass force=True to refresh from Akahu. This provides necessary semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists 'bank/depository accounts' and explicitly excludes Sharesight, which is handled by a sibling tool. The verb 'list' and specific resource make the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description tells when to use (for bank/depository accounts) and excludes Sharesight. It also explains caching behavior and how to refresh with force=True. It could explicitly mention alternatives (e.g., get_share_holdings for Sharesight) but the exclusion is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_transactionsA
List transactions for a bank account, served from a local cache that keeps the last ~90 days. The cache is refreshed at most once per 24h (Akahu Personal only refreshes upstream daily); pass force=True to bypass the TTL.
Args: account: account id or fuzzy substring match against account name start: ISO date (YYYY-MM-DD), inclusive lower bound on transaction date end: ISO date (YYYY-MM-DD), inclusive upper bound limit: max rows to return (default 100, newest first) force: bypass the 24h cache TTL
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | ||
| start | No | ||
| end | No | ||
| limit | No | ||
| force | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully carries the burden. It discloses caching (last ~90 days, 24h refresh), force parameter effect, and default limit order. It does not cover error handling or edge cases, but the output schema exists for return format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is structured with the main sentence followed by bullet-like Args. It is slightly verbose but each sentence contributes essential information. The purpose is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the 5 parameters and output schema, the description covers caching, date range, limit, and force flag. It lacks mention of error handling or account not found, but is largely complete for a list tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description thoroughly explains all five parameters: account (fuzzy match), start/end (ISO dates), limit (max rows, default 100), force (bypass cache). This adds substantial value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action and resource: 'List transactions for a bank account'. The sibling tools (get_share_holdings, list_accounts) deal with distinct resources, eliminating confusion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains caching behavior and the force parameter to bypass TTL, giving context on when to use this tool. It does not explicitly exclude alternative tools, but the resource difference makes it clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
get_share_holdings - First observed
list_accounts - First observed
list_transactions
TDQS
Scored across 3 tools
Each tool targets a distinct area: share holdings, bank accounts, and transactions. There is no overlap in purpose.
All tool names follow a consistent verb_noun pattern: get_share_holdings, list_accounts, list_transactions.
3 tools cover the core read-only functionalities for personal finance. While limited, it is appropriate for the server's scope.
The set covers accounts, transactions, and investments, but lacks operations like getting a single account detail or investment transactions, leaving some gaps.
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Personal finance for AI agents — onboard, import statements, categorize & budget over MCP.
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
- Era ContextOAuthapp.era
Personal finance, bank account, and shared memory connector for Claude, ChatGPT, Gemini Spark & more
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that integrates with local Ollama LLMs to provide financial analysis through four specialized agents (Market Analyst, Portfolio Manager, Risk Analyst, and Explainability Agent) with comprehensive banking tools.-
- AlicenseNot gradedqualityBmaintenanceMCP server that exposes banking data (connections, accounts, balances, transactions) and agent skills, allowing AI agents to query and refresh financial data via stdio.78 npm6Apache 2.0
- AlicenseNot gradedqualityAmaintenanceA local MCP server that syncs New Zealand bank accounts from Akahu into a local SQLite cache, offering tools for transaction search, spending summaries, cashflow, recurring charges, and more for natural language money queries.MIT
- AlicenseAqualityBmaintenanceAn MCP server exposing the Akahu banking API as tools to list accounts, get balances, and fetch transactions.3AGPL 3.0