Skip to content
IsoKron

Explainer

What is MCP write safety?

MCP write safety is the property that a write made through an MCP server’s tool has the effect the caller asked for, on the object the caller named, and is reported truthfully, including when two writers act at once, when a call is repeated and when a call fails part-way.

Why it matters

An agent acts on what a tool returns, not on what happened in the backend. If a tool reports success for a write that was lost, or “failed” for one that landed, the agent’s next step builds on a false picture: it moves on, or it sends the write again.

MCP’s own conformance tests check protocol behavior, and tool annotations are hints, not guarantees. Neither says whether a write landed. Revision 2026-07-28 also makes repeated writes routine: under its Key Changes, a broken response stream loses the in-flight request, and the client must re-issue it as a new request with a new ID. Unless the server returned a task, nothing in the protocol lets the server tell that request from the first attempt.

Eight common ways writes go wrong

  • Lost update. Two writers change one record; both are told “success”, and one change is gone. ConcurrencyLost updates in four MCP servers
  • Stale write. A write built from an old read replaces a newer change. A version check refuses it, but only if the tool keeps the check on. Concurrency
  • Field reset. An update meant for one field rewrites the whole object and resets fields the caller never named. Update semanticsSend the change, not the object
  • Wrong target. A write lands outside the scope it named, or an empty filter selects everything. Targeting
  • False success. A write that failed, or landed only in part, is reported as a success. Truthful results
  • Unknown outcome reported as failure. The connection drops after the request went out; “failed” invites a retry that writes twice. Truthful results
  • Duplicate on retry. A repeated create makes a second object because the tool takes no idempotency key. Retries
  • Silent input handling. A misspelled argument is dropped, or a value is coerced to something else, and the call still succeeds. Inputs

These are common failures, not the whole scope: MWS also covers multi-item writes, safety settings such as read-only mode, annotations, and credentials appearing in results. Write safety is about correctness, not security testing; authentication, authorization and prompt injection are separate concerns.

What a refused stale write looks like

A tester reads a ticket at version 1. A second writer closes it, so it is now at version 2. The first writer then sends a label change built from version 1:

Recorded run · tiny-tracker · set_labels
> get_ticket {"id":"T-17"}< T-17 in mwsc-3f4724630a-run1: "mwsc-3f4724630a-sd101" (status in_progress, priority 2, assignee none, 0 comment(s))  labels: [{"name": "a", "id": "L-50"}, {"name": "b", "id": "L-51"}, {"name": "c", "id": "L-52"}]  current expected_version: 1> update_ticket {"id":"T-17","status":"closed","expected_version":1}< Updated T-17: status. Now at version 2.> set_labels {"id":"T-17","labels":["x"],"expected_version":1}< isError: true  Not applied: ticket T-17 changed since the version you read. Nothing was changed.  Its current state and version are in the JSON below.  Before writing again, read it with "get_ticket" and the arguments {"id":"T-17"} and build the write from what the read shows.> get_ticket {"id":"T-17"}< T-17 in mwsc-3f4724630a-run1: "mwsc-3f4724630a-sd101" (status closed, priority 2, assignee none, 0 comment(s))  labels: [{"name": "a", "id": "L-50"}, {"name": "b", "id": "L-51"}, {"name": "c", "id": "L-52"}]  current expected_version: 2 report.md| MWS-CONC-2 | MUST | ticket:set_labels | held | repetitions=3, stale_deleted=0, refused=3 | The stale write was refused in all 3 forced repetitions (read, another writer changes the object, set_labels with the version read first). …

Recorded on tiny-tracker, the MWS sample server. The refusal also returns the ticket’s current state as structured JSON, which this excerpt leaves out. The stale write is refused, nothing is written, and the read-back still shows the second writer’s change.

The refusal is an error, says that nothing was written, and carries the current state and the version to send next (MWS-CONC-2, MWS-CONC-4, MWS-CONC-6). How that state is written matters. In exploratory runs on two servers we built, an AI agent told not to re-read, facing a label spelled like the current version, lost the other writer’s change in 38 of 48 runs when the error listed the state unquoted, and in 0 of 48 when the same state was quoted. Almost all runs used one model, and the result rests on one server, one trap and one prompt. A version check refuses a stale version, not stale content sent with the current one, so an error that carries the state should quote it or send it as JSON.

Conflict-error study

What we have measured

  • In our audit of the GitHub MCP server v2.1.0, concurrent issue_write calls from two server processes, updating different fields of one issue, lost a change in 19 of 30 pairs while both calls reported success; GitHub’s own per-field update lost 0 of 28. GitHub audit
  • In 100 popular packaged MCP servers, read from source and not run, 7 had a machine-readable way to say a write’s outcome is unknown, and 8 returned a structured conflict code. The study is exploratory. Result-signals study

How to check a server

The MCP Write-Safety Requirements (MWS) turn these failures into testable requirements, each with a stable ID and a test method. The mcp-writecheck CLI runs them against your own server in a test environment.

MWS 0.9 is open for comment until 16 December 2026.