Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

sanctuary

MCP server by eriknewton Verified · sanctuaryprotocol.ai

Sanctuary is an open-source MCP server that keeps an AI agent's keys and state encrypted locally and writes its actions to a hash-chained log. It adds operator approval gates and, on macOS, an operator-armed network wall.

  • Score 82
  • 10 stars
  • 183 a week
  • Apache-2.0
  • Updated

Install sanctuary

Built from the published package, never by AI.

claude mcp add sanctuary -- npx -y @sanctuary-framework/mcp-server

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install sanctuary in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the sanctuary block.

About

Sanctuary is an open-source MCP server that wraps an AI agent running on your machine. It keeps keys and state encrypted locally under your passphrase, applies operator policy and approval gates to what the agent does, and writes its actions to an append-only, hash-chained record you can read.

On macOS, an operator-armed wall can allow or deny outbound traffic per agent account, below the agent itself. Linux enforcement is proven only on Ubuntu 24.04 (x86-64) through a separate package, and Windows is roadmapped. It works with harnesses such as Claude Code, Cursor, Hermes, OpenClaw and Cline. It is aimed at people who want their agent's data to stay under their own control.

Written from the project's README and checked against it.

What you need

  • Node.js 22.0.0 or later
  • npm 10.0.0 or later
  • macOS for proven network enforcement, or Ubuntu 24.04 (x86-64) with the separate Castle Wall Linux package
  • macOS Keychain or Linux Secret Service for the passphrase

Try asking

  • Run my agent with Sanctuary so its keys stay encrypted on my machine.
  • Show me the hash-chained log of what my agent did today.
  • Ask for my approval before my agent takes any irreversible action.

Good to know

  • Windows is roadmapped; nothing is enforced on Windows today.
  • Linux enforcement is proven on Ubuntu 24.04 (x86-64) only and ships as a separate pre-release package, not in the npm package.
  • The fleet console and operator-cloud deployment are roadmapped, not available.
  • Wrapping is tested on representative harness paths and not proven for every harness version.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

What you can do with it

  • Keep agent network traffic to approved destinations
  • Encrypt agent keys and state on my own hardware
  • Review what an agent did in a hash-chained log

Alternatives to sanctuary

All alternatives →
Agentmesh MCP Proxy microsoft
94

Agentmesh MCP Proxy is a security proxy for MCP servers, described by its publisher as a firewall for the Model Context Protocol. It is aimed at teams that run AI agents which call tools and other agents.

AAA Local 6.6k
Bla qybaihe
94

Hardens client-side artifacts such as binaries, Electron apps, JS bundles, Python and WebAssembly against AI reverse-engineering agents. Built for developers who ship proprietary logic to user-controlled devices.

AAA Local 7.3k
Bla Agents qybaihe
94

Bla Agents is an MCP server and CLI that adds seeded, format-specific decoys to shipped binaries, JavaScript, WebAssembly and other artifacts. It is for developers who ship proprietary logic to user-controlled devices and want to make AI reverse-engineering slower.

AAA Local 11k/wk
MCP Auth zgeoff
94

A shared OAuth server for the MCP route of an app, built on better-auth, with passkey sign-in for the owner

AAC Local 44k/wk
Agentos MCP Server microsoft
94

Agent Governance Toolkit adds policy enforcement, identity, sandboxing and audit logging to autonomous AI agents. It is aimed at teams shipping agents to production. The source does not confirm the Claude Desktop MCP server named in the listing.

AAA Local 6.6k
Convex MCP Gateway tfohlmeister
93

Convex MCP Gateway is a Convex component that exposes selected Convex functions as MCP tools. It checks each call with your own authorize callback and writes an audit log. It is for developers who run Convex apps and want AI assistants to call parts of them.

AAC Local 37k/wk

Compare with Agentmesh MCP Proxy, Bla or Bla Agents

sanctuary: common questions

Does Sanctuary sandbox the agent's files and processes?

No Assurance Matrix row claims a filesystem or process sandbox for the agent. The source says that is what the harness's own sandbox provides.

Can the vendor read my Sanctuary data?

The source says no vendor, including the publisher, sits in the path or can decrypt your state.

Is the audit record fully verified?

The source describes the record as partial. The chain is live, but it is not an audited per-rule, per-flow trail.

How do I install sanctuary?

In Claude Code run claude mcp add sanctuary -- npx -y @sanctuary-framework/mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is sanctuary the official server?

sanctuary is published by sanctuaryprotocol.ai from its verified domain in the official MCP Registry.

Is sanctuary free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is sanctuary safe to use?

It scores 82 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to sanctuary?

Similar MCP servers: Agentmesh MCP Proxy, Bla, Bla Agents, MCP Auth.

Does sanctuary work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

sanctuary Install

Add to stack

Loading.