Governed MCP Gateway
Cubiczan Agent Platform
为真正交付的智能体提供身份、资金和证据。
三个 SKU,一个工作区。MCP 客户端通过 tools/call 和 SSE 保持 Bearer 主体。支出在没有授权的情况下无法结算,超过上限时需要人工第二密钥。董事会声明在没有智能体、CHP 锁和哈希文档的情况下无法封存。

SKU | 端口 | 仓库 | 职责 |
| 每次工具调用和 SSE 帧上的主体。保管库凭据轮换。工具白名单。 | ||
| 提议 → 授权 → 会签 → 结算。默认使用 Stripe;x402 是一种通道。 | ||
| 声明 → 智能体 → 锁 → 文档。ASC 842 / 606 / 718 引擎。HMAC 链式证据包。 |
共享原语(packages/shared):CHP 门、HMAC 账本、HTTP/SSE 辅助工具。零运行时 npm 依赖。Stripe 和 x402 是通道——测试从不调用真实网络。
快速开始
npm install
npm test
npm run gateway # :7474
npm run spend # :7475
npm run cfo # :7476演示 Bearer 密钥(也见 .env.example):
角色 | 密钥 |
网关智能体 |
|
网关人工 |
|
网关研究(无 |
|
支出智能体 |
|
支出人工 |
|
CFO 智能体 |
|
CFO 人工 |
|
从本地实时 API 重新生成 README 卡片:
npm run shotsRelated MCP server: governed-mcp-gateway
1. 受治理的 MCP 网关
生产环境的 MCP 会丢弃身份。listTools 在请求线程上运行;tools/call 和 SSE 在其他地方运行。此网关将 Bearer 凭据解析为主体,在每次 JSON-RPC 调用时注入,并在每个 SSE 帧上重复。命名的保管库输入原地轮换——github_token 保持为 github_token。



curl -sS -H "Authorization: Bearer mcp_agt_payops_demo" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"echo.ping","arguments":{"hello":"world"}}}' \
http://127.0.0.1:7474/mcp方法 | 路径 | 说明 |
|
| JSON-RPC |
|
| 带 |
|
| 仅人工的保管库轮换;旧哈希失效 |
|
| 对照当前哈希检查密钥 |
2. 智能体支出与授权平面
智能体提议。授权批准。当金额超过自动上限时,人工会签。提议智能体不能自行会签。结算是通道:默认使用 Stripe 计量事件,如果你要求的话使用 x402 支付要求。此 MVP 中没有链上调用。



curl -sS -H "Authorization: Bearer spend_agt_payops_demo" \
-H "Content-Type: application/json" \
-d '{"agent":"agt_payops","merchant":{"name":"Stripe","url":"https://stripe.com","country":"US"},"total":"12.00","rationale":"tool meter"}' \
http://127.0.0.1:7475/v1/proposals方法 | 路径 | 说明 |
|
| 操作员创建剩余美分覆盖 |
|
| 智能体提议;通道 |
|
| 人工第二密钥;智能体被拒绝 |
|
|
|
3. 可审计的 CFO 智能体网格
董事会声明在拥有智能体、LOCKED CHP 状态和至少一个源文档哈希之前不算完成。引擎进行计量(ASC 842 租赁滚动、ASC 606 受限 POC、ASC 718 SBC)。它们不决定法律事实。代币支出作为同一 HMAC 链式账本上的源附加。



curl -sS -H "Authorization: Bearer cfo_agt_lease_demo" \
-H "Content-Type: application/json" \
-d '{"title":"AI spend is $12.00 this period","narrative":"Token ledger supports the board claim.","agentId":"agt_lease"}' \
http://127.0.0.1:7476/v1/claims方法 | 路径 | 说明 |
|
| 打开声明 |
|
| 附加命名源;存储 SHA-256 |
|
| 人工锁定 → |
|
| ASC 842 分类 + 滚动 |
|
| 封存;无文档或未锁定时返回 |
规范
OpenSpec 变更:openspec/changes/ship-three-sku-platform/。
许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Zero-trust gateway for AI agents: score tool calls, verify agent cards, enforce policy, audit.
- FullmaktOAuthai.fullmakt
Credential broker for AI agents: scoped, revocable API access with policy enforcement and audit.
Security gateway for AI agents: policy, approval, and audited execution, no secrets shared.
Runtime permission, approval, and audit layer for AI agent tool execution.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables controlled AI-agent access to enterprise-shaped tools with a deny-by-default gated write path, human approval, dry-run execution, and append-only audit logging.1-
- AlicenseAqualityBmaintenanceThis MCP server preserves a Bearer principal on every tool call and SSE frame, rotates vaulted credentials in place, and enforces per-tool allowlists for agents.3MIT
- AlicenseNot gradedqualityCmaintenanceEnables secure support-ticket and customer-account operations with signed JWT authentication, prompt-injection and tool-poisoning guardrails, and human-in-the-loop confirmation for destructive actions.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to securely invoke tools by enforcing identity proof, capability verification, and risk scoring on every request, blocking unsafe calls before they execute.MIT