Skip to main content
Glama

Cubiczan Agent Platform

Identidad, dinero y evidencia para agentes que realmente entregan.

Tres SKUs, un espacio de trabajo. Los clientes MCP mantienen un principal Bearer a través de tools/call y SSE. El gasto no puede liquidarse sin un mandato y, por encima del límite, una segunda clave humana. Las reclamaciones del consejo no pueden sellarse sin un agente, un bloqueo CHP y un documento con hash.

Tres SKUs: gateway MCP gobernado, plano de mandato de gasto, malla de agentes CFO

SKU

Puerto

Repo

Trabajo

Governed MCP Gateway

:7474

icohangar-ops/governed-mcp-gateway

Principal en cada llamada de herramienta y frame SSE. Rotación de credenciales en bóveda. Listas de permitidos de herramientas.

Agent Spend & Mandate Plane

:7475

icohangar-ops/spend-mandate-plane

Proponer → mandato → cofirma → liquidar. Stripe por defecto; x402 es un riel.

Auditable CFO Agent Mesh

:7476

icohangar-ops/cfo-agent-mesh

Reclamación → agente → bloqueo → documento. Motores ASC 842 / 606 / 718. Paquete de evidencia encadenado con HMAC.

Primitivas compartidas (packages/shared): puerta CHP, libro mayor HMAC, ayudantes HTTP/SSE. Cero dependencias npm en tiempo de ejecución. Stripe y x402 son rieles: las pruebas nunca llaman a redes en vivo.

Inicio rápido

npm install
npm test
npm run gateway   # :7474
npm run spend     # :7475
npm run cfo       # :7476

Claves Bearer de demostración (también en .env.example):

Rol

Clave

Agente de gateway

mcp_agt_payops_demo

Humano de gateway

mcp_human_controller_demo

Gateway de investigación (sin stripe.charge)

mcp_agt_research_demo

Agente de gasto

spend_agt_payops_demo

Humano de gasto

spend_human_controller_demo

Agente CFO

cfo_agt_lease_demo

Humano CFO

cfo_human_controller_demo

Regenera las tarjetas del README desde las APIs locales en vivo:

npm run shots

Related MCP server: identity-aware-mcp-server

1. Governed MCP Gateway

El MCP de producción pierde identidad. listTools se ejecuta en el hilo de la solicitud; tools/call y SSE se ejecutan en otro lugar. Este gateway resuelve una credencial Bearer a un Principal, la inyecta en cada llamada JSON-RPC y la repite en cada frame SSE. Las entradas de bóveda con nombre rotan en su lugar: github_token sigue siendo github_token.

Principal inyectado en tools/call

SSE repite el principal en cada frame

Rotar github_token sin un nuevo id de entrada

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

Método

Ruta

Qué

POST

/mcp

JSON-RPC initialize, tools/list, tools/call

GET

/mcp/sse?once=1

Notificación SSE con _meta.cubiczan.principal

POST

/v1/credentials/:name/rotate

Rotación de bóveda solo humana; el hash antiguo muere

POST

/v1/credentials/verify

Verifica un secreto contra el hash actual


2. Agent Spend & Mandate Plane

Los agentes proponen. Los mandatos autorizan. Un humano cofirma cuando el monto supera el límite automático. El agente proponente no puede cofirmarse a sí mismo. La liquidación es un riel: evento de medidor de Stripe por defecto, pago requerido x402 si lo pides. Sin llamadas a cadena en este MVP.

Propuesta bajo límite se bloquea automáticamente

Sobre límite requiere una segunda clave humana

Medidor de Stripe vs pago requerido x402

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

Método

Ruta

Qué

POST

/v1/mandates

El operador crea cobertura de céntimos restantes

POST

/v1/proposals

El agente propone; carril auto | approval | blocked

POST

/v1/countersign

Segunda clave humana; los agentes son rechazados

POST

/v1/settle

{ "rail": "stripe" } o "x402"


3. Auditable CFO Agent Mesh

Una reclamación del consejo no está completa hasta que tiene un agente, un estado CHP BLOQUEADO y al menos un hash de documento fuente. Los motores miden (rollforward de arrendamiento ASC 842, POC restringido ASC 606, SBC ASC 718). No deciden hechos de derecho. El gasto de tokens se adjunta como fuente en el mismo libro mayor encadenado con HMAC.

Reclamación sin sellar sin documentos

Paquete de evidencia sellado

Arrendamiento financiero ASC 842 termina en 0.00

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

Método

Ruta

Qué

POST

/v1/claims

Abrir una reclamación

POST

/v1/claims/:id/documents

Adjuntar una fuente con nombre; SHA-256 almacenado

POST

/v1/claims/:id/lock

Bloqueo humano → LOCKED

POST

/v1/engines/lease

Clasificación ASC 842 + rollforward

GET

/v1/evidence/:id

Sellar; 400 si no hay documentos o no está bloqueado

Especificaciones

Cambio de OpenSpec: openspec/changes/ship-three-sku-platform/.

Licencia

MIT

Available Tools

3 tools
context.inspectA

Read the current session pack and schema token-tax report for the authenticated principal. Returns the bytes→tokens heuristic, session tool names, savedTokens versus the full allowlist, and (unless includeEstate=false) the estate including oversized flags. Does not admit tools and does not execute other tools. Call this before context.need to see what is already loaded. Fail-closed: requires the same principal as the session.

Inputs: sessionId, includeEstate.

context.needA

Admit extra tools or a named pack into this session (allow-by-need). Always intersected with the principal allowlist — fail-closed. Research cannot admit stripe.charge. Does not run the admitted tools; call tools/list afterwards to see the new pack, or context.inspect to see tax. sessionId defaults to ses_. Denied names are returned in denied[] and recorded on the ledger.

Inputs: pack, tools, sessionId.

echo.pingA

Identity probe. Echoes the call arguments and the authenticated Principal the gateway injected onto this tools/call (id, kind, org). Use it to confirm Bearer identity survived onto the tool worker. Does not hit a network, mutate vault state, or charge. Idempotent except for an audit-ledger append. Not a substitute for context.inspect.

Inputs: message.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 3 tools

    Disambiguation5/5

    context.inspect is read-only session state, context.need is a mutating admission action, and echo.ping is an identity probe. The descriptions explicitly distinguish their purposes, so an agent should not confuse them.

    Naming Consistency5/5

    All tool names follow a consistent namespace.action pattern: context.inspect, context.need, and echo.ping. Even though the namespaces differ, the lowercase dot-separated verb suffix style is uniform across the set.

    Tool Count5/5

    Three tools is small but well-scoped for a governance gateway: inspect current state, request admission, and verify identity. Each tool provides a distinct, non-redundant operation that earns its place.

    Completeness3/5

    The core read and admit operations are covered, and built-in tools/list handles discovery, but there is no way to revoke, release, or reset previously admitted tools or packs. This creates a notable lifecycle gap for an over-admission scenario.

    Related MCP Connectors

    Related MCP Servers