@cubiczan/chp-mcp
# `@cubiczan/chp-mcp`
[](https://glama.ai/mcp/servers/icohangar-ops/cubiczan-chp-mcp)
One-command MCP install for **CHP Profile B** spend / capital gates.
[](https://registry.modelcontextprotocol.io)
[](https://www.npmjs.com/package/@cubiczan/chp-mcp)
[](https://github.com/icohangar-ops/cubiczan-chp)
Wraps [`@cubiczan/chp`](https://www.npmjs.com/package/@cubiczan/chp) so Cursor,
Claude Code, or any MCP client can call `evaluate_spend_gate` without vendoring
protocol code. Engine digests match the normative golden vectors
(**Profile B 30/30**).
## How the pieces fit
```text
MCP client (Cursor / Claude / …)
│ tools/call
▼
┌───────────────────────────┐
│ MCP server (transport) │ ← you are here (@cubiczan/chp-mcp)
│ evaluate_spend_gate │
│ approve_spend │
│ chp_content_hash │
└─────────────┬─────────────┘
│ depends on
▼
┌───────────────────────────┐
│ Published CHP packages │
│ npm: @cubiczan/chp (Profile B)
│ PyPI: consensus-hardening-protocol (Profile A)
└───────────────────────────┘
```
For AGENTS.md + skills + Profile A `decision_gate` / `decision_adversary`, use
[agent-conductor](https://github.com/icohangar-ops/agent-conductor) instead.
## Install
```bash
npm install -g @cubiczan/chp-mcp
# or one-shot
npx -y @cubiczan/chp-mcp
```
### Cursor / Claude Desktop
```json
{
"mcpServers": {
"chp": {
"command": "npx",
"args": ["-y", "@cubiczan/chp-mcp"]
}
}
}
```
### Claude Code
```bash
claude mcp add chp -- npx -y @cubiczan/chp-mcp
```
## Tools
| Tool | Maps to | Purpose |
|------|---------|---------|
| `evaluate_spend_gate` | `evaluateGate` | LOCKED / HITL_REQUIRED / BLOCKED + claims + content hash |
| `approve_spend` | `approveHuman` | Human lock when HITL_REQUIRED (cannot override hard fails) |
| `chp_content_hash` | `contentHash` | Float-aware canonical SHA-256 |
| `chp_version` | — | Server + protocol versions |
### Example — evaluate a spend
```jsonc
// tools/call evaluate_spend_gate
{
"action": { "action": "LONG", "asset": "ETH", "notional": 300, "confidence": 0.9 },
"policy": {
"max_notional": 500,
"daily_cap": 2500,
"hitl_threshold": 250,
"min_confidence": 0.55,
"allowed_actions": ["LONG", "SHORT"]
}
}
```
## Related
| Package / repo | Role |
|----------------|------|
| [`@cubiczan/chp`](https://www.npmjs.com/package/@cubiczan/chp) | Profile B library (this server’s dependency) |
| [`consensus-hardening-protocol`](https://pypi.org/project/consensus-hardening-protocol/) | Profile A + normative spec |
| [`@cubiczan/agent-conductor`](https://www.npmjs.com/package/@cubiczan/agent-conductor) | Full MCP: contracts, skills, Profile A gates |
| [`@cubiczan/governed-mcp-gateway`](https://www.npmjs.com/package/@cubiczan/governed-mcp-gateway) | HTTP MCP control plane |
| [`@cubiczan/codesentinel-mcp`](https://www.npmjs.com/package/@cubiczan/codesentinel-mcp) | Codebase health MCP |
| [`cubiczan-resilience`](https://pypi.org/project/cubiczan-resilience/) / [`@cubiczan/resilience`](https://www.npmjs.com/package/@cubiczan/resilience) | Shared retry / timeout / audit primitives |
## Licence
MIT.
TDQS
Scored across 4 tools
Each tool has a clearly distinct role: evaluate_spend_gate runs the policy check, approve_spend performs HITL approval, chp_content_hash computes hashes, and chp_version reports versions. No two tools overlap in purpose or could be easily confused.
The names are consistent snake_case and mostly follow a verb_noun pattern (evaluate_spend_gate, approve_spend). The chp_ prefixed helpers break that pattern slightly, but the prefix clearly groups utility/version operations, so the overall convention remains predictable.
Four tools is well-scoped for a narrow CHP Profile B protocol surface: gate evaluation, human approval, hashing, and versioning. Each tool earns its place without redundancy or bloat.
The core lifecycle is covered: evaluate → approve, with supporting hash and version utilities. A minor gap is the absence of an explicit tool to inspect proposal details, but the described results from evaluate_spend_gate include claims and content hashes, so agents can proceed without major dead ends.