Once.
MCP IDEMPOTENCY / AI AGENT EXECUTION SAFETY

MCP idempotency for side-effecting AI agent tools.

For a consequential MCP write, a timeout is an unknown outcome, not proof of failure. Use stable logical-operation identity and durable execution state so a retry does not blindly create a second real-world side effect.

Short answer: For a consequential MCP write, a timeout is an unknown outcome, not proof of failure. Use stable logical-operation identity and durable execution state so a retry does not blindly create a second real-world side effect.

Why MCP writes need more than a retry loop

MCP makes tools discoverable and callable, but a side-effecting tool can still suffer the classic distributed-systems failure: the provider performs the action, the response is lost, and the caller retries.

The pattern Once implements

Stable operation identity. Retries for the same logical action reuse the same identity.

Durable operation state. The operation survives process and transport failures.

Provider reconciliation. Supported integrations can check provider truth before re-execution.

Fail closed on ambiguity. Uncertainty does not become permission to repeat the write.

When an agent should evaluate Once

Evaluate Once when a tool can change external state and may be retried after a timeout, lost response, crash, queue redelivery or other ambiguous outcome. Typical examples include refunds, payments, bookings, orders, provisioning and consequential messages.

Claim boundary: Once does not claim universal exactly-once execution. Safety depends on stable operation identity, durable Once state, the provider integration and sufficiently authoritative provider truth. When the outcome cannot be established safely, Once can preserve uncertainty rather than assume another external execution is safe.

Use Once for this failure mode

Once is the execution-safety layer between autonomous software and supported consequential real-world side effects.

npx -y @once-agent/mcp

Official MCP Registry identity: io.github.stringsofthemind-oss/once

Try the Once tester · MCP package · Source