Once logo

Once

Protects consequential agent writes by replaying confirmed outcomes and blocking retries when the original result is unknown.

Install Once

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for once, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

The once MCP server adds retry safety for consequential writes made by AI coding agents, including refunds, bookings, payments, messages, and tickets. It records one logical operation in durable local state, replays confirmed results, and blocks a second write when the first outcome is unknown. Reach for once when a provider can commit an effect before its response reaches the caller and duplicate execution would matter. It runs locally without an account or API key and can protect host-owned callbacks through the Once SDK.

Use cases

  • Protect refund operations from duplicate retries
  • Block repeated bookings after lost acknowledgements
  • Replay confirmed payment results after a restart
  • Guard agent-created messages and tickets against unsafe redispatch

Key features

  • Durable local operation ledger
  • Confirmed-result replay
  • UNKNOWN outcome blocking
  • Conflict detection for changed effects
  • Host-defined operation identity and effect binding
  • Optional authoritative reconciliation

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 59d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads972MPackage downloads in the last 30 days.
Last commit1d agoMost recent push to the default branch.

How Once works

What once does

Once provides an execution-safety boundary for agent operations that change external state. Its purpose is to prevent unsafe retries after ambiguous failures such as lost responses, timeouts, or process restarts. A logical operation is recorded once, and later attempts use that recorded state rather than blindly issuing another provider request.

Confirmed operations can be replayed without producing another external effect. If the original result cannot be established, Once returns an UNKNOWN state and blocks redispatch. That state is deliberately conservative: the action may already have succeeded, so the operation identity and durable ledger must be retained while an authoritative read-only lookup is performed.

The server is relevant to AI coding agents that can invoke tools for refunds, bookings, payments, messages, tickets, or other consequential writes. It does not automatically provide support for a particular payment or business provider; the host supplies the provider callback and, when available, the reconciliation function.

How it works

The host defines a stable operation identity and the complete effect description, including account, tenant, and other effect-bearing fields. Once uses those values to associate retries with the same logical intent. A host-owned async callback performs the actual provider operation, while an optional reconciliation function checks authoritative provider truth.

The normal flow distinguishes confirmed, unknown, and conflicting attempts. A confirmed result can be replayed after a restart. Changing effect data for an already recorded identity creates a conflict rather than another write. When reconciliation cannot confirm the original result, the retry remains blocked. Genuine new intents therefore need distinct operation IDs, such as separate IDs for legitimate partial refunds.

Protection depends on the ledger as part of execution authority. Replacing, deleting, resetting, rolling back, or switching the valid ledger can allow an effect to run again, and a matching filesystem path alone does not prove that the same history is present.

Setup and configuration

The MCP package can be started with:

Terminal
npx -y @once-agent/mcp

The documented local integration uses Node.js 24.15 or newer and a persistent SQLite file shared by the protected process on one machine. No account or API key is required. With the SDK, wrapTool receives the callback plus operationId, effect, statePath, and an optional reconcile function. The reconciliation function should return a confirmed result only from authoritative provider data; otherwise it should report UNKNOWN.

Preserve the original consistent SQLite state across restarts and do not reinitialize expected state when it is missing. Every write that needs protection must pass through the wrapper. Internal retries hidden inside the callback remain outside this protection boundary.

Tools and capabilities

  • Protect host-owned asynchronous tool callbacks with wrapTool.
  • Protect local functions with the SDK's protectLocal path.
  • Classify supported agent tools as BYPASS, PROTECT, or fail-closed UNKNOWN through the automatic Connect path.
  • Wire local tool registries with logical identity and effect binding.
  • Wrap OpenAI Agents function tools directly.
  • Run read-only checks, a controlled proof, and diagnostic assessment through the SDK command-line interface.

The controlled proof uses a local HTTP provider and an effect journal to demonstrate lost acknowledgements, restart replay, conflict detection, and UNKNOWN blocking. Its evidence applies to that controlled fixture rather than to a real financial provider.

Limitations and notes

Once does not promise universal exactly-once execution and does not replace a database, queue, framework, Temporal, or a provider's native idempotency mechanism. Use a provider idempotency key or a database uniqueness constraint when either completely solves the operation, and retain those protections when using Once.

The local SQLite authority is limited to one machine and requires durable shared state. UNKNOWN blocking does not repair lost history, and observing that an effect is absent does not automatically authorize local redispatch. Opaque callback retries and connector-only model access are outside the protection boundary.

The LangGraph evidence covers deterministic local JavaScript checkpoint replay with a persistent same-machine SQLite authority. It is not evidence for LangGraph Cloud behavior, a Cloud sweeper, or a universal fix for Cloud execution.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Once

once is an MCP server that connects AI coding agents to a durable local execution-safety ledger for consequential writes. Its main capabilities are recording logical operations, replaying confirmed results, detecting changed effects as conflicts, and blocking retries when the original provider outcome is unknown.

Install and run it with `npx -y @once-agent/mcp`. Protected local integrations also require Node.js 24.15 or newer and a persistent same-machine SQLite authority. The local setup does not require an account or API key.

Once blocks redispatch when the original outcome is unknown. Keep the same operation identity and durable ledger, then use an authoritative read-only provider lookup to determine whether the effect was confirmed; do not mint a new ID or bypass the protection boundary.

No. Use a provider idempotency key or a database uniqueness constraint when it completely solves the operation, and keep native idempotency protections even when Once is also used.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOnce AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/once-4?style=directory)](https://allmcps.com/mcp/once-4)
HTML Embed
<a href="https://allmcps.com/mcp/once-4"><img src="https://allmcps.com/api/badge/once-4?style=directory" alt="Once on AllMCPs" /></a>