MyLife Finance
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MYLF_DATA_DIR | No | Directory for the SQLite database used by the MCP server (stdio or HTTP mode). | |
| MYLF_HTTP_PORT | No | Port for the Streamable HTTP MCP server. | |
| MYLF_HTTP_TOKEN | No | Bearer token that must be set when exposing the HTTP MCP server on a LAN; the username in the URL only selects the account partition, not credentials. | |
| MYLF_ADMIN_PASSWORD | No | Initial admin password for the HTTP workbench; if unset, an auto-generated password is written to /data/ADMIN-PASSWORD.txt. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| tx_addA | 记一笔收支或转账。account 必填;category/type/amount 按需。账户、分类、成员、商家、项目不存在时按名自动创建。userId 可选(默认 default)。 |
| tx_listB | 查询账目,支持按 type/account/category/member/merchant/project/日期区间/tag 过滤,倒序返回。返回 total(命中总数)、pages、sum(跨页全部合计)与当前页 records。userId 可选。 |
| tx_updateC | 按 id 修改一笔交易。userId 可选。 |
| tx_deleteC | 按 id 删除一笔交易。 |
| account_addC | 新增账户。userId 可选。支持卡号(cardNo)与备注(note)。 |
| account_listC | 列出账户(按用户隔离)。 |
| account_updateA | 修改账户(名称/类型/余额/币种/卡号/备注/归档)。传 balance 时默认生成一条「余额调整」流水(收入或支出),使账户余额等于目标值;adjustBalance=false 则直接改期初余额。同一用户下账户名不可重复。 |
| account_deleteB | 删除账户(仅当该用户下无交易引用时;否则请改用归档)。 |
| category_addC | 新增分类(INCOME/EXPENSE)。userId 可选。 |
| category_listC | 列出分类(按用户隔离)。 |
| member_addD | 新增成员。userId 可选。 |
| member_listB | 列出成员(按用户隔离),供下拉联动。 |
| merchant_addC | 新增商家。userId 可选。 |
| merchant_listB | 列出商家(按用户隔离),供下拉联动。 |
| merchant_updateA | 修改商家(名称/分类/图标/颜色)。同用户下名称不可重复。userId 可选。 |
| merchant_deleteB | 删除商家(仅当无交易引用时)。 |
| project_listB | 列出财务项目(按用户隔离),供下拉联动。 |
| user_listB | 列出全部用户(多租户辅助)。 |
| user_createC | 新建用户(用于 Octop 多租户隔离的 userId 维度)。 |
| report_monthlyB | 某月收支汇总:总收入、总支出、净额、按分类/账户明细。参数 year/month,默认当前月。userId 可选。 |
| report_by_categoryA | 按分类汇总金额与笔数。type 默认 EXPENSE,可加 from/to 日期区间。userId 可选。 |
| report_budgetB | 预算执行报表:按年(可再按月筛选)返回各分类的预算 / 已用 / 剩余 / 使用率;同分类同时有年预算与月预算时,月预算作为年预算的 children 返回(年/月两级)。month 传 all 表示不限月份。userId 可选。 |
| report_receivablesC | 应收应付汇总:按状态统计与未结清总额、明细列表。userId 可选。 |
| report_overviewB | 多维报表:一次返回收入/支出按一级分类、以及账户/成员/商家/项目的收支聚合。支持 type/from/to/account/member/merchant/project/categoryId/q 统一筛选。转账不计入收支。 |
| dashboard_buildA | 生成自包含 HTML 财务看板(内联数据 + Chart.js),返回文件路径与可访问 URL(/dashboard.html)。纯前端筛选/切换图表。userId 可选(决定快照归属)。 |
| import_from_mylifeA | 从 MyLifeOS 数据库只读导入历史数据到独立库(不反向写回,避免破坏同步)。dbPath 可选。userId 决定归属用户。scope: all=全量;categories=仅导入账户(期初账户)+分类(期初分类),用于空库初始化。 |
| category_updateB | 修改分类(名称/类型/图标/颜色/父级)。同用户下 名称+类型 不可重复。userId 可选。 |
| category_deleteB | 删除分类(仅当该用户下无交易引用时)。 |
| category_duplicatesB | 分类查重(只读):找出完全重名、空壳(0 交易 0 子级)、同名不同父级的分类,并给出建议保留项。type 可选(INCOME/EXPENSE)。 |
| category_mergeA | 合并分类:把若干来源分类的交易/子级/预算迁移到目标分类并删除来源。类型必须一致,且目标不能位于来源子树内。dryRun=true 只预览。 |
| category_dedupeA | 批量去重:自动合并「完全重名」分组(保留交易最多的一个),includeShell=true 时连空壳同名一起合并。默认 dryRun 只预览,需显式传 dryRun:false 才落库。 |
| project_addC | 新增财务项目。userId 可选。 |
| project_updateC | 修改财务项目。userId 可选。 |
| project_deleteB | 删除财务项目(仅当无交易引用时)。 |
| member_updateB | 修改成员(姓名/电话/邮箱/图标/颜色/默认)。同用户下姓名不可重复。userId 可选。 |
| member_deleteC | 删除成员(仅当无交易引用时)。 |
| receivable_addC | 新增应收应付。counterparty 与 amount 必填。userId 可选。 |
| receivable_updateC | 修改应收应付。userId 可选。 |
| receivable_deleteD | 删除应收应付。 |
| receivable_listC | 列出全部应收应付(按用户隔离),供工作台管理。 |
| budget_addA | 新增预算。amount 必填;category 传一级分类(传二级会自动上卷到其一级);period=YEARLY(默认,按月预算则传 MONTHLY 并给 month)。同分类同期间重复新增会更新金额。userId 可选。 |
| budget_updateC | 修改预算。userId 可选。 |
| budget_deleteC | 删除预算。 |
| budget_listB | 列出全部预算(按用户隔离),供工作台管理。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 44 tools
Resources are cleanly prefixed (tx_, account_, category_, member_, merchant_, project_, receivable_, budget_), so most tools are easy to distinguish. The only soft overlaps are within reporting (report_monthly vs report_by_category vs report_overview) and within category cleanup (category_duplicates vs category_merge vs category_dedupe), but the descriptions explain the differences well enough to choose correctly.
Every tool follows a predictable snake_case resource_action pattern: tx_add/list/update/delete, account_*, category_*, budget_*, report_*, plus dashboard_build and import_from_mylife. No mixing of camelCase, vague verbs, or inconsistent conventions.
44 tools is well above a comfortable surface size for an agent to navigate, even accounting for the broad domain (transactions, accounts, categories, members, merchants, projects, receivables, budgets, reports, dashboard, import). Many resources repeat the full add/list/update/delete quartet, which inflates the count beyond what most workflows need.
Coverage is strong: full CRUD for transactions, accounts, categories, members, merchants, projects, receivables, and budgets, plus reporting, dashboard generation, and import. Minor gaps exist (no category_get/account_get single-fetch, no user_update/delete, no export or recurring-transaction handling), but agents can work around these via list calls.