yimu-mcp

v0.2.0
@powercess/yimu-mcp Checked 4 days ago Published 1 month ago

一木记账(yimubill.com)网络 MCP…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

auth_status auth_status

查看登录状态(本地配置,不发请求):是否持有 JWT、用户 ID、API 基址。

login_qr_start login_qr_start

创建扫码登录会话(免鉴权)。返回 session_id、qr_payload(login:<session_id>)与二维码图片: 1) 结果附带的 image 内容块可直接在支持图片的 harness 界面展示; 2) text 中内嵌 UTF-8 终端二维码(等宽字体直显,无需打开图片); 3) 图片同时保存到二维码目录(--qr-dir / YIMU_QR_DIR,默认系统临时目录 yimu-mcp/),text 中给出完整路径; 4) 服务端同时把 ANSI 彩色二维码打印到 stderr(服务运行在终端里时控制台直接可见)。 二维码 2 分钟有效,用一木记账 App【首页…

login_qr_poll login_qr_poll

等待/轮询扫码登录结果(免鉴权)。timeout 秒内每 3 秒查询一次,用户扫码后返回 status=success 与用户对象(JWT 仅保留在当前进程内部);timeout=0 只查一次。默认 120 秒。

ParameterTypeDescription
session_id *stringlogin_qr_start 返回的 session_id
timeoutnumber等待秒数,0=只查一次;默认 120

login_email login_email

邮箱密码登录(免鉴权)。密码按网页端加密方案(AES-128-ECB)加密后提交;仅返回登录状态与用户对象。不传 email/password 时使用环境变量 YIMU_EMAIL/YIMU_PASSWORD(未配置则报错)。请优先使用扫码登录(更安全)。

ParameterTypeDescription
emailstring一木记账账号邮箱;缺省用环境变量 YIMU_EMAIL
passwordstring账号密码;缺省用环境变量 YIMU_PASSWORD(仅本次调用,不落盘)

get_me get_me

查询当前用户信息(POST /user/getUserInfoById);响应顶层 token 会自动刷新 JWT。

ParameterTypeDescription
user_idstring用户 ID,缺省用配置/登录值

sync_pull sync_pull

增量拉取业务数据(GET /updateTime/getUpdateDataPage/{userId}/{time})。默认返回摘要:syncTime、各实体计数、收支合计、最近10笔、分类Top10、资产列表——适合 AI 快速分析账目;需要完整明细时传 summary=false,各实体按业务字段精简返回(Bill 只含 billId/cost/日期/分类/备注等)。time 为上次同步时间戳(ms),缺省 0 表示全量。

ParameterTypeDescription
summaryboolean默认 true:返回摘要;false 返回全部实体明细(已精简)
timenumber上次同步时间戳(ms),0=全量
user_idstring

get_delete_history get_delete_history

查询删除记录(GET /deleteHistory/getDeleteHistory/{userId}/{time}),time 缺省 0 全量。

ParameterTypeDescription
timenumber起始时间戳(ms)
user_idstring

get_bill_count get_bill_count

查询账单总数(GET /bill/getBillCount/{userId})。

ParameterTypeDescription
user_idstring

get_book_bills get_book_bills

分页查询账本账单(GET /bill/getAccountBillPage/{userId}/{bookId}/{page})。返回 {syncTime, hasMoreData, billCount, totals:{income,expense}, bills:[精简账单]};账单只含 billId/cost/日期/分类/备注/账户等业务字段。page 从 0 起,按 hasMoreData 翻页。

ParameterTypeDescription
book_id *string账本 ID
pagenumber页码,从 0 开始
user_idstring账本所属用户 ID,缺省用当前用户

get_book_last_time get_book_last_time

查询账本最后同步时间戳(ms)(GET /bill/getAccountLastTime/{userId}/{bookId}),可作增量同步游标。

ParameterTypeDescription
book_id *string账本 ID
user_idstring

get_share_accounts get_share_accounts

查询共享账本列表(GET /accountBook/getShareAccount/{userId})。

ParameterTypeDescription
user_idstring

get_assets get_assets

查询资产列表(GET /asset/getAsset/{userId}/{time}),time 为起始时间戳(ms),缺省 0 全量;每个资产只保留业务字段(名称/余额/类型/分组)。

ParameterTypeDescription
timenumber起始时间戳(ms)
user_idstring

get_account_members get_account_members

查询账本成员(GET /accountBook/getAccountMember/{userId}/{bookId})。

ParameterTypeDescription
book_id *string账本 ID
user_idstring

