Skip to main content
Glama
icohangar-ops

io.github.icohangar-ops/chp-mcp

Official

@cubiczan/chp

TypeScript 共识加固协议 — Profile B 资本门槛、规范 JSON 与签名审计账本。

规范协议仓库: icohangar-ops/consensus-hardening-protocol (规范、黄金向量、Python 参考实现)

安装

npm(本包)

npm install @cubiczan/chp

PyPI(Python 参考实现)

pip install consensus-hardening-protocol
  • 注册表:pypi.org/project/consensus-hardening-protocol

  • Profile A 审议 + 规范性规范。此 npm 包是 TypeScript 可安装接口,用于支出/授权门槛 — 与 @cubiczan/codesentinel-mcp 具有相同的通道形态。

Related MCP server: numproof

各组件如何配合

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_gatedecision_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_notionaldaily_capmin_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 B

Profile A 操作被报告为 unsupported(SKIP),而非 FAIL。

许可证

MIT。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    MCP 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.
    4
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP hosts to verify agent spending mandates and receipts, providing stateless tools for authorization, chain verification, credential verification, and DID resolution.
    Apache 2.0
  • F
    license
    Not graded
    quality
    C
    maintenance
    An MCP approval gate that ensures agents execute only human-approved, hash-verified actions, providing fail-closed consent for consequential operations.

View all related MCP servers

Related MCP Connectors

  • A paid remote MCP for Equibles, built to return verdicts, receipts, usage logs, and audit-ready JSON

  • A paid remote MCP for Statewright, built to return verdicts, receipts, usage logs, and audit-ready J

  • A paid remote MCP for ZeroID, built to return verdicts, receipts, usage logs, and audit-ready JSON.

View all MCP Connectors

Latest Blog Posts

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/icohangar-ops/cubiczan-chp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server