AnB-MCP
AnB-MCP is a security-focused server that lets AI agents use secrets without ever seeing the plaintext values, acting as a secure bridge between agents and a Key Management System (KMS).
anb_list: Retrieve the names and metadata (description, key epoch, length, entropy bits) of all secrets the identity is authorized to reference — never the actual values.anb_exec: Run operator-allowlisted commands with secrets automatically injected into the child process's environment via<agent-vault:key>placeholders. Only commands matching allowlisted rules are permitted. Returns exit code and redacted stdout/stderr — the raw secret never reaches the caller.anb_redact: Scrub arbitrary text by replacing known secret values and high-entropy tokens with<agent-vault:key>placeholders — useful before logging or returning output that might inadvertently contain a secret.anb_render_to_file: Resolve a template containing<agent-vault:key>placeholders and write the result as a mode-0600 file to a restricted directory. Returns only the file path — the resolved content is never returned to the caller.anb_status: Perform a health and authorization self-check reporting Bob (KMS) reachability, lock status, enrolled identity, authorized key prefixes, and exec-rule count — without exposing any secret values.
AnB-MCP
An MCP server front-end for AnB that lets AI agents use secrets without ever seeing them.

Headline guarantee: even a fully prompt-injected agent, calling every tool in every way, cannot extract a raw key. No tool returns a plaintext secret; reveal paths require a TTY that this server does not have, so
alicerefuses them.
Unlike a naive "secrets MCP" that hands the key to the model, here the agent gets
placeholders and outcomes — the plaintext stays behind the anb-mcp → alice → Bob
boundary.
How it works
Agent (untrusted) ──MCP/stdio──► anb-mcp ──exec──► alice ──mTLS──► Bob ──► master key
(this repo) (AnB client) (AnB KMS daemon)anb-mcp runs as a dedicated, narrowly-scoped AnB identity (not your operator
CLI identity), so a compromised agent's blast radius is limited to what Bob authorizes
for that identity.
Related MCP server: ChatGPT Gateway MCP Nyan
Tools
Tool | Does | Returns |
| List secret keys this identity may reference | names + metadata, no values |
| Run an operator-allowlisted command with secrets injected into the child's env | exit code + redacted stdout/stderr |
| Health / authz self-check | Bob reachability, identity, authorized prefixes, rule count |
| Scrub text — secret values + high-entropy tokens → | redacted text |
| Render a placeholder template, write a 0600 file under the render dir | the path, never the content |
Never exposed: any reveal / get-plaintext / shell tool.
Prerequisites
This is a thin front-end; it depends on AnB. For v0.1 you need:
A working
alice+bob(AnB) on the host.A dedicated MCP identity enrolled with Bob, scoped to only the key prefixes the agent should use. Point the server at it via
ANB_MCP_ALICE_DIR(default~/.anb/alice-mcp). Do not reuse your operator identity.Exec allowlist with scope tags —
alice's exec rules carry a 4thscopecolumn; only rules taggedmcpapply to this surface (default-deny). Tag a rule for the agent by appendingmcp(e.g.^/opt/.../curl ...$\tOPENAI_KEY\t# call\tmcp). (Requires AnB withalice exec --surface,alice redact, andalice status --json— all shipped.)
Build
go mod tidy
go build -o anb-mcp .Register with Claude Code
claude mcp add -s user -e ANB_MCP_ALICE_DIR=$HOME/.anb/alice-mcp \
anb -- /path/to/anb-mcpOr in ~/.claude.json under mcpServers:
{
"mcpServers": {
"anb": {
"command": "/path/to/anb-mcp",
"env": { "ANB_MCP_ALICE_DIR": "/Users/you/.anb/alice-mcp" }
}
}
}Tools surface as mcp__anb__anb_list, mcp__anb__anb_exec, mcp__anb__anb_status.
Status
v0.1 — done, verified end-to-end (and by a real agent). All three tools work
against a live Bob: anb_status returns real KMS state; anb_exec runs allowlisted
commands and denies the rest; and a secret injected via --env <agent-vault:key> is
used by the child process while the caller receives only the redacted placeholder —
the plaintext never reaches the agent. Confirmed both by go-sdk-client invariant
tests (test/) and by an independent Claude Code session calling the tools over MCP.
See CHANGELOG.md.
Roadmap: see PLAN.md. (v0.2 adds anb_render_to_file + a dedicated
anb_redact tool; v0.3 lowers per-call latency and adds per-agent ephemeral,
short-TTL scoped credentials — while keeping alice as a separate process, so the
no-reveal guarantee stays structural, not a code-discipline promise.)
License
MIT
Available Tools
5 toolsanb_execA
Run an operator-allowlisted command with named secrets injected into the child process's environment. SIDE EFFECT: spawns a real subprocess — default-deny, only commands matching a scope=mcp allowlist rule run, everything else is refused. NOT idempotent (effects depend on the command). Requires an enrolled identity and a reachable, unlocked Bob to resolve agent-vault:key placeholders. Returns the exit code plus REDACTED stdout/stderr; the raw secret is never returned even if the child prints it. A denied or failed command returns a non-zero exit_code with the reason in stderr_redacted.
Inputs: command (required), env, args. Returns: exit_code, stderr_redacted, stdout_redacted
anb_listA
List the secret key names and metadata this identity may reference — never the values. Read-only and idempotent, no side effects. Requires an enrolled identity and a reachable, unlocked Bob KMS daemon; errors if Bob is unreachable/locked or the identity is unauthorized. Use this to discover which agent-vault:key names exist before referencing them in anb_exec or anb_render_to_file.
Returns: keys
anb_redactA
Scrub text: replace known secret values and high-entropy tokens with agent-vault:key placeholders. Read-only, idempotent, no side effects, and needs no Bob connection. Fail-safe by design — may over-redact, never under-redact. Use before logging or returning any text that might contain a secret.
Inputs: text (required). Returns: redacted
anb_render_to_fileA
Render a template containing agent-vault:key placeholders and write the resolved file (mode 0600) under the confined render dir. SIDE EFFECT: writes a file to disk (overwrites if the path exists). Requires an enrolled identity and a reachable, unlocked Bob to resolve placeholders. Returns the written path, NEVER the resolved content — the caller never sees the secret values. out_path is relative to the render dir; absolute paths and .. traversal are rejected.
Inputs: out_path (required), template (required). Returns: path, written
anb_statusA
Read-only self-check: reports enrollment, client-cert presence, Bob reachability and unlock state, identity, server name, and idle-TTL. No side effects, idempotent, returns NO secret values. Call this first to confirm the vault is ready before anb_list/anb_exec/anb_render_to_file; on failure the error field explains why (e.g. Bob unreachable or locked).
Returns: error, bob_addr, enrolled, identity, +5 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: executing commands with secret injection, listing secret keys, redacting secrets from text, rendering templates to disk, and checking server status. There is no overlap or ambiguity between them.
All tool names follow a consistent 'anb_<verb>' pattern, with verbs like exec, list, redact, render_to_file, and status. This makes the tool set predictable and easy to navigate.
With exactly 5 tools, the server is well-scoped for its purpose—providing secure vault-integrated operations without unnecessary complexity. The count feels appropriate for the domain.
The tools cover the full lifecycle needed for a secret-aware MCP server: status checking, secret listing, command execution, template rendering, and output redaction. While there is no tool for managing secrets themselves, that is intentional for a client-side tool, and the set is complete for its intended use.
Maintenance
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Hosted MCP runtime where your agent publishes its own tools by tool call and keeps working.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables users to define and run MCP tools using declarative YAML configs with built-in trust enforcement, credential brokering, and tamper-evident audit logging.14MIT
- AlicenseNot gradedqualityBmaintenanceEnables agent clients to safely connect to tools and execution resources through MCP with authorization, approvals, audit, chat-context isolation, SSH/Docker access, and long-running command session tracking.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to run declarative agents and DAG workflows as plain tools, with parallel nodes, review loops, and per-run least-privilege sandboxing.5 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides an MCP stdio interface for AI agents to propose tool calls that are validated against task policy, held for human approval when required, executed in a sandboxed Linux environment, and recorded in an audit log.MIT