get_account_delete_history get_account_delete_history

查询账本删除历史(GET /accountBook/getAccountDeleteHistory/{userId}/{ownerId}/{bookId}/{lastSyncTime})。

ParameterTypeDescription
book_id *string账本 ID
last_sync_timenumber上次同步时间戳(ms)
owner_idstring账本所属用户 ID
user_idstring

get_currency get_currency

查询币种数据(GET /currency/getCurrencyData/{userId})。

ParameterTypeDescription
user_idstring

get_category_info get_category_info

查询分类信息(图标/预设分类,GET /icon/getCategoryInfo/{userId})。

ParameterTypeDescription
user_idstring

sync_start sync_start

开始同步限流会话(免鉴权,POST /bookkeeping/rateLimit/sync/start)。批量写操作前先 start,全部完成后务必 sync_end 归还会话,避免触发限流。返回 {syncCount, sessionId}。

sync_end sync_end

结束同步限流会话(免鉴权,POST /bookkeeping/rateLimit/sync/end?sessionId=)。

ParameterTypeDescription
session_idstringsync_start 返回的 sessionId

save_bill save_bill

新增或更新账单(POST /bill/addOrUpdateBill,upsert:带 billId 为更新,缺省为新增)。自动归一化:tags 数组→JSON 字符串、recordTime 缺省取 updateTime/当前时间、billId 超 int32 自动重生成。bill 字段: billId 主键;cost 金额(元);time 记账时间(ms);billType 记录方式(1快捷/2手动/3导入/4周期/5自动/6模板);parentCategoryId/childCategoryId 分类(收支由分类决定);remark 备注;assetId 账户;bookId 账本;tags 标签(数组或 JSON 字符串均可);recordTime 记录时间;reimbursement/…

ParameterTypeDescription
bill *object账单对象,见描述字段说明

save_bills save_bills

批量新增/更新账单(POST /bill/addOrUpdateBillList)。自动按 100 条分批、每批 updateTime 递增(与网页端一致)。bill 字段同 save_bill。

ParameterTypeDescription
bills *array账单对象数组(自动分批)

delete_bill delete_bill

删除账单(POST /bill/deleteBill,按 billId 删除)。

ParameterTypeDescription
bill_id *string账单 ID
user_idstring

save_asset save_asset

新增或更新资产(POST /asset/addOrUpdateAsset,upsert:带主键为更新)。entity 字段:assetId 主键;assetName 名称;assetType 类型;assetNumber 余额;totalQuota 总额度;intoTotalAsset 计入总资产;hide 隐藏;bookId 账本;currency 币种;remark/simpleName/cardCode/positionWeight 可选;userId/updateTime 自动填充

ParameterTypeDescription
entity *object资产对象

delete_asset delete_asset

删除资产(POST /asset/deleteAsset)。entity 需携带主键字段(assetId)与 userId。

ParameterTypeDescription
entity *object资产对象(含主键 assetId)

save_account_book save_account_book

新增或更新账本(POST /accountBook/addOrUpdateAccountBook,upsert:带主键为更新)。entity 字段:accountBookId 主键;bookName 账本名;bookType 账本类型;shareUsers 共享用户;字段按服务端契约传递

ParameterTypeDescription
entity *object账本对象

delete_account_book delete_account_book

删除账本(POST /accountBook/deleteAccountBook)。entity 需携带主键字段(accountBookId)与 userId。

ParameterTypeDescription
entity *object账本对象(含主键 accountBookId)

save_tag save_tag

新增或更新标签(POST /tag/addOrUpdateTag,upsert:带主键为更新)。entity 字段:tag 字段无快照数据;至少携带 tagId/tagName 与 userId,其余按服务端契约传递

ParameterTypeDescription
entity *object标签对象

delete_tag delete_tag

删除标签(POST /tag/deleteTag)。entity 需携带主键字段(tagId)与 userId。

ParameterTypeDescription
entity *object标签对象(含主键 tagId)

save_transfer save_transfer

新增或更新转账(POST /transfer/addOrUpdateTransfer,upsert:带主键为更新)。entity 字段:transferId 主键;cost 金额;serviceCharge 手续费;time 时间;fromAssetId/toAssetId 转出/转入账户;toCost 到账金额;billId 关联账单;remark 备注

ParameterTypeDescription
entity *object转账对象

delete_transfer delete_transfer

删除转账(POST /transfer/deleteTransfer)。entity 需携带主键字段(transferId)与 userId。

ParameterTypeDescription
entity *object转账对象(含主键 transferId)

