cedulon
Cedulon
面向代理间花费的审计层:已签名的交易清单、fail-closed(失败即拒绝)策略、已签名的花费收据(可锚定到 SCITT)。
Cedulon 不是支付通道。它位于 x402 和 AP2 之上。
这些包发布在 npm 上,MCP 服务器收录在 MCP Registry 中,但这里没有任何涉及真实资金的部分:没有真实钱包,也没有网络支付通道,只有模拟夹具。cedulon_spend 在模拟通道上结算,并在其自身描述中对此作了说明。
核心包零运行时依赖;MCP 服务器包只依赖官方 MCP SDK。
环境要求
Node.js 22 或更高版本(库需要 20+;脚本使用 Node 的类型剥离功能)
npm 10 或更高版本
Related MCP server: dingdawg-agent-wallet
安装与运行(全新克隆)
npm install
npx tsc --noEmit
npm run test:all
npm run demonpm run tamper 预期以非零状态退出(被篡改的字节无法通过校验)。
npm run demo:unguarded 展示未受保护的漏洞:100/100 全部放行。
npm run audit 必须以 0 退出(audit: balanced)。
npm run demo:bypass 必须以非零状态退出:audit: 1 settlement without receipt → FAIL。
npm run demo:bypasses 打印四行 FAIL(缺少收据、金额错误、空引用、垃圾链头),并且只有当每个绕过都被捕获时才以 0 退出;漏掉任何一个绕过都会使其以非零状态退出。
npm run demo:live 对真实的 Base Sepolia USDC 时间窗口进行对账,而不是使用模拟夹具。只读:它只需要在 CEDULON_RPC_URL 中提供一个 RPC URL,不需要钱包、密钥或交易。如果针对一个你不持有其收据的账户运行,链上报告的每一笔结算都会以缺口(gap)的形式返回。
第三方无需信任我们即可复现这一点:docs/RUN_AS_VERIFIER.md。
五分钟上手路径,包括 MCP 主机配置:docs/QUICKSTART.md。
MCP 服务器
Cedulon 可以作为本地 stdio MCP 服务器运行。主机通过 stdin/stdout 进行 JSON-RPC 通信。这五个工具只是对现有包的薄封装;它们不会重新实现策略、收据或审计。
工具 | 参数 | 结果 |
|
| 允许 → 返回已签名的收据 JSON。拒绝 → |
| 可选 |
|
|
|
|
| 无 | 以 |
| 无 |
|
Claude Desktop / Claude Code / Cursor。无需克隆,也无需构建:
{
"mcpServers": {
"cedulon": {
"command": "npx",
"args": ["-y", "@cedulon/mcp-server"]
}
}
}在 Claude Code 中,该配置只需一条命令:
claude mcp add cedulon -- npx -y @cedulon/mcp-server策略上限来自环境变量:CEDULON_MAX_AMOUNT、
CEDULON_MAX_CUMULATIVE、CEDULON_MAX_PAYMENTS、CEDULON_WINDOW_MS、
CEDULON_ALLOWED_PAYEES、CEDULON_ALLOWED_CURRENCIES、
CEDULON_ALLOWED_TOOLS、CEDULON_PAYER。设置 CEDULON_STATE_PATH 可在重启后保留收据链;不设置时,账本只保存在内存中。
如果改为在本仓库内基于源码工作:
npm run mcp该服务器在 MCP Registry 中以 io.github.dogrucanemek-alt/cedulon 的名称收录;server.json 是它发布时使用的入口。
npm run mcpb 构建一个 .mcpb 捆绑包——一个包含服务器及其依赖的 zip 文件,桌面主机可一键安装,策略上限以设置项的形式暴露。它安装的是已发布的 npm 包,而不是打包工作树,因此捆绑包中的内容与 npm 交付给您的完全一致,并且该版本必须已经发布。结果输出到 build/,它是发布产物,不是源码。
smithery.yaml 是较旧的生态格式,不会被提交;Smithery 当前的接入说明接受 HTTPS 端点或 .mcpb 捆绑包。
目录结构
packages/core policy engine + Decision Token (workspace dep on @cedulon/cose)
packages/cose deterministic CBOR + COSE_Sign1 (Ed25519)
packages/manifest signed trade manifest
packages/receipts spend receipt (COSE default, JSON legacy)
packages/checkpoint epoch checkpoints + in-process transparency log
packages/audit rail-extract completeness checker
packages/mcp-guard MCP tools/call wrapper (mock)
packages/mcp-server stdio MCP server (official SDK)
packages/x402-adapter HTTP 402 adapter + mock rail extract
packages/base-extract read-only Base Sepolia USDC → RailExtract
examples/demo runaway, dispute, bypass, audit CLI
spec/ draft-dogru-cedulon-01 (current), -00, plus the
reattestation and streaming drafts
THREAT_MODEL.md
docs/RUN_AS_VERIFIER.md品牌名称仅来自 packages/core/src/brand.ts。
如何引用
引用元数据位于 CITATION.cff。已存档的 -00 版本发布在 https://doi.org/10.5281/zenodo.22099792
许可证
Apache-2.0
Available Tools
5 toolscedulon_auditARead-only
Reconcile the in-process receipt chain and checkpoint against the rail extract. Returns audit: balanced or findings.
| Name | Required | Description | Default |
|---|---|---|---|
| trust | No | Rail key you hold out of band: { publicKeyPem, accountId?, railId?, windowStartMs?, windowEndMs? } | |
| manifest | No | A Trade Manifest you were presented with. Omit for a no-manifest deployment. Present without manifestTrust is unauthenticated-manifest. | |
| payeeTrust | No | Payee keys you hold out of band, keyed by payee: { "payee-1": publicKeyPem } | |
| issuerTrust | No | Issuer key(s) you hold out of band: { publicKeyPem: string | string[] }. Without it the audit checks this server's records against this server's own key. | |
| witnessTrust | No | Transparency log key you hold out of band: { publicKeyPem: string | string[] } | |
| manifestTrust | No | Manifest publisher key(s) you hold out of band: { publicKeyPem: string | string[] } | |
| extraSettlements | No | Optional extra extract rows, used to inject a bypass settlement in tests |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With readOnlyHint=true and openWorldHint=false, the annotations already cover the safety profile and closed-world assumption. The description adds the outcome contract ('balanced or findings') and names the comparison sources, but it does not explain what findings contain, how failures are expressed, or any other behavioral caveats. No contradiction with annotations.
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?
Two sentences with no filler: the purpose is front-loaded ('Reconcile...') and the outcome is stated in the second sentence. Every phrase earns its place, and the description is appropriately sized for an audit tool whose parameters are documented in the schema.
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 7-parameter nested-object tool with no output schema, the description is a bit thin: it gives the high-level result ('balanced or findings') but not the shape of findings or any guidance on how trust/manifest inputs affect the audit. The rich schema compensates for parameter coverage, but the return contract remains under-specified.
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 100%, so the description does not need to repeat parameter details. The description itself adds no parameter-level semantics, but the schema already explains trust, manifest, payee/issuer/witness/manifest trust, and extraSettlements in enough detail. Baseline 3 is appropriate.
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 states a specific verb ('Reconcile') and identifies the exact resources involved: the in-process receipt chain and checkpoint are compared against the rail extract. It also says the result is either 'balanced or findings,' which distinguishes this audit/reconciliation tool from siblings like spend, verify_receipt, export_ledger, and status.
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 description implies the tool is for reconciliation and audit-style checks, so an agent can infer it is not for spending, single-receipt verification, exporting, or status. However, it never explicitly says when to use this tool instead of a sibling, nor does it mention any conditions or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cedulon_export_ledgerARead-only
Export receipts, checkpoint, and rail extract in the same JSON shape as npm run demo:export.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=false, covering the safety and world-scope behavior. The description adds the useful detail that output matches npm run demo:export, but it does not disclose any other behavioral traits such as output size, asynchronous behavior, or prerequisites, so it only partially contributes beyond annotations.
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 a single, front-loaded sentence with no redundant words. It clearly communicates the operation, the target data, and the output format without padding.
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 zero-parameter tool, the description is mostly sufficient: it names the data kinds and the output shape. It relies on familiarity with 'npm run demo:export' and leaves terms like 'checkpoint' and 'rail extract' undefined, but in a project context this is likely enough for an agent to invoke 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?
The input schema has zero parameters and coverage is effectively 100%, so no parameter documentation is needed. The description's mention of the three export categories adds context about what the tool operates on, but since there are no configurable inputs, there is little parameter semantics to add.
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 verb ('Export') and the exact resources ('receipts, checkpoint, and rail extract'), making the tool's function immediately clear. It also distinguishes itself from siblings by being the export operation, as opposed to spend, audit, verify, or status actions. The reference to the demo:export JSON shape further pins down intent.
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 description implies when to use this tool: any time an export of receipts, checkpoint, or rail extract data is needed in the demo:export shape. However, it does not explicitly mention alternatives or state when not to use it, leaving routing to siblings to be inferred rather than spelled out.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cedulon_spendA
Policy-gated spend on the mock rail. Allow returns a signed COSE receipt JSON. Deny returns the fail-closed reason.
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | Calling tool name recorded on the request | |
| nonce | Yes | ||
| payee | Yes | ||
| amount | Yes | Integer amount as a decimal string | |
| currency | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses both possible outcomes—an allow path returning a signed COSE receipt JSON and a deny path returning the fail-closed reason. This goes beyond the annotations, which only indicate hints like readOnly false and idempotent false. It doesn't explain the policy itself, but it clearly communicates the behavioral contract.
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 extremely concise: two short sentences, front-loaded with the primary action, and each sentence adds distinct value. There is no filler, redundancy, or unnecessary background.
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?
While the description explains return variants, it does not cover policy prerequisites, parameter formats, or the meaning of nonce, payee, and currency. With no output scheme and only 40% schema description coverage, these omissions make it difficult for an agent to invoke the tool correctly the first time.
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 only 40%, yet the description adds no parameter-level meaning for nonce, payee, or currency, and does not even mention 'amount' or 'tool'. With most parameters undocumented in both schema and description, the agent has little guidance on how to set valid inputs.
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 clearly identifies the action ('spend'), the resource ('mock rail'), and the policy-gating nature of the operation. It also distinguishes the tool from siblings like cedulon_verify_receipt and cedulon_audit by describing the spend-specific outcome.
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 description implies this tool is used when a policy-gated spend should be attempted, and sibling names suggest the other tools serve different purposes. However, it does not explicitly state when to use this tool over alternatives, nor does it provide exclusions or condition-based routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cedulon_statusARead-only
Server version, policy summary, receipt count, and chain head hash.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true and openWorldHint=false, covering the safety profile. The description adds useful context about the specific data fields exposed, but does not disclose any further behavioral details such as response format, freshness, or failure modes. This is comparable to a straightforward status read where the annotations carry the main burden.
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 a single, compact sentence that front-loads the most important information: it enumerates exactly what the status tool exposes. Every word earns its place and there is no redundant or filler content.
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 parameterless status endpoint with read-only annotations, the description is largely sufficient: it names the key result fields. There is no output schema to supplement the return values, but the listed fields are concrete enough for an agent to understand what this tool offers in the context of its siblings.
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 and the schema is empty, so there are no parameter semantics to document. With 0 params, the baseline of 4 applies, and the description does not need to compensate for any parameter coverage gap.
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 title 'Server status' plus the description's list of returned data ('Server version, policy summary, receipt count, and chain head hash') clearly identifies this as a read-only status tool. It is distinct from the sibling tools (spend, audit, verify_receipt, export_ledger), though it lacks an explicit verb such as 'returns' or 'gets'.
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 description provides no explicit guidance on when to choose this tool versus its siblings such as cedulon_audit or cedulon_export_ledger. There is no stated condition, exclusion, or mention of alternatives; usage is only weakly implied by the word 'status' in the title.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cedulon_verify_receiptARead-only
Verify a spend receipt COSE_Sign1 (and payee countersignature when present). Supply expectIssuerKeyPem to check it against a key you already hold; without one the receipt is only checked against the key it carries, which any key satisfies.
| Name | Required | Description | Default |
|---|---|---|---|
| coseHex | No | ||
| receipt | No | Full SignedReceipt object from cedulon_spend | |
| publicKeyPem | No | ||
| counterCoseHex | No | ||
| expectPayeeKeyPem | No | Payee key you hold out of band, for the countersignature. | |
| payeePublicKeyPem | No | ||
| expectIssuerKeyPem | No | Issuer key you hold out of band. Omit and the check is self-referential. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only declare readOnlyHint, so the description carries the burden of behavioral caveats. It adds the important warning that omitting expectIssuerKeyPem makes verification self-referential and 'any key satisfies' it, which prevents an agent from over-trusting a nominally verified receipt.
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 two dense sentences with no filler. It front-loads the primary purpose and then delivers the single most important usage caveat, making every word earn 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?
With 7 optional parameters, no required fields, no output schema, and no guidance on which parameter combinations are valid, the description is not complete enough for reliable invocation. It explains the issuer-key pitfall but leaves the receipt/countersignature input representations and the verification result unspecified.
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 only 43%, and the free-text description explains only expectIssuerKeyPem behaviorally. The relationship between coseHex, receipt, counterCoseHex, publicKeyPem, and payeePublicKeyPem is left unstated, so an agent cannot confidently choose among the seven optional input modes from the description alone.
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 opens with the verb 'Verify' and names the specific resource: a spend receipt COSE_Sign1 plus the optional payee countersignature. This clearly separates it from spend/audit/export/status siblings and makes the tool's operation unambiguous.
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 description provides concrete conditional guidance: supply expectIssuerKeyPem when you want to check against a key you already hold, and omit it when you accept the receipt's self-carried key. It does not name alternative tools, but the parameter-level when/how instructions are clear enough for correct invocation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct role: spend creates a receipt, audit reconciles, verify_receipt validates a receipt, export_ledger exports data, and status reports server state. There is no overlap or ambiguity between tool purposes.
All tools share the cedulon_ prefix and lowercase snake_case style, which is predictable. Minor inconsistency exists between single-word action names (spend, audit) and verb_noun names (verify_receipt, export_ledger), plus status is a noun rather than an action.
Five tools is well-scoped for a focused server handling spend, verification, audit, export, and status. Each tool contributes a distinct capability without redundancy or bloat.
The tool surface covers the core lifecycle of creating, verifying, auditing, exporting, and monitoring receipts. Minor gaps exist such as no explicit receipt lookup by ID or cancellation/refund flow, but for a mock rail server the set appears functionally complete.
Maintenance
Related MCP Connectors
Policy gate and signed trust receipts for autonomous agent actions.
Governed agent execution: x402 payments, budgets, receipts, verification, and audit.
Cryptographically anchored evidence for agents: verified run receipts, proof-gated settlement.
Advisory policy preflight for AI-agent spend requests; never executes payments or accesses wallets.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceDual-rail MCP server for initiating and verifying MPP and x402 payments, plus MPP-attested identity claims, enabling agent-native financial settlement.MIT
- FlicenseNot gradedqualityDmaintenanceProvides MCP tools to enforce spend policies (allow, deny, step-up, allowlist) on agent wallets with an immutable audit trail.
- AlicenseAqualityAmaintenancePost-quantum, tamper-evident receipts for consequential agent actions. Provides tools for auditing, gating decisions, and egress classification with quantum-hardened security.7Apache 2.0
- FlicenseNot gradedqualityBmaintenanceProvides policy-driven runtime authorization and security evaluation for MCP-based agents, including MCP streaming HTTP gateway, mock MCP servers, deterministic agent demos, and audited tool invocation with redacted PostgreSQL audit chains.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dogrucanemek-alt/cedulon'
If you have feedback or need assistance with the MCP directory API, please join our Discord server