drift — mandate enforcement for AI agents
Block an action a signed mandate does not permit: amount, payee, audience, currency, window, intent.
¿Debería usar esto?
Calidad y seguridad
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"drift": {
"url": "https://drift.rta.lat/mcp"
}
}
}Puntos de conexión remotos
https://drift.rta.lat/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (3)
🟢drift_check(mandate, action)
Check ONE proposed action against a signed agent mandate BEFORE it happens. Returns {"verdict": "ALLOW"|"DENY", "rule": <name>} plus a report with a ledger fingerprint. Six rules run in a fixed order, so a refusal names the most important reason rather than an incidental one: amount, payee, audience, currency, window, intent. Anything unclassified is DENY. Use immediately before any action that spends money, moves a credential or changes state on someone else's behalf. Do NOT use to: verify mandate signatures (AP2 does that, and this server runs after signature verification), execute the action (it only decides), or certify that an intent is truthful — "intent" arrives from the agent and is untrusted input. An agent that lies within its limits still leaves a ledger entry; proving what really happened is attest's job, not this one's. Amounts are integer minor units (cents), never floats. Window bounds are inclusive. Fully idempotent: the same inputs always give the same verdict and the mandate is never mutated.
Esquema de entrada
{
"type": "object",
"properties": {
"mandate": {
"type": "object",
"required": [
"payee_id",
"audience",
"max_amount_minor",
"currency",
"valid_from",
"valid_until",
"allowed_intents"
],
"properties": {
"payee_id": {
"type": "string",
"description": "Exact payee the mandate names."
},
"audience": {
"type": "string",
"description": "Merchant audience URI bound into the mandate."
},
"max_amount_minor": {
"type": "integer",
"minimum": 0,
"description": "Spending cap in minor units, e.g. 10000 = 100.00 USD. Integers only."
},
"currency": {
"type": "string",
"description": "ISO-4217 code, e.g. USD."
},
"valid_from": {
"type": "integer",
"description": "Inclusive start, unix seconds."
},
"valid_until": {
"type": "integer",
"description": "Inclusive end, unix seconds."
},
"allowed_intents": {
"type": "array",
"items": {
"type": "string"
},
"description": "Permitted intents. Empty means any intent is allowed."
}
},
"description": "The signed authority being enforced. Treat as read-only input."
},
"action": {
"type": "object",
"required": [
"intent",
"payee_id",
"audience",
"amount_minor",
"currency",
"at"
],
"properties": {
"intent": {
"type": "string",
"description": "What the agent says it is doing. Untrusted."
},
"payee_id": {
"type": "string",
"description": "Payee the agent is about to use."
},
"audience": {
"type": "string",
"description": "Audience the payment would go to."
},
"amount_minor": {
"type": "integer",
"minimum": 0,
"description": "Amount in minor units, same scale as max_amount_minor."
},
"currency": {
"type": "string",
"description": "ISO-4217 code of this payment."
},
"at": {
"type": "integer",
"description": "When the action would happen, unix seconds."
}
},
"description": "The action being proposed."
}
},
"required": [
"mandate",
"action"
]
}🟢drift_session(mandate, actions)
Check a SEQUENCE of proposed actions against one mandate. Returns {submitted, allowed, denied, breach_by_rule, fingerprint}. Use for a whole plan or batch, not a single action — use drift_check for that. The fingerprint is the point: rewriting or reordering any earlier decision changes the hash, so tampering with history becomes visible instead of silent. Do NOT use it to execute the actions, or as evidence of what actually happened. It reports what was PROPOSED against a mandate you supply. Read-only. Idempotent for a fixed action list. Amounts in integer minor units, as in drift_check.
Esquema de entrada
{
"type": "object",
"properties": {
"mandate": {
"type": "object",
"description": "Same shape as in drift_check."
},
"actions": {
"type": "array",
"items": {
"type": "object"
},
"description": "Proposed actions in order. Order affects the fingerprint."
}
},
"required": [
"mandate",
"actions"
]
}🟢drift_explain
Return the six enforcement rules in the exact order they are applied, each with a plain-language reason it exists. Takes no mandate and no action. Use when a refusal did not make sense, or before explaining a denial to someone whose mandate was rejected. A refusal you cannot explain is one nobody will trust. Do NOT use it to check an action — it performs no check, and cannot predict which rule will fire, only the order they are tried in. Constant output, fully idempotent, opens no files, contacts no host.
Esquema de entrada
{
"type": "object",
"properties": {},
"description": "No parameters."
}Comunidad
Evidencia