save_lend save_lend

新增或更新借贷(POST /lend/addOrUpdateLend,upsert:带主键为更新)。entity 字段:lendId 主键;type 类型(借出/借入);number 金额;interest 利息;outTime/inTime 借出/归还时间;assetId 关联账户;repaymentAssetId 还款账户;remark 备注

ParameterTypeDescription
entity *object借贷对象

delete_lend delete_lend

删除借贷(POST /lend/deleteLend)。entity 需携带主键字段(lendId)与 userId。

ParameterTypeDescription
entity *object借贷对象(含主键 lendId)

save_parent_category save_parent_category

新增或更新一级分类(POST /parentCategory/addOrUpdateParentCategory,upsert:带主键为更新)。entity 字段:categoryId 主键;categoryName 名称;iconUrl 图标;positionWeight 排序;hide 隐藏;categoryType 类型

ParameterTypeDescription
entity *object一级分类对象

delete_parent_category delete_parent_category

删除一级分类(POST /parentCategory/deleteParentCategory)。entity 需携带主键字段(categoryId)与 userId。

ParameterTypeDescription
entity *object一级分类对象(含主键 categoryId)

save_child_category save_child_category

新增或更新二级分类(POST /childCategory/addOrUpdateChildCategory,upsert:带主键为更新)。entity 字段:categoryId 主键;categoryName 名称;iconUrl 图标;parentCategoryId 所属一级分类;positionWeight 排序;hide 隐藏;categoryType 类型

ParameterTypeDescription
entity *object二级分类对象

delete_child_category delete_child_category

删除二级分类(POST /childCategory/deleteChildCategory)。entity 需携带主键字段(categoryId)与 userId。

ParameterTypeDescription
entity *object二级分类对象(含主键 categoryId)

save_reimbursement save_reimbursement

新增或更新报销(POST /reimbursement/addOrUpdateReimbursement,upsert:带主键为更新)。entity 字段:reimbursement 无快照数据;携带 billId/remark/金额字段与 userId,按服务端契约传递

ParameterTypeDescription
entity *object报销对象

delete_reimbursement delete_reimbursement

删除报销(POST /reimbursement/deleteReimbursement)。entity 需携带主键字段(reimbursementId)与 userId。

ParameterTypeDescription
entity *object报销对象(含主键 reimbursementId)

save_refund save_refund

新增或更新退款(POST /refund/addOrUpdateRefund,upsert:带主键为更新)。entity 字段:refundId 主键;billId 关联账单;refundNum 退款金额;refundInfos 退款明细(JSON)

ParameterTypeDescription
entity *object退款对象

delete_refund delete_refund

删除退款(POST /refund/deleteRefund)。entity 需携带主键字段(refundId)与 userId。

ParameterTypeDescription
entity *object退款对象(含主键 refundId)

save_bill_file save_bill_file

新增或更新账单附件(POST /billFile/addOrUpdateBillFile,upsert:带主键为更新)。entity 字段:fileId 主键;billId 关联账单;remotePath 远程路径;fileName 文件名;fileSize 大小;transferId/lendId 可选

ParameterTypeDescription
entity *object账单附件对象

delete_bill_file delete_bill_file

删除账单附件(POST /billFile/deleteBillFile)。entity 需携带主键字段(fileId)与 userId。

ParameterTypeDescription
entity *object账单附件对象(含主键 fileId)

save_bill_import save_bill_import

新增或更新账单导入记录(POST /billImport/addOrUpdateBillImport,upsert:带主键为更新)。entity 字段:billImport 导入记录;无快照数据,按服务端契约传递

ParameterTypeDescription
entity *object账单导入记录对象

save_asset_history save_asset_history

新增或更新资产变动记录(POST /assetHistory/addOrUpdateAssetHistory,upsert:带主键为更新)。entity 字段:assetHistoryId 主键;assetId 账户;time 时间;currentNum 变动后余额;changeNum 变动额;changeContent 变动说明

ParameterTypeDescription
entity *object资产变动记录对象

delete_asset_history delete_asset_history

删除资产变动记录(POST /assetHistory/deleteAssetHistory)。entity 需携带主键字段(assetHistoryId)与 userId。

ParameterTypeDescription
entity *object资产变动记录对象(含主键 assetHistoryId)

parse_bill_text parse_bill_text

解析记账原始文本(GET /bill/analysisBillInfoT/{userId}/{text}),返回结构化账单信息。

ParameterTypeDescription
text *string原始记账文本,如「午饭 25 元 餐饮」
user_idstring