claim-reconciliation-agent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claim-reconciliation-agentSplit this platform payout by merchant and generate the 13-column claim template."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
claim-reconciliation-agent
AI + MCP + Skill 的 ToB 内部效率产品:把「平台账单 → 企业 OA 回款拆分」这条纯人工财务认领链路,做成只读核验 + 可解释候选生成的自动化工具。
6 角色多 Agent 协作 | 文件单写者锁 | 全链路零写操作安全边界
它解决什么问题
平台按账期给商家打款,财务需要把「一笔到账流水」拆分到多个商家/酒店,再在 OA 里逐行认领。人工做这件事的痛点:流水号要从 OA 页面逐条抄、金额要按商家拆分对账、合同责任人要逐个查、抄错一个号就导入失败。
本项目的做法:本地 MCP Server(只读)+ 编排 Skill——用户人工登录 OA 并导出账单后,系统只读采集合同与银行流水、按商家精确拆分金额、生成可解释的认领候选,最后填入固定 13 列模板供人工复核导入。
产品边界(硬约束):不保存账号密码,不自动登录,不绕过验证码,不自动导入 OA,不执行财务核销。全程 write_actions=0。
Related MCP server: maxed-mcp
一真源 + 看板机制
collaboration 台账思想落地的「一真源」原则:同一份数据只允许一个权威出处,其余全部是脚本自动生成的派生物——手改派生物会被单测拦下。scripts/build_dashboard.py解析台账生成state.json+ 看板页;serve_dashboard.py本机起一个小站(3 秒轮询刷新);watch_dashboard.py纯标准库守护自动重建。看板含每个阶段的 owner、verifier、phase、next_action(演示图见
docs/preview.html,数据为脱敏重绘的演示数据)。
6 角色多 Agent 协作 + 单写者锁
AGENTS.md 治理 6 个角色:产品规划 / 项目经理 / 产品开发 / QA / Debug / 发布运营,每个角色绑定专属 Skill(grill-me、to-spec、implement、code-review、debug-agent 等)。
协作纪律踩过的坑,做成了机器可检查的机制:
文件单写者锁(
scripts/agent_file_lock.py):改共享文件前必须抢锁,抢不到必须 PAUSE,不许硬破别人的锁;30 分钟过期自动释放,PM 是唯一仲裁者。缘起是实测两个 Agent 并发改写同一文件导致提交覆盖。验收闭环:开发完成只能提交 REVIEW、不得自验;失败走 QA → Debug → QA 独立回归;失败/非唯一统一返回
PAUSED,永不出PASS。
零写边界与门禁
MCP 工具白名单只有 4 个只读能力(状态检查 / 就绪检测 / 流水号证据 / 模板生成到本地),禁登录、禁上传、禁导入、禁核销。
结构化阻塞协议
TASK_BLOCKED:失败/非唯一时返回run_id+blocker_fingerprint+ 证据摘要 + 允许动作,从最近安全阶段恢复。浏览器授权弹窗从「每步一次」压缩到「全程一次」(一次性授权 + 会话复用 + 闲置回收)。
生成侧门禁:酒店代码逐行稽核(错/空即非 0 退出)、模板缺号硬门禁、来源门禁(见下)。
反事故案例:8 个伪造流水号
一次交付中,交叉取证发现 8 个流水号是伪造的——与实际抽样交集为空、账期错位。处置:落地来源门禁脚本(scripts/verify_flow_provenance.py),把已交付物全部标记为不可用并撤回,之后每一笔流水号都必须带可回溯的来源证据。
这件事沉淀成一条原则:数据运营里,口径错误的代价远大于效率损失。
量化口径(均为项目真实记录):
单账期逐日对账 diff = 0.0
变异测试 18/18 全捕获(验证门禁真的有效,不是摆设)
交付治理 Issue DONE 24/31(≈77%)
累计 48 张已导入领款表(脱敏统计口径)
浏览器授权弹窗「每步一次 → 全程一次」
write_actions = 0 零写操作
快速开始
# 1) 安装依赖(Python 3.11+)
pip install -e .
pip install pytest
# 2) 跑测试(仓库内全部为合成假数据,无任何真实业务数据)
set PYTHONPATH=src # Windows
export PYTHONPATH=src # macOS / Linux
pytest
# 3) 从模板复制运行时配置(流水号留空即可体验解析路径)
cp scripts/_flow_numbers.json.template outputs/_flow_numbers.json
# 4) 重建看板(解析台账 → state.json + HTML)
python scripts/build_dashboard.py仓库内的 data/claiming_store.db、outputs/_flow_numbers.json、平台账单/*.xlsx 均为合成演示数据(纯假酒店/假商家/假金额),可安全运行。
仓库导航
路径 | 内容 |
| MCP Server 本体(合同读取、流水证据、模板生成、存储) |
| 编排入口 Skill(SKILL.md + 运行时契约) |
| 门禁、看板、单写者锁、模板生成等 26 个工具脚本 |
| 合成 fixture 支撑的完整测试套件 |
| 产品规格、技术设计、各环节 SOP |
| 6 角色协作协议与锁协议 |
免责与脱敏声明
本仓库是内部项目的脱敏发布副本:真实公司名、酒店名、商家名、人名、流水号、金额、账期一律未随仓发布;仓库内出现的示例数据全部为合成假数据。
原始台账、真实领款表与运行数据库仅保留在本地,永不推送。
已知债务如实登记:原内部仓的 xlutils 兼容问题在本副本中通过重建模板与合成 fixture 解决;依赖真实 OA 页面快照的回归测试以合成 fixture 等价覆盖。
本项目与任何平台/企业无隶属关系;模板格式仅用于演示「回款拆分」这一通用财务场景。
License
MIT
Available Tools
5 toolscheck_oa_readonly_readinessC
判断人工登录后的三项只读检查;全部通过才创建本次任务编号。
| Name | Required | Description | Default |
|---|---|---|---|
| bill_readable | Yes | ||
| left_login_page | Yes | ||
| connection_healthy | Yes | ||
| bank_flow_accessible | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
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 does disclose an important side effect — a task ID is only created when every check passes — which is genuinely useful behavioral context. It omits what happens on failure (error vs. a non-creating result), permission requirements, and whether the checks have side effects themselves.
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?
A single compact sentence that front-loads the trigger condition and the outcome, with no filler. Its brevity is efficient rather than padded, though the density contributes to the ambiguity of 'three checks'.
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?
An output schema exists, so return values need not be described. Still, for a four-parameter gate tool with 0% schema coverage and no annotations, the description should define the individual checks and the failure behavior; instead it miscounts them and leaves the agent under-informed to invoke it correctly.
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 description coverage is 0%, so all four booleans (bill_readable, left_login_page, connection_healthy, bank_flow_accessible) have titles only. The description refers generically to 'three read-only checks', which not only fails to explain the individual parameters but actively conflicts with the four-parameter schema, leaving the agent to guess what each flag means.
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 names a specific action (evaluating the post-manual-login read-only checks) and a conditional outcome (creating the task ID only if all pass), which is more than a restatement of the name. However, it says 'three read-only checks' while the schema requires four booleans, so an agent cannot fully reconcile what is being judged, and it does not distinguish itself from siblings like startup_status or open_greencloud_oa_command.
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 phrase 'after manual login' (人工登录后) gives an implied sequencing condition for when this tool is relevant. There is no explicit when-not guidance and no named alternative among the siblings, so the routing decision is only partially supported.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
confirm_oa_flow_numbersC
生成列表查重校验号;不打开详情,发现冲突就暂停。
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| historical_keys | 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 carries full behavioral burden, and it does disclose two real traits: it does not open detail records, and it halts on conflict. That is genuinely useful. But it omits whether the operation is read-only, what the verification number is used for, and what happens to already-processed rows, leaving significant gaps.
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?
A single tight sentence with the core action front-loaded and no filler. It is arguably too terse, but nothing is wasted and the structure is easy to parse.
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?
An output schema exists, so return values need no explanation. But for a tool taking an array of opaque row objects plus an optional list of keys, with no annotations and 0% schema coverage, the description is far too thin to call the tool correctly.
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 description coverage is 0% for two parameters, so the description must compensate and largely does not. '列表' loosely hints that rows is a list of records, but historical_keys is never mentioned and no format, shape, or meaning is given for either. An agent cannot populate historical_keys from this description.
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?
States a specific verb and artifact ('生成列表查重校验号' – generate a list duplicate-check verification number), which is more than a tautology of the name. However, it never clarifies what a '查重校验号' is or how it relates to 'confirm_oa_flow_numbers', and it doesn't distinguish this from siblings like check_oa_readonly_readiness. Purpose is inferable but vague.
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?
'不打开详情,发现冲突就暂停' describes behavior rather than when to choose this tool over alternatives. No sibling tool is named, no precondition or when-not case is stated. The agent must guess when this is preferred over open_greencloud_oa_command or the other readiness checks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_claim_templateA
生成可导入 OA 的本地模板副本。
消费编排传入的结构化候选(每条含完整 32 位 hex 流水号、公司、账户、单位名称、责任人、认领状态),复用阶段一模板生成能力写出本地 XLS。完整流水号缺失或截断即结构化暂停;不连接/读取/写入/上传/导入真实 OA,不自行计算或回显完整流水号,不覆盖内置源模板。
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| output_path | Yes | ||
| source_template | Yes |
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 carries the full burden and does well: it discloses that the tool does not connect/read/write/upload/import the real OA, does not compute or echo the full serial number, and does not overwrite the built-in source template. These explicit non-behaviors establish the safety profile clearly, though it stops short of describing idempotency or failure handling beyond the pause condition.
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 front-loaded with the core action, then the input contract, then the constraints, so the most important information comes first. The constraint tail is dense but each clause (safety, no echo, no overwrite) earns its place.
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?
For a local file-generation tool with an output schema, the description covers purpose, consumed input shape, output artifact, and safety boundaries without needing to explain return values. The only real gap is the absence of explicit sibling routing, but it is otherwise complete for correct invocation.
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 description coverage is 0%, so the description must compensate, and it does: it explains that rows hold structured candidates with full 32-hex serial numbers plus company/account/unit/responsible/claim fields, that source_template is the built-in template (which is not overwritten), and that output_path yields a local XLS. It adds substantial meaning, though the parameter names aren't mapped to their roles as crisply as they could be.
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 opening line states a specific verb+resource: generate a local template copy that can be imported into OA, and it specifies the concrete output (a local XLS). It also explicitly distinguishes itself from real OA operations, so an agent can separate it from siblings like open_greencloud_oa_command without opening a schema.
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?
It states the operating context (consumes structured candidates passed in by the orchestration) and one gating condition (pause if the serial number is missing/truncated), which is useful when-to-run guidance. However, it never names an alternative tool or explicitly says when to prefer this over confirm_oa_flow_numbers or the OA command sibling, so routing is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
open_greencloud_oa_commandB
返回让浏览器操作能力打开固定 OA 登录页的指令。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
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 carries the full burden, and it does disclose one meaningful trait: the tool returns an instruction rather than directly opening the page, implying the caller must execute it. It says nothing about side effects, authentication state, or whether calling it repeatedly is safe.
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?
A single front-loaded sentence with no wasted words. It is minimal rather than bloated, though the brevity comes at the cost of the usage and behavioral detail noted above.
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?
An output schema exists, so the return value need not be explained, and there are no parameters to document. Still, the description omits the prerequisite context (browser capability availability) and the fact that the returned command must be executed by the caller, which an agent would need to use it correctly.
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 tool takes zero parameters, so the baseline is 4. The description correctly implies the login page target is fixed and hard-coded, which is the only semantically relevant fact for an argument-less tool.
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 names a specific action and resource: it returns the instruction that opens the fixed OA login page, so an agent knows this produces a browser command rather than performing a login. It does not, however, explicitly differentiate itself from siblings like check_oa_readonly_readiness or startup_status, so the agent must infer the boundary.
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?
There is no statement of when to call this versus alternatives, no prerequisites (e.g., that browser operation capability must be available), and no exclusions. The agent is left to infer usage entirely from the purpose sentence.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
startup_statusC
返回两个准备项,并说明是否可以开始只读检测。
| Name | Required | Description | Default |
|---|---|---|---|
| bill_readable | Yes | ||
| oa_window_opened | Yes |
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 carries the full behavioral burden. It hints at a go/no-go judgment, but never states whether the call reads or mutates state, what the two prep items are, or any auth/prerequisite behavior. The little it does disclose is useful but far from sufficient.
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?
A single short sentence with no waste and the actionable clause front-loaded. However, the brevity here reflects under-specification rather than disciplined editing, so it cannot score higher.
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?
An output schema exists so return values need not be explained, but for a two-required-parameter tool with zero schema coverage and no annotations, the description omits parameter meaning and usage context. It is too thin to let an agent invoke it confidently.
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 description coverage is 0%, so the description must explain bill_readable and oa_window_opened. Instead it only says it 'returns two preparation items,' which is ambiguous about whether these booleans are inputs it consumes or values it echoes, and adds no meaning to either flag.
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 gives a verb (返回/returns) and a loose object (两个准备项/two preparation items) plus a gating statement about read-only detection. It never names the actual resource or the two items, and it does not distinguish itself from the similarly named sibling check_oa_readonly_readiness. Purpose is inferable but vague.
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?
There is no explicit when-to-use, when-not-to-use, or alternative-tool guidance. The clause 'whether read-only detection can begin' faintly implies this is a pre-flight gate, but the agent is left to guess the ordering relative to open_greencloud_oa_command or check_oa_readonly_readiness.
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.
5 tool updates
v0.1.0- First observed
check_oa_readonly_readiness - First observed
confirm_oa_flow_numbers - First observed
generate_claim_template - First observed
open_greencloud_oa_command - First observed
startup_status
TDQS
Scored across 5 tools
The five tools target distinct workflow steps: opening OA login, startup readiness summary, post-login read-only checks, duplicate verification, and local template generation. Startup_status and check_oa_readonly_readiness both relate to readiness and could cause minor confusion about ordering, but descriptions clarify their different phases.
Four tools follow a clear verb_noun snake_case pattern (open_..., confirm_..., check_..., generate_...). startup_status is noun_noun and lacks a verb, which is a minor deviation but still readable and consistent in casing.
Five tools is well-scoped for a narrow claim-preparation workflow. Each tool covers a distinct preparation or validation step without redundancy, and the set is neither bloated nor thin.
The tools cover OA login, readiness checks, duplicate validation, and template generation, but there is no tool to perform actual claim matching, read OA claim data, or update/submit reconciliation results. These are notable gaps for a claim-reconciliation domain, though the agent explicitly avoids real OA writes.
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Read-only Remote MCP for externally grounded AI agent trust receipts.
Free, non-custodial MCP: validate bounded USDC/USDT payout plans, look up public transfers (read-only), reconcile payouts. Never holds funds or keys.
Related MCP Servers
- AlicenseAqualityDmaintenanceRead-only MCP server for reconciling SimpleFIN bank data against Firefly III ledger, enabling audit and review workflows without mutation.195 npm1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server providing deterministic accounting tools for AI agents, including bank statement parsing, document classification, money math, and webhook verification.2Apache 2.0
- AlicenseAqualityDmaintenanceMCP server for deterministic numeric verification and spreadsheet auditing. Enables AI agents to verify math/finance claims, audit rows, and evaluate covenant rules with signed, independently checkable receipts.4MIT
- FlicenseBqualityCmaintenanceA secure, read-only MCP server that enables AI assistants to inspect transactions, vendor performance, wallet balances, and analytics through validated REST API calls.19-