io.github.icohangar-ops/chp-mcp
Official@cubiczan/chp
TypeScript 共识加固协议 — Profile B 资本门槛、规范 JSON 与签名审计账本。
规范协议仓库: icohangar-ops/consensus-hardening-protocol (规范、黄金向量、Python 参考实现)
安装
npm(本包)
npm install @cubiczan/chpPyPI(Python 参考实现)
pip install consensus-hardening-protocolProfile A 审议 + 规范性规范。此 npm 包是 TypeScript 可安装接口,用于支出/授权门槛 — 与
@cubiczan/codesentinel-mcp具有相同的通道形态。
Related MCP server: @cubiczan/chp-mcp
各组件如何配合
CHP 是引擎。MCP 服务器是传输层。
MCP client (Cursor / Claude / …)
│ tools/call
▼
┌───────────────────────────┐
│ MCP server (transport) │ ← agent-conductor, codesentinel-mcp, …
│ decision_gate │
│ decision_adversary │
│ evaluate_spend_gate │
└─────────────┬─────────────┘
│ depends on
▼
┌───────────────────────────┐
│ Published CHP packages │
│ PyPI: consensus-hardening-protocol (Profile A)
│ npm: @cubiczan/chp (Profile B) ← you are here
└───────────────────────────┘本包为 Profile B(evaluateGate / approveHuman)。可将其接入 MCP 服务器,例如 evaluate_spend_gate。Profile A 的审议工具(decision_gate、decision_adversary)位于 agent-conductor,该工具依赖于通过 stdio 桥接的 PyPI 包。
MCP 单行配置
适用于 Cursor / Claude,无需编写胶水代码:
npx -y @cubiczan/chp-mcp注册表名称:io.github.icohangar-ops/chp-mcp。源码:cubiczan-chp-mcp。
一致性: Profile B 30/30 · Profile A(Python)70/70。
快速开始
import { evaluateGate, approveHuman } from "@cubiczan/chp";
const policy = {
max_notional: 500,
daily_cap: 2500,
hitl_threshold: 250,
min_confidence: 0.55,
allowed_actions: ["LONG", "SHORT"],
};
const decision = evaluateGate(
{ action: "LONG", asset: "ETH", notional: 300, confidence: 0.9 },
policy,
);
// → { state: "HITL_REQUIRED", requires_human: true, ... }
const locked = approveHuman(
{ action: "LONG", asset: "ETH", notional: 300, confidence: 0.9 },
policy,
"cfo@example.com",
);
// → { state: "LOCKED", allowed: true, ... }硬性规则失败(max_notional、daily_cap、min_confidence 等)会在 HITL 阈值测试之前被收集。人类可以跨越阈值,但不得批准违反策略的行为(规范 §6.3 / §6.5)。
跨语言哈希
CHP 内容哈希基于规范 JSON(规范 §3.1)的 SHA-256。Python 输出整数浮点数 100.0;JavaScript 的 JSON.stringify 输出 100。此包以 Python 方式格式化 Profile B 哈希字段集,以便审计摘要与黄金向量及 Python 参考实现匹配。
一致性适配器
npm run build
python3 path/to/spec/conformance/run_conformance.py \
--adapter-cmd "node dist/adapter.js" \
--profile BProfile A 操作被报告为 unsupported(SKIP),而非 FAIL。
许可证
MIT。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Governed MCP: agent audit, provenance, deterministic checks, and receipt-backed FragGate execution.
Governance runtime for compliance: verified, human-approved writes to a tamper-evident record.
Authority, mandate, and policy checks for AI finance with replayable evidence. Not live execution.
Append-only decisions with provenance, supersession, retrieval, and audited MCP actions.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceEnables MCP hosts to verify agent spending mandates and receipts, providing stateless tools for authorization, chain verification, credential verification, and DID resolution.Apache 2.0- AlicenseAqualityAmaintenanceEnables MCP clients to evaluate spend gates and manage human-in-the-loop approvals for CHP Profile B.428 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables users to trace regulatory rule changes to affected parties and required actions through deterministic safety gates, returning dated action plans and hash-linked evidence records. Supports 12 MCP tools over stdio or streamable HTTP for source comparison, obligation decomposition, scope assessment, planning, and evidence validation across multiple domain packs.MIT
- AlicenseBqualityBmaintenanceEnables MCP clients to enforce CHP Profile B spend gates, issue and verify signed tool-approval receipts, and audit denied or authorized finance actions.1228 npmMIT