Skip to main content
Glama
qianji-mcp-server

qianji-mcp-server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
QIANJI_DBNo本地 SQLite 镜像路径(不同账号须使用独立文件)。./data/qianji.db
QIANJI_TZNo覆盖账务时区(IANA 时区名,如 Asia/Shanghai、Asia/Tokyo);默认使用系统时区。
QIANJI_LINENo线路:client-api / client-qianji / client-qianjiga;默认跟随地区。
QIANJI_EMAILYes钱迹登录邮箱或手机号。
QIANJI_REGIONNo地区:cn / overseas。cn
QIANJI_BOOK_IDNo新增和转账默认使用的账本 ID(数字字符串,-1 为默认账本)。-1
QIANJI_DEVNAMENo上游设备名,会显示在钱迹「登录设备」列表中。qianji-mcp-server
QIANJI_BASE_URLNo显式指定上游地址,设置后跳过地区与线路推导。
QIANJI_PASSWORDNo明文密码(启动时在内存中转为 MD5,不落盘)。与 QIANJI_PWD_HASH 二选一。
QIANJI_PWD_HASHNo密码的 32 位小写裸 MD5(推荐,优先于明文密码)。与 QIANJI_PASSWORD 二选一。
QIANJI_TIMEOUT_MSNo单次上游请求超时(毫秒)。30000
QIANJI_TRACE_FILENo可选:将上游请求元数据写入 JSONL 排障(不含密码与 token)。
QIANJI_REMARK_STYLENo备注风格 JSON 路径(文件存在才生效)。./data/remark-style.json
QIANJI_TOOL_PROFILENo工具配置:full(15 个工具)或 daily(13 个日常工具,隐藏 probe/sync)。full
QIANJI_LINE_FALLBACKNo读请求连不上时自动换同地区备用线,0 关闭。1
QIANJI_CLIENT_PROFILENo客户端画像:fltwin(默认)/ 4.3.7 / 4.5.1b3。fltwin

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

小票用 qianji_record_receipt;手工收支用 qianji_create_bill。先搜索账户和分类,再原样使用 ID。 金额使用账户原币十进制字符串。小票照抄票面总额,只在跨币种结算后补实际扣款。当前完整支持 JPY / CNY。 每次写入用参数 requestId 或宿主 _meta[qianji/requestId] 提供稳定操作键。两处同时提供时必须一致。重试或补结算复用原键,unknown 按 nextCall 查回执。 收到 syncing 后按 retryAfterMs 查询 qianji_status。新增收支等 catalogs.accounts 和目标账本出现在 catalogs.categoryBooks,转账只等账户;首次历史查询和修改、删除等 mirror.initialSyncComplete。就绪后重试原调用。

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
qianji_record_receiptA

从一张消费小票记一笔支出,照抄商户、票面时间和总额。跨币种实扣未知时只保存待结算小票。

qianji_create_billA

手工记一笔收入或支出。按账户原币填金额,小票改用 qianji_record_receipt。

qianji_create_transferB

记录两个账户间的实际转账。跨币种须填写实际到账金额,转账单独统计。

qianji_update_billA

修改一笔收支账单,changes 只填要修改的字段。换到不同币种的账户须同时提供实际金额。

qianji_delete_billA

根据确认过的账单 ID 删除账单,返回删除前的摘要。

qianji_get_writeB

用操作键查询单笔写入或待结算小票。未知状态触发回读核对。

qianji_list_writesB

按时间列最近的写入回执和本地待结算小票。

qianji_list_booksB

搜索账本,返回可用于记账的 bookId 与默认账本。

qianji_search_categoriesA

按账本、收支类型和名称搜索分类,选择具体路径后将 categoryId 传给写工具。

qianji_search_accountsA

按名称或 ID 搜索支付账户,返回 accountId、账户币种与原币余额。默认隐藏归档账户。

qianji_list_billsC

按日期、账户币种、分类 ID 或关键词查询账单。amount 为实扣或实收,originalReceipt 保留票面。

qianji_get_statsB

账户收支用 account;旅行消费原币用 receipt(仅本地有票面且已入账的账单)。按币种分别合计,可另取参考估值。

qianji_statusA

检查本地镜像规模、首次同步状态、账务时区和当前登录状态。本工具离线可用。

qianji_probeA

检查上游协议是否可达。mode=login 时额外验证配置的账号。

qianji_syncC

拉取账单并刷新本地镜像。complete 表示是否翻完全部页。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 15 tools

Disambiguation4/5

Most tools have clearly distinct purposes: manual bills, receipts, transfers, queries, and sync/status utilities are separated by descriptions. Slight potential overlap remains between create_bill and record_receipt, and between list_bills and get_stats, but descriptions resolve the intended boundary.

Naming Consistency4/5

All tools use the qianji_ prefix and snake_case, with most following a verb_noun pattern such as create_bill or list_writes. status, probe, and sync are bare names without an object, which is a minor deviation but still readable and predictable.

Tool Count5/5

Fifteen tools is well-scoped for a finance MCP covering bookkeeping writes, reads, reference data lookup, sync, and diagnostics. Each tool appears to serve a distinct workflow rather than duplicating another.

Completeness4/5

The surface covers bill create/update/delete/list, receipt recording, transfers, write status, books, categories, accounts, stats, sync, and diagnostics. Minor gaps likely exist around transfer modification or full book/account management, but core bookkeeping workflows are covered.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues