Back to search
mcp-warden
MCP serverGitHub
Sandboxed Rust control plane and policy proxy for MCP servers
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Checked today
Badge for your README
Markdown
[](/listings/danieldd28--mcp-warden)HTML
<a href="/listings/danieldd28--mcp-warden"><img src="/api/listings/danieldd28--mcp-warden/badge.svg" alt="findsafeskills safety rating" /></a>Install
i
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 118 lines
- # mcp-warden
- Open-source, self-hosted Rust control plane and sandboxed proxy for
- [MCP](https://modelcontextprotocol.io) (Model Context Protocol) servers.
- Warden sits between an MCP client and an MCP server, runs the server inside an
- isolation boundary, and enforces policy on every JSON-RPC 2.0 message that
- crosses it.
- > Status: pre-alpha. This repository currently contains the architecture spec
- > only. Nothing below is implemented yet.
- ## Architecture
- Isolation is tiered by trust level.
- ### Tier 1: local stdio servers
- The server process is spawned with:
- - Linux namespaces (user, pid, mount, net, ipc, uts)
- - Landlock filesystem rules
- - seccomp-bpf syscall filtering
- - cgroups v2 resource limits
- - `PR_SET_PDEATHSIG` so the child dies with the proxy
- All child-side setup runs inside `CommandExt::pre_exec`, so it is restricted to
- async-signal-safe operations: no allocation, no locks, raw syscalls only. Rules
- are compiled in the parent and applied in the child.
- ### Network and secret isolation
- The child runs in an isolated network namespace with no direct egress. All
- outbound traffic goes through the proxy, which:
- - enforces per-server domain allowlists
- - injects ephemeral secrets at the boundary, so the server process never holds
- long-lived credentials
- ### Hot-path guardrails
- WASM filters run on Wasmtime and can inspect or mutate JSON-RPC 2.0 payloads in
- both directions. Target overhead is sub-millisecond per message.
- ### Tier 2: untrusted and multi-tenant servers
- Stronger isolation (Firecracker microVM or rootless OCI) is provided through an
- object-safe trait, selected at runtime as `Arc<dyn SandboxRunner>`:
- ```rust
- #[async_trait]
- pub trait SandboxRunner: Send + Sync {
- async fn spawn(&self, spec: &SandboxSpec) -> Result<SandboxedChild>;
- }
- ```
- ## Planned workspace layout
- | Crate | Responsibility |
- |-------|----------------|
- | `warden-core` | JSON-RPC framing via `tokio_util::codec`, TOML policy middleware, `tracing` audit logs |
- | `warden-sandbox` | `SandboxRunner` trait, `NoopRunner`, `LinuxRunner` |
- | `warden-cli` | `warden run --config warden.toml -- <cmd>` |
- ## Example config
- ```toml
- [server]
- name = "filesystem"
- [policy.tools]
- allow = ["read_file", "list_directory"]
- deny = ["write_file"]
- [sandbox]
- runner = "linux"
- [[sandbox.mounts]]
- host = "/usr"
- guest = "/usr"
- mode = "ro"
- [[sandbox.mounts]]
- host = "/home/me/projects/app"
- guest = "/workspace"
- mode = "rw"
- [network]
- allow_domains = ["api.github.com"]
- [secrets]
- GITHUB_TOKEN = { env = "WARDEN_GITHUB_TOKEN", ttl = "10m" }
- ```
- Usage:
- ```sh
- warden run --config warden.toml -- npx @modelcontextprotocol/server-filesystem /workspace
- ```
- The config schema is a draft and will change.
- ## Roadmap
- **Milestone 1**
- - stdio proxy with JSON-RPC framing
- - `SandboxRunner` trait with `NoopRunner` and `LinuxRunner`
- - Landlock and `PR_SET_PDEATHSIG` on Linux
- - integration tests
- **Milestone 2**
- - Wasmtime filter pipeline
- - Streamable HTTP and SSE transports
- - secret injection
- ## License
- MIT. See [LICENSE](LICENSE).
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.