Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 3 min read

approved: true is not approval: server-side approval for AI agent writes

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": { "re

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.

  1. 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.
  2. 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.
  3. 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.
  4. Single use. An approval authorizes at most one execution, and it expires. It cannot authorize a later, different change.
  5. 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.
  6. 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:

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.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.