MCP server for the sandbroker typed-return secret broker: USE secrets, never SEE their values.
Project description
sandbroker MCP server
A stdio Model Context Protocol server that lets any MCP host (Claude Code and others) natively drive the sandbroker broker. The model can USE secrets through pinned verbs but can NEVER SEE their values.
It is a thin MCP wrapper over the exact same daemon protocol bin/sandbroker
speaks. It adds no new daemon-side surface: it consumes the existing catalog
and invoke actions only.
What it exposes
| Tool | Wraps | Purpose |
|---|---|---|
secret_catalog |
catalog action |
List the item references available in a vault. Returns item ids + titles only, never a value. |
secret_invoke |
invoke action |
Run a pinned verb that USES a secret and return the typed OUTCOME (ok/error), never the value or the operation's output. |
The human-only, direct-socket actions (lock, status, set_retention) are
not exposed. Those are operator actions, not model actions.
Security guarantee (values never cross the tool boundary)
The product promise holds structurally, not by filtering:
- sandbroker's response schema has no field a secret value can occupy. A verb
returns the OUTCOME of an operation (
{ok}/{error}), never its output. - This server passes through only the daemon's own typed keys
(
ok, error, verb, items, status, retry_after) and re-filters them on ingress as defense in depth, so even a tampered daemon reply cannot smuggle an extra field to the model. - This server never reads a secret from anywhere; it holds no tokens.
The approval code surfaced on a confirm-tier request is not a secret: it
is a one-time code the human types into the Windows approval window. Only its
sha256(sid:code) hash is ever sent to the daemon; the plaintext lives only in
the chat and the human's typing, exactly as with sandbroker.
Transports
Two transports, tried in sandbroker's order, so this works sandboxed or not:
- Direct UNIX socket to sandbroker (
SANDBROKER_SOCKET, default/opt/sandbroker/run/sandbroker.sock). This is the normal path: the MCP server runs UNSANDBOXED, launched over stdio by the host. - File-queue bridge (
SANDBROKER_BRIDGE_DIR, default/tmp/sandbroker-bridge) for parity with sandboxed contexts whose seccomp filter blocksAF_UNIXconnect. The per-session queue carries only the operation in and{ok,error}out, never a value.
Environment variables
| Var | Default | Meaning |
|---|---|---|
SANDBROKER_SOCKET |
/opt/sandbroker/run/sandbroker.sock |
Daemon UNIX socket path. |
SANDBROKER_BRIDGE_DIR |
/tmp/sandbroker-bridge |
File-queue base for the bridge transport. |
SANDBROKER_SID |
(unset -> daemon default _nosid) |
Session id, normally injected by the launcher. |
SANDBROKER_NO_BRIDGE |
(unset) | 1 = socket only, never fall back to the bridge. |
SANDBROKER_FORCE_BRIDGE |
(unset) | 1 = bridge only, skip the socket (sandbox parity testing). |
Install
pipx install sandbroker-mcp # puts the `sandbroker-mcp` command on PATH
From a checkout instead: cd mcp && python3 -m venv .venv && .venv/bin/pip install .
(provides the sandbroker-mcp console script and python -m sandbroker_mcp).
Register in Claude Code
After pipx install sandbroker-mcp, the command is on PATH:
claude mcp add sandbroker --scope user -- sandbroker-mcp
From a checkout venv instead, point at its absolute path, e.g.
/path/to/mcp/.venv/bin/sandbroker-mcp.
Pass a non-default socket or force a transport with --env:
claude mcp add sandbroker --scope user \
--env SANDBROKER_SOCKET=/opt/sandbroker/run/sandbroker.sock \
-- sandbroker-mcp
settings.json snippet (equivalent)
{
"mcpServers": {
"sandbroker": {
"command": "/absolute/path/to/mcp/.venv/bin/sandbroker-mcp",
"args": [],
"env": {
"SANDBROKER_SOCKET": "/opt/sandbroker/run/sandbroker.sock"
}
}
}
}
Usage flow
secret_catalog(vault="Dev")-> discover item ids/titles. Build a ref likeop://Dev/<id-or-title>/password.secret_invoke(verb="canary.probe", ref="file://canary")-> auto-tier verbs return{ok:true}immediately.- Confirm-tier vaults (e.g.
Production,Infra) require one human approval:- First call returns
{ok:false, error:"hello_pending"}plus a 6-digitapproval_codeinguidance. - Relay the code to the human. They type it into the Windows approval window and approve with Windows Hello.
- Call
secret_invokeagain with the sameverb/ref/justificationto poll. You will seehello_waitinguntil they confirm, thenok. - An auditor-enabled vault may instead return
auditor_reviewing; just call again with the same arguments. The daemon fail-closes to a human by its own deadline.
- First call returns
secret_invoke requires a justification for confirm-tier vaults (a short,
human-readable reason). Never put a secret in args; secrets come only from the
ref.
Relationship to sandbroker
This server mirrors bin/sandbroker exactly: same request shape, same
per-invocation code + code_hash derivation, same auditor retry loop (sleep
retry_after, re-send the same request, up to 6 times). The difference is
surface only: sandbroker writes human banners to stderr; this server returns
that guidance in the tool result so the model relays it to the human.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sandbroker_mcp-0.1.0.tar.gz.
File metadata
- Download URL: sandbroker_mcp-0.1.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c42a2d4552ac9622b6aaa4f04bfb8f241a70bf6ff62cab0e89b4e7e53389cb46
|
|
| MD5 |
bb2393a8a72af8922c35e422a3992a58
|
|
| BLAKE2b-256 |
2fad75e1e24503472833a40cf20382f0ba452723fbe54b73106313927983b984
|
Provenance
The following attestation bundles were made for sandbroker_mcp-0.1.0.tar.gz:
Publisher:
release-mcp.yml on 312-dev/sandbroker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sandbroker_mcp-0.1.0.tar.gz -
Subject digest:
c42a2d4552ac9622b6aaa4f04bfb8f241a70bf6ff62cab0e89b4e7e53389cb46 - Sigstore transparency entry: 2310171723
- Sigstore integration time:
-
Permalink:
312-dev/sandbroker@bb61ef9559b2f96588d6d8c8a6828b320b769efe -
Branch / Tag:
refs/tags/mcp-v0.1.0 - Owner: https://github.com/312-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-mcp.yml@bb61ef9559b2f96588d6d8c8a6828b320b769efe -
Trigger Event:
push
-
Statement type:
File details
Details for the file sandbroker_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sandbroker_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85ed4a402a059004456b344fa2b269b9051e4cd803a1d7a5ae8035735ede71eb
|
|
| MD5 |
7daed00e7dc4ce6d3779e23ab0e384a3
|
|
| BLAKE2b-256 |
9d2130304d5a2bcf2d662693b3d2d68d27674615d3fdc09706386261afa7c0fb
|
Provenance
The following attestation bundles were made for sandbroker_mcp-0.1.0-py3-none-any.whl:
Publisher:
release-mcp.yml on 312-dev/sandbroker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sandbroker_mcp-0.1.0-py3-none-any.whl -
Subject digest:
85ed4a402a059004456b344fa2b269b9051e4cd803a1d7a5ae8035735ede71eb - Sigstore transparency entry: 2310171741
- Sigstore integration time:
-
Permalink:
312-dev/sandbroker@bb61ef9559b2f96588d6d8c8a6828b320b769efe -
Branch / Tag:
refs/tags/mcp-v0.1.0 - Owner: https://github.com/312-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-mcp.yml@bb61ef9559b2f96588d6d8c8a6828b320b769efe -
Trigger Event:
push
-
Statement type: