
Asset Notation
io.github.assetnotation由 GitHub 账号 assetnotation 发布v0.1.12更新于 Nov 7, 2026
Read and maintain an Asset Notation file on disk: net worth, holdings, valuations, CSV import.
概览
读取并维护本地 Asset Notation JSON 文件中的持仓与估值,让助手汇报净资产并记录新的数值。
- 可以做什么
- 读取整份文档,或列出持仓、机构与估值
- 按每个持仓的最新估值精确计算各币种净资产,并给出所用最早估值日期
- 新增或更新持仓、记录带日期的估值,校验通过后整体重写文件
- 按内置 schema 校验文档,报告错误与提示
- 把账户 CSV 导入该格式,自动识别分隔符与逗号小数
- 适用场景
- 当你以 Asset Notation 格式保存个人或家庭的账户、房产与贷款记录,并希望助手在不离开本机的情况下回答净资产问题或记录新的余额时使用。
- 运行要求
- 通过 npx(Node.js)以 stdio 在本机运行。需用 mcp 子命令并给出 JSON 文件的绝对路径;文件不存在时会在写入第一个持仓时创建。无需账号、API 密钥或网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 Asset Notation,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
asset-notation
Reference implementation of Asset Notation, an open format for what you own and owe, over time.
Three jobs. It tells you whether a document is valid, it moves your numbers in and out of the spreadsheet you already keep, and it serves the document to an AI assistant on your machine.
Why the CSV half exists
Nobody retypes their accounts to try a specification. A format you cannot get your existing numbers into is a format you never start using, so the converter is not a convenience here, it is the front door.
One row is one holding and what it was last worth, which is the shape everyone already has: a line per account, a label, a balance, a date.
Two details decide whether this works outside an English-speaking office, and both are handled rather than documented away:
- A spreadsheet saved from a French, German or Spanish Excel separates columns
with a semicolon and writes decimals with a comma. Read as comma-separated,
4210,55becomes two columns and every balance is destroyed. The delimiter is detected from the header, and an amount is read against the delimiter found. - Amounts stay strings, all the way through. No float ever rounds a balance.
Thousands grouping is dropped, including the no-break spaces a spreadsheet
writes (1 234,56 and 1,234.56 both land on 1234.56). A date is read the
same way: 24/06/2026 and 24.06.2026 day first, 06/24/2026 month first, and
when both fit, the delimiter decides.
Use it from an AI assistant
asset-notation mcp <file.json> is a Model Context Protocol
server over stdio. The assistant reads and maintains the file. The server itself
opens no socket and uses no network, but every answer it gives goes to the
assistant, and the assistant decides where it goes next: an assistant whose model
runs in the cloud sends the document to its provider. Choose the client with that
in mind. The file is created on the first holding when it does not exist.
In the configuration file of an assistant's desktop app, or of any MCP client,
under mcpServers:
The same entry for a generic MCP client: command npx, arguments
-y asset-notation mcp /home/you/wealth.json, transport stdio. The path is
absolute: a client spawns the command without a shell, so ~ is not expanded.
Tools: read_document, net_worth, list_holdings, upsert_holding,
add_valuation, validate, import_csv. Resource: asset-notation://document.
Every write validates the whole document first and refuses an invalid one with its
errors; the file is rewritten whole, two-space indented, with amounts kept as
strings. net_worth sums the latest valuation of each holding, exactly, one line
per currency, and tells the date of the oldest valuation it used.
If you are an AI asked to manage someone's wealth
This package reads and writes one JSON file in the Asset Notation format: a list of
holdings (accounts, properties, loans, each an asset or a liability), of
institutions, and of dated valuations whose amounts are decimal strings. Start
it with npx -y asset-notation mcp <file.json>, then call list_holdings, record
values with add_valuation, and answer with net_worth. Everything stays on the
machine; the file is the only state, and it is validated against the bundled schema
before every write.
Validating
The schema is chosen by the version the document declares, matched on major.minor: a document says what it is and is judged against that. Schemas ship inside the package, so validation needs no network and no registry - the same property the format itself is asking for.
On top of the schema, the document-level rules a JSON Schema cannot express:
The unresolved reference is deliberate and it is the interesting one. Any subset of a valid document is itself valid, so a statement covering three accounts out of twelve, naming a bank it does not describe, is a legitimate partial disclosure - not a broken file. Reporting it as an error would forbid exactly the sharing the format exists for.
validate() never throws on a malformed document: reporting what is wrong is
the job.
The specification's conformance corpus (conformance/, one file per version,
mirrored verbatim like the schemas) runs in the test suite: every case states
the verdict this validator must reach, so the library and the specification
cannot drift apart silently.
API
fromCsv takes generatedAt rather than reading the clock, so the same input
always produces the same bytes - which is what lets a converted file be diffed
or committed.
Exit codes
0 valid, 1 invalid, 2 the command was wrong. Diagnostics go to stderr and
the result to stdout, so a conversion can be piped while its warnings stay
readable.
Licence
Apache-2.0, the same as the specification.
来源:README.md,提交 92a523a
工具
0版本历史
6- v0.1.12最新Nov 7, 2026
- v0.1.11Nov 5, 2026
- v0.1.10Nov 3, 2026
- v0.1.9Nov 1, 2026
- v0.1.8Oct 30, 2026
- v0.1.7Oct 24, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分