
once
io.github.aurumflux20Published by GitHub account aurumflux20v0.2.1Updated Oct 27, 2026
Run a side effect exactly once under retries, redelivery, and concurrent workers.
The publisher's own server: ONCE
Overview
once is a local Python idempotency kernel that lets an assistant run a side effect exactly once under retries, redelivery and concurrent workers.
- What you can do
- Run a named side effect once per key, with duplicate callers coalescing onto the stored result
- Detect same-key/different-payload calls and raise an idempotency conflict instead of returning a cached answer
- Keep state in memory, in a local SQLite file, or in a shared PostgreSQL database across processes and machines
- Handle worker crashes with lease takeover, fence tokens and heartbeats, and free the key when the function raises
- Offer an async variant for FastAPI-style and agent workloads
- Run a built-in storm demo of 1,000 concurrent attempts against one order
- When to use it
- Useful when an assistant or agent calls side-effecting operations such as payments, emails or webhooks that must not fire twice under retries, double submits or fan-out. It is meant for Python code paths that need a durable, concurrency-safe idempotency guard rather than a hand-rolled table.
- Requirements
- Runs as a local process installed from the PyPI package once-kernel, so a Python environment is needed. No authentication, environment variables or headers are declared. A SQLite file path or a PostgreSQL connection string is needed for durable or multi-process state; the default in-memory store is per-process only.
Installation
In SourceWeft
- Open once in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
once
Run any side effect exactly once — even when 1,000 callers demand it at the same instant.
[1,000 concurrent duplicate charges, one execution]
That's not a mock — it's a live attack you can run right now:
The problem
Networks retry. Users double-click. Queues redeliver. AI agents re-fire tools at machine speed. Any of these turns one payment into two, one email into three, one server into two hundred.
Most teams hand-roll an idempotency table — and most of those are quietly broken under concurrent load: two identical requests both pass the "already done?" check, then both execute. The bugs are subtle, the failures are money.
once is that table done right, once, for everyone — a tiny idempotency kernel with the four defenses hand-rolled versions miss:
- Atomic leader election — concurrent duplicates can't all pass the check; exactly one executes, the rest coalesce onto its result.
- Payload fingerprinting (RFC 8785) — same key with a different body is a hard
IdempotencyConflict, never someone else's cached answer. - Fence tokens + generations — a crashed worker's lease can be taken over, and when the "dead" worker wakes up late, it is locked out of corrupting the record.
- Honest failure states — a failed attempt frees the key for retry; an unknown outcome never silently re-runs.
Use it
One box, several processes, no database server — SQLite, nothing to install:
Survives restarts and works across processes (WAL mode). The default MemoryStore does neither — it is per-process, so the moment you run a second worker each one keeps its own private idea of what already ran, and the guard silently stops guarding.
Several machines — share state through the Postgres you already run:
Async (FastAPI, agents) — sync side effects go to a worker thread, waiters park on the event loop (no thread-pool starvation under duplicate storms; there's a test that proves it):
What you can rely on
The honest model (put this on a poster): exactly-once execution + at-least-once result delivery. True network exactly-once is physically impossible — libraries claiming it are lying to you. We execute once and re-deliver the answer as many times as asked.
Tested like money depends on it
Because it does. Every claim above is enforced by the chaos suite — barrier-forced thread storms, dead-lease reclaim stampedes, zombie-writer fencing, frozen-clock timeout attacks, event-loop-starvation detection — run against both the in-memory store and real PostgreSQL on every commit (CI fails loudly if the Postgres bench is skipped). Silence in CI never means "untested."
And we run it on our own production mailer — a double-approved send replays instead of double-emailing a real prospect. Dogfood first.
Not this
- Not a payment provider — it guards your calls to one
- Not a workflow engine (no sagas, no multi-key transactions — by decision)
- Not magic "exactly-once everywhere" — see the honest model above
Docs
- Examples: FastAPI webhook · Celery task — and the three decisions that actually take judgement (key, payload, store)
- 5-minute integration guide
- Full API reference
- State machine — legal & illegal transitions
- What we store: result size + PII policy
- Architecture decisions
Sibling project — EffectFence (Rust)
EffectFence (cargo add effectfence) is the Rust half of the same idea: a causal fence for tool side effects, with content-addressed certificates and an MCP proxy mode — effectfence wrap -- <any mcp server> fences another server's tool calls with zero code change (proven against once-mcp).
Use once when the side effect is Python and you want a durable store; use EffectFence when the fence lives in Rust or in front of an MCP server.
Commercial support
Free and Apache-2.0, and staying that way. If you want help applying it to a codebase that already moves money — side-effecting paths inventoried, storm-tested, fenced, with a CI test that keeps them fenced — email [email protected]. Details: the Fence Audit.
License
Apache-2.0
Source: README.md at commit ffa6a80
Tools
0Version history
1- v0.2.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Other Once integrations
ONCE
app.onceOfficial publisher
Lets an assistant upload, AI-check, submit and track music releases on the ONCE distribution platform.

PairOnce
Published by GitHub account paironce
Pairs an AI agent's machine with your own phone or computer to send and receive files and text, end-to-end encrypted.

ONCE — AI Agent Huddle
Published by GitHub account londoncoding
Remote MCP server that lets an assistant track GitHub issue and Stripe test-payment outcomes and recover uncertain actions.

PostOnce
Published by GitHub account postoncehq
PostOnce is a remote MCP server that lets an assistant create drafts, schedule posts and publish to social accounts connected through PostOnce.

Once
Published by GitHub account stringsofthemind-oss
Once is a local MCP server that helps an AI assistant make consequential external writes, such as refunds or bookings, safe to retry without duplicating the.