
dazai — burn-after-reading secret (motokano)
io.github.New1Direction由 GitHub 账号 New1Direction 发布v0.1.0更新于 Oct 24, 2026
Serve a secret to an agent exactly N times from locked RAM, then wipe it and self-destruct.
概览
本地 MCP 服务器:从锁定内存中按指定次数向智能体提供密钥,随后擦除并自行终止。
- 可以做什么
- 按固定次数向智能体提供预加载的静态密钥值,之后从锁定内存中擦除并结束进程。
- 把智能体的进程 ID 注册到看门狗守护进程,使会话结束时该进程被终止。
- 运行心跳客户端,把守护进程的生命周期绑定到终端或 SSH 会话。
- 可选地把固定字段的生命周期记录(装载、读取、擦除、终止)追加到防篡改账本文件。
- 适用场景
- 适合智能体只需一次性使用某个凭据、且希望明文用后即消失的场景,也适合希望会话结束时智能体自动退出的场景。面向那些目前把密钥明文写在 MCP 配置里、想缩小暴露窗口的用户。
- 运行要求
- 以本地进程通过 stdio 运行,支持 macOS 与 Linux;预编译二进制覆盖 macOS arm64/x86_64 与 Linux x86_64/arm64,也可用 Cargo 从源码构建。带 seccomp 限制的守护进程需在 Linux 上从源码构建,并需 libseccomp-dev 与 pkg-config。密钥通过命令行工具定义传入,未声明任何环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 dazai — burn-after-reading secret (motokano),将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ningen-shikkaku
Burn-after-reading secrets for AI agents.
ningen-shikkaku ships two small Rust binaries — dazai (the session-bound daemon) and motokano (a self-immolating one-shot MCP server).
Your MCP configs are full of plaintext API keys, and every agent you run can read all of them — and they keep working long after the agent is done. dazai inverts that: secrets live in locked, non-swappable RAM, are served to agents over MCP, and are destroyed after N reads — or the instant your session dies.
Point any MCP client at it and call get_key once → you receive s3cr3t
→ the server wipes the value out of locked memory and SIGKILLs itself. Call
again → the process is gone.
Install
Prebuilt binaries are built with default features; the seccomp-confined daemon
is a from-source build (it links libseccomp — install libseccomp-dev +
pkg-config first).
Use it with Claude Code
Any MCP client works the same way — the transport is plain stdio.
And the second act: a dead-man's switch for your agents
The same daemon is a session kill-switch. Any MCP client registers its PID;
when your shell/SSH session dies, your heartbeat stops, or a panic signal
arrives, dazai SIGKILLs every registered process, overwrites its secrets
with a wipe the compiler can't optimize away, and exits. Walk away: agents
die, secrets burn.
It runs only on your own machine, on your own secrets and your own configured tools. It never touches another process, file, or host.
What's in the box
It ships in two layers:
- a hardened Rust daemon + tooling — the real thing:
mlock(no swap),madvise(MADV_DONTDUMP)+prctl(PR_SET_DUMPABLE, 0)(no core dumps / no ptrace), a seccomp syscall allowlist (noexecve/open/connect/…), and a non-elidableexplicit_bzero/memset_swipe; and - a Python reference implementation — the original proof-of-concept that
established the mechanism (see
python-reference.md).
Architecture
Korg interop
dazai daemon and motokano can feed Korg's
tamper-evident ledger: --korg-sink PATH (or /dev/fd/N for a pre-opened
descriptor) appends one Korg append-shape record per arm, session, read, wipe
and kill step. Records carry only fixed-vocabulary fields and counters. Secret
values, lengths, digests, tool names, arguments, paths and the environment are
never recorded. Korg imports the file through its ningen-shikkaku.lifecycle@v2
envelope profile and assigns sequence numbers, hashes and signatures. See Korg lifecycle records.
Threat model
daZai shrinks the window and the surface in which plaintext secrets are reachable, and makes session-end deterministically destroy them.
It protects against:
It does NOT protect against (and the project is deliberately honest about this):
- GPU VRAM. If an attached LLM/agent copies a secret into GPU memory, killing the host process does not wipe VRAM. daZai controls host RAM and the processes it supervises — not an accelerator's memory.
exec-tool stdout.motokano'skind=exectools return a command's stdout, which is OS-buffered and not held in a locked buffer. Usekind=static(a pre-loaded, locked, wipeable value) when you need the wipe guarantee.- Managed-runtime residue (Python reference). CPython copies
bytesfreely, so a secret may transiently live in unlocked heap before/after the locked buffer. The Rust implementation eliminates this for its own buffers (data is written into the locked mapping and never copied to a GC heap); the Python tier is a reference, not a hard guarantee. - A privileged or same-UID attacker on the live box (root,
/proc/<pid>/mem, a debugger) reading memory before the wipe.mlockstops swap, not memory reads; seccomp +PR_SET_DUMPABLEraise the bar on Linux, but an adversary who already has privileged access to your running machine is out of scope. - Cold-boot / DMA / physical attacks on RAM.
- A hard crash (kernel OOM, an external
kill -9, power loss): the wipe path can't run, so nothing is zeroed. The mechanism is best-effort on these paths and never claims otherwise.
In short: daZai is not, and cannot be, a guarantee against an attacker who already owns your running machine. It is a sharp tool for making secrets ephemeral and session-bound, with every limitation stated up front.
Verification
- 81 tests across the Rust workspace (secure memory, the panic policy, the wire protocol, the MCP layer, the one-shot lifecycle, the Korg lifecycle contract) plus the 29-test Python reference.
- Linux seccomp is validated on both architectures under the real
KillProcessfilter —aarch64(locally) andx86_64(CI) — where the daemon installs the live filter and the full integration suite runs against it with noSIGSYS. - Every push runs the whole suite (default and
--features seccomp),clippy -D warnings, andrustfmt --checkon x86_64 Linux as a permanent regression gate.
Deep technical docs (per-crate design, the seccomp allowlist, the
adversarial-review history) live in rs/README.md; the Python
proof-of-concept is in python-reference.md.
The name
Named for the novelist Osamu Dazai, whose work circles themes of disappearance and self-erasure — fitting for software whose defining act is to wipe itself out the moment it is no longer being watched over. The repository takes its name from his novel No Longer Human (人間失格, Ningen Shikkaku). It's flavor, not a manifesto; the software just self-destructs on cue.
License
MIT © 2026 New1Direction.
来源:README.md,提交 f464356
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分