If your MCP server has a write tool, you have probably seen a schema like this, or a tool description that asks the model to confirm first:
{
"name": "update_record",
"inputSchema": {
"properties": {
"record_id": { "type": "string" },
"fields": { "type": "object" },
"approved": { "type": "boolean", "description": "Set to true once the user has confirmed" }
}
}
}
The tool description tells the model to show the change and ask first. The approved flag is how the model reports that it did.
The problem: the server cannot tell an approved call from an unapproved one. The same party that proposes the change also reports the approval. A headless agent, a plain mistake or a prompt injection can set approved: true. An approval given for one change can be replayed for a later, different change. And afterwards, nobody can show who approved what.
I kept running into this while connecting agents to CRMs, so I wrote down what a server would have to do to make approval real. The result is Enforced Approval, an open draft specification. Draft 0.2 is out now.
The idea: the server enforces it, not the client
The check moves to the server, so it holds even when the client never asks anyone.
- Hash the exact change. The server builds a change object from the request, the server, the account and the principal (the identity from the agent's credential), and hashes it. Fields that only claim approval happened are left out.
- Refuse without approval. A guarded write with no approval for that hash does not run. The server returns a refusal that says what is needed.
- Approve on the server's own page. The refusal links to an approval page on the server. A person signs in, sees the change and approves or denies it. The agent then sends the same request again.
- Single use. An approval authorizes at most one execution, and it expires. It cannot authorize a later, different change.
- Bounded grants. For repetitive work, a person can approve a bounded set of future changes. The server fixes the scope from the change shown (principal, account, operation, fields); the person only sets a record limit and an expiry.
- Audit. The server writes a hash-chained record of each refusal, each use of an approval and each outcome, naming the approver.
Because the client carries nothing in this "server-issued" profile, it needs no support from the client, including clients you don't control. There is also an experimental signed-receipts profile, where an organization-registered issuer signs a receipt the client carries. No client I've tested can carry a receipt yet, so that part is there for comment.
What's in the release
- the core specification and the two approval profiles
- numbered conformance tests, each naming the requirement it checks
- test vectors for the change hash
- a sandbox server you can run locally (Node 24+):
cd sandbox && npm install
node test/run.mjs
node test/e2e-server-issued.mjs
One warning, from the README itself: the sandbox is a test harness, not a product. Its sign-in accepts a typed test name, its data is synthetic and its key is public test material. Don't put it in front of a real system.
Where it honestly stands
Draft 0.2 is frozen and open for review. So far there has been no live run of the Draft 0.2 sandbox in a real client, no independent server implementation, and no human security review. That is exactly the kind of feedback I'm looking for.
If you build MCP servers or agent tooling that writes to real systems, I'd value your eyes on it:
- Spec and sandbox: https://github.com/chsharoze/enforced-approval
- Overview and citation: https://sharozeiftikhar.com/enforced-approval/
- DOI (all versions): https://doi.org/10.5281/zenodo.24379987
Issues are the best place for feedback. Please name the document and the requirement or test number you mean.
This post was drafted with AI assistance and reviewed and edited by me.
Top comments (6)
One race condition I'd account for: the record can change after approval but before the write is replayed. Is an expected resource version or ETag included in the hashed change object? Binding it would make the approval fail if the underlying record changed, rather than applying an approved patch to a state the reviewer never saw.
Good catch — that's the exact race my setup doesn't solve either. In my local-window design the approval is bound to the moment I click, not to a version of the thing being changed: if the target changes between my click and execution, nothing rechecks it. I said as much in my comment above — it's the honest gap in the local pattern.
The guard I do have covers a different race: in Broker mode the server refuses to repeat a command whose outcome is unknown, even after a restart, until I clear it by hand. That stops silent retries after a dropped connection, not a mutated payload.
So yes — binding an expected version or ETag into the hashed change object, so the approval fails instead of applying to a state the reviewer never saw, is the right shape for the server-side design. For a single-owner local server I've lived with the gap; for anything shared or remote, I'd want exactly what you're asking for.
One implementation detail worth watching: the version check needs to be atomic with the write. If the server checks the ETag and then applies the change separately, another update can slip in between. An
If-Match-style conditional write or compare-and-swap would close that last race. I'd also define what happens when the target system doesn't support versioned writes — silently falling back to an unchecked update would defeat the protection.Agreed on both points. A check followed by a separate write is just the same race one level down — the version test has to be part of the write itself, If-Match or compare-and-swap, or it only narrows the window instead of closing it.
And the fallback point matters as much: if a target can't do versioned writes, failing closed — refuse, or require a fresh approval — is the only safe default. A silent downgrade to an unchecked write turns the protection into decoration.
From my local side, there's no versioned store at all — commands act on a live system. That's why my only equivalent guard is cruder: if a command's outcome is unknown, it never runs again until I clear it by hand. Different mechanism, same instinct: when you can't prove the state, don't proceed as if you could.
I found this interesting because the distinction between client-side and server-side approval matters, particularly with MCP tools.
I work on improving Relay’s visibility and recently carried out two tests in which I observed two separate approval steps between Claude Desktop and a remote Windows computer. First, I allowed the MCP tool to be used in Claude Desktop on my laptop. The person at the receiving computer could then approve or reject execution on their own machine.
During one of the tests, the person at the receiving computer deliberately rejected a file modification. The proposed command would have appended a ninth line to an eight-line test file, and Claude reported the rejection. We then checked the file with a separate, approved read. All eight original lines were still there, and the proposed ninth line was absent. This was one of the most interesting parts of the test for me, because I could check both the returned message and the actual state of the file.
I wrote about the test in more detail here: dev.to/ezstgb/reading-a-remote-log...
Nice test — and the part I liked most is that you checked the file itself, not just Claude's report of the rejection. That's the same instinct behind my setup: the approval window shows the literal command to be run, and silence counts as denied, so the model can't talk its way past the human.
The two-step shape you saw — client-side allow, then the person at the machine — is what my single-owner version collapses onto one screen: reads inside allowed folders run without a window, and everything else stops at the window on my PC until I click. Verifying the state after a rejection, the way you did with the separate approved read, is the bit most demos skip.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.