drift MCP server
Commit Nov 12, 2026Enforces signed mandates for AI agents by validating actions against constraints like amount, payee, currency, and intent.
Also known as mrpkk/drift, drift
- Stars
- 0
- Tools
- 3
- Downloads, 30 days
- —
- Latest version
- 0.1.0
- Last commit
- Nov 12, 2026
- License
- Apache-2.0
What is drift MCP?
drift enforces signed mandates for AI agents by validating actions against constraints like amount, payee, currency, and intent. It exposes 3 tools, such as drift_check, drift_session, drift_explain.
Summary generated from the project's README
About drift MCP server
Drift provides a security layer for AI agents by enforcing signed mandates during decision-making. While traditional protocols often verify authority only at the moment of signing, this server validates every individual action against specific constraints before it occurs. It is designed for developers building autonomous agents that require strict boundaries on financial or operational authority. Users can connect to the remote MCP endpoint at drift.rta.lat/mcp or run a local instance using the provided Python commands.
The system checks actions against six specific rules including amount, payee, audience, currency, window, and intent. It uses three primary tools: drift_check for single actions, drift_session for analyzing sequences with a chain fingerprint, and drift_explain to view rule priority. The server operates without state or an HTTP framework, relying only on the standard library. It does not execute transactions or verify signatures itself, but rather acts as a decision-making gatekeeper. The service includes 100 free checks per day, with a cost of $0.005 per call after that limit.
What you can do with it
- 1Preventing excessive spendingVerify that an agent does not exceed a predefined monetary limit during a transaction.
- 2Validating recipient identityEnsure that an AI agent is sending funds to the correct authorized payee.
- 3Enforcing temporal constraintsCheck if an agent is attempting to perform an action outside of its allowed time window.
- 4Auditing action sequencesAnalyze a series of agent actions to generate a report containing a chain fingerprint.
Written from the project's README. Every use case is checked against a quote from it.
How to install drift MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall drift MCP in Claude Code
$ claude mcp add --transport http drift https://drift.rta.lat/mcpInstall drift MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"drift": {
"url": "https://drift.rta.lat/mcp"
}
}
}Install drift MCP in VS Code
.vscode/mcp.json
{
"servers": {
"drift": {
"type": "http",
"url": "https://drift.rta.lat/mcp"
}
}
}Install drift MCP in VS Code CLI
$ code --add-mcp '{"name":"drift","type":"http","url":"https://drift.rta.lat/mcp"}'Install drift MCP in Codex
$ codex mcp add drift --url https://drift.rta.lat/mcpInstall drift MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.drift] url = "https://drift.rta.lat/mcp"
Install drift MCP in Gemini CLI
$ gemini mcp add -s user --transport http drift https://drift.rta.lat/mcpInstall drift MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"drift": {
"url": "https://drift.rta.lat/mcp",
"type": "http"
}
}
}drift MCP tools 3
Detected from the READMEdrift_checkdrift_sessiondrift_explain
| drift_check | — | |
| drift_session | — | |
| drift_explain | — |
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablemrpkk/drift is public and reachablegithub.com/mrpkk/drift ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-12github.com/mrpkk/drift ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model3 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeinitialize answered with protocol 2025-06-18 in 962 msPass
README
View on GitHubdrift
Continuous mandate enforcement for AI agents. Every action is checked against the signed mandate before it happens, not once at signing.
Live: https://drift.rta.lat · MCP endpoint: https://drift.rta.lat/mcp
pip install drift # or: pip install -e .
python3 -m drift.http_server --http 8080
The gap
An agent is granted a mandate: who to pay, how much, in which currency, until when. AP2 verifies that mandate once, at signature time. After that the agent acts alone, and nothing holds it inside its authority.
Measured proof that this matters, from the AP2 Python SDK itself:
verify_chain documents:
"enforcing expected_aud / expected_nonce on the terminal hop when provided"
but kb_sd_jwt.verify calls verify_expected_claims only when typ in TYP_TERMINAL,
and a kb+sd-jwt+kb token — which the SDK itself produces whenever the payload
carries a cnf — falls into TYP_INTERMEDIATE:
hop type : kb+sd-jwt+kb
aud in token : https://attacker.example/ap2
expected_aud : https://honest-merchant.example/ap2
ACCEPTED a token with the wrong audience.
The protocol an agent trusts with its spending authority does not check that the authority was not substituted. drift checks it.
What it checks
| # | rule | catches |
|---|---|---|
| 1 | amount |
over the limit — the most common form of drift |
| 2 | payee |
wrong recipient |
| 3 | audience |
payment redirected to someone else |
| 4 | currency |
currency substituted |
| 5 | window |
outside the validity period |
| 6 | intent |
intent outside the allowlist |
Default is DENY. Rules run in fixed order, so a refusal names the most important reason rather than an incidental one.
MCP tools
| tool | purpose |
|---|---|
drift_check |
check one action against a mandate |
drift_session |
check a sequence, get a report with a chain fingerprint |
drift_explain |
show the rules in the order they apply |
No SSE, no stateful sessions, no HTTP framework. Standard library only.
Example
from drift import Mandate, Drift, Action
m = Mandate(
payee_id="shop", audience="https://merchant.example/ap2",
max_amount_minor=10_000, currency="USD",
valid_from=1_700_000_000, valid_until=1_700_086_400,
allowed_intents=("buy",),
)
d = Drift(m)
verdict, rule = d.submit(Action(
intent="buy", payee_id="shop", audience="https://merchant.example/ap2",
amount_minor=99_999, currency="USD", at=1_700_000_060,
))
print(verdict, rule) # DENY amount
Limits, stated plainly
- Does not verify mandate signatures. That is AP2's job. drift runs after signature verification, at the level of decisions.
- Does not execute. It decides; the caller acts.
- Does not keep state. A session is an argument. No state means no attack surface and no divergence under replication.
- Does not tell truth from intent.
intentarrives from the agent and is untrusted input. drift bounds the damage; it does not certify the intent.
If an agent controls both intent and amount, it can lie in both. Closing that gap is
attest's job: attest proves afterwards, drift bounds beforehand. They are complements.
Use it from your agent
{
"mcpServers": {
"drift": { "url": "https://drift.rta.lat/mcp" }
}
}
That block is how our own agents call this server. Tools: drift_check (one
action), drift_session (a sequence), drift_explain (the six rules and why
each exists). 100 free checks per day, then $0.005 per call over x402.
Licence
Apache-2.0.
drift MCP questions
How do I add drift MCP to Claude Code?
Run claude mcp add --transport http drift https://drift.rta.lat/mcp in your terminal. Add --scope user to make it available in every project.
How do I add drift MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does drift MCP provide?
It exposes 3 tools, including drift_check, drift_session, drift_explain.
Does drift verify the signature of the mandate?
No, verifying mandate signatures is the responsibility of AP2; drift operates at the decision level after signature verification.
Does the server maintain state between calls?
No, the server does not keep state, which reduces the attack surface and prevents divergence under replication.
What are the available MCP tools?
The server provides drift_check for single actions, drift_session for sequences with reports, and drift_explain to show applicable rules.