sanctuary — Claude Code MCP server: what it does, how to install
Guards agent keys with local encryption, records tool calls in a hash-chained log, and blocks unauthorized outbound network traffic.
claude mcp add sanctuary -- npx -y @sanctuary-framework/mcp-serverWhat sanctuary does
Sanctuary controls outbound traffic at the operating system layer rather than relying on the model to govern itself. It secures local secrets using Argon2id key derivation along with Ed25519 identity keys. Passphrases stay inside the native macOS Keychain or Linux Secret Service daemon. Incoming tool executions must pass signed policy checkpoints organized into three operator approval tiers.
Runtime requirements start at Node.js 22.0.0 and npm 10.0.0. The package does not provide a process or filesystem sandbox, leaving that layer to the harness runner. Network enforcement does not work on Windows yet, while Linux support is verified exclusively on x86-64 Ubuntu 24.04 via the external Castle Wall package.
What it helps with
- Block unauthorized outbound agent traffic beneath the runtime
- Store identity credentials locally using Argon2id encryption
- Record agent tool executions in an append-only audit chain
- Require manual operator sign-off on sensitive operations
Example prompts for the agent
- Verify the integrity of the audit log chain through sanctuary.
- Ask the operator for approval before triggering tier-three actions.
- Export the local encrypted state and identity archive.
How to install sanctuary
Platform CLI
claude mcp add sanctuary -- npx -y @sanctuary-framework/mcp-serverPlatform CLI
codex mcp add sanctuary -- npx -y @sanctuary-framework/mcp-serverConfig file
{
"mcpServers": {
"sanctuary": {
"command": "npx",
"args": [
"-y",
"@sanctuary-framework/mcp-server"
]
}
}
}Config file
{
"servers": {
"sanctuary": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@sanctuary-framework/mcp-server"
]
}
}
}Platform CLI
gemini mcp add sanctuary npx -y @sanctuary-framework/mcp-serverStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about sanctuary
How to install sanctuary in Claude Code?
Run claude mcp add sanctuary -- npx -y @sanctuary-framework/mcp-server in your terminal. You must have Node.js 22.0.0 or higher and npm 10.0.0 or higher installed.
What does sanctuary do?
It applies OS-level network policies to the agent, requires approval gates on sensitive tool calls, and protects credentials with local encryption.
Which operating systems support traffic filtering in sanctuary?
Traffic control is functional on macOS and verified on Ubuntu 24.04 (x86-64) via Castle Wall Linux. Windows enforcement is roadmapped and not supported today.