drift — mandate enforcement for AI agents
Block an action a signed mandate does not permit: amount, payee, audience, currency, window, intent.
Should I use this
Quality & Safety
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"drift": {
"url": "https://drift.rta.lat/mcp"
}
}
}Remote endpoints
https://drift.rta.lat/mcpstreamable-httpWhat it can do
Tool inventory
Tools (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.
Input Schema
{
"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.
Input Schema
{
"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.
Input Schema
{
"type": "object",
"properties": {},
"description": "No parameters."
}Community
Evidence