MCP in a Can— running MCP servers with restricted permissions
What is MCP in a Can? (Overview & Key Benefits)
Sandboxed Execution for Local Model Context Protocol Servers
MCP in a Can (powered by the Cantainer runtime) is an open-source security toolchain engineered to sandbox Model Context Protocol (MCP) servers on local machines. As LLM client ecosystems expand, developers increasingly execute third-party MCP servers via package managers like npx or uvx. However, standard execution grants these servers full access to the host user's filesystem, environment variables, network sockets, and credentials. Cantainer addresses this critical supply chain vulnerability by providing lightweight, unprivileged sandboxing without the resource overhead of virtual machines or heavy container engines like Docker.
Architecture and Kernel-Level Isolation
Written in Rust for performance and low overhead, Cantainer bundles an MCP server, its language runtime, dependencies, and a strict permission manifest into a standard OCI (Open Container Initiative) artifact designated as a "can." Instead of relying on root-level container daemons, Cantainer enforces boundary security directly via modern Linux kernel security primitives:
- Landlock LSM: Enforces fine-grained filesystem sandboxing at runtime, preventing arbitrary read, write, or traversal operations outside explicitly permitted directories.
- seccomp Filters: Restricts system calls, prohibiting untrusted extensions from spawning arbitrary processes, capturing host primitives, or escalating local privileges.
- Reproducible Packaging: Ensures consistent runtime configurations across heterogeneous Linux distributions while guaranteeing consistent build outputs.
Ideal Use-Cases for Developers
Cantainer provides immediate utility across common AI-assisted engineering workflows:
- Third-Party Extension Isolation: Execute untrusted MCP tooling (such as GitHub, Terraform, Context7, and Kubernetes integrations) without exposing host SSH keys, AWS credentials, or personal configuration dotfiles.
- Zero-Daemon Tool Environments: Run isolated CLI tools and MCP integrations natively on local workstations without running background Docker daemons or hypervisors.
- Declarative Manifest Auditing: Define transparent access permissions directly in version-controlled manifests, allowing engineering teams to audit what system resources an MCP tool can actually touch.
Value Proposition and Security Trade-Offs
Cantainer resolves the fundamental trade-off between AI tooling extensibility and endpoint security. By providing hermetic, kernel-enforced sandboxes, it eliminates the threat of malicious dependencies and prompt-injection-driven file access. While designed primarily for MCP infrastructure today, the underlying architecture establishes an unprivileged, reproducible userland runtime for broader Linux CLI execution.
Technical Architecture & Open-Source Signals
Verified TelemetryDeploy or Self-Host MCP in a Can in the Cloud
Deploy MCP in a Can in 1 Click ($20 Free Credit)
Get $20 in cloud credits upon signup. Connect the GitHub repository or Dockerfile and deploy your MCP server, API worker, or database in seconds.
Serverless GPU & AI Compute for Your MCP in a Can Stack
Run open-source LLMs, AI coding agents, and custom Docker containers on demand with a $5–$500 credit bonus upon signup.
Core Capabilities & Highlights
- Kernel-Level Sandboxing via Landlock: Limits directory traversal and restricts file system read/write capabilities using native Linux security modules.
- System Call Filtering with seccomp: Drops dangerous syscalls and blocks privilege escalation vectors without requiring root permissions.
- OCI Artifact Distribution: Packages MCP servers, dependencies, and permission manifests into standardized, portable container artifacts.
- Lightweight Daemonless Execution: Runs hermetically isolated tools natively without spinning up Docker daemons, Podman services, or full virtual machines.
- Reproducible Linux Builds: Guarantees deterministic runtime environments across multiple distributions for popular toolsets like GitHub, Terraform, and Kubernetes.
Pricing & Plans
MCP in a Can is completely free to use with no hidden fees or paywalls.
GEO & AI-Search Readiness Index
Live citation & entity telemetry for ChatGPT Search, Perplexity, Claude MCP & Google Gemini
Verified Founder Backlink & Launch Status
Status: Standard CatalogStandard Unverified Listing
MCP in a Can is currently cataloged with standard index attributes. The maker can claim this listing to unlock permanent direct website links and verified launch status.
Similar Tools & Best Alternatives to MCP in a Can
Sgpt
SGPT is a command-line tool that provides a convenient way to interact with OpenAI models, enabling users to run queries, generate shell com
LazygitGo
A native Git GUI powered by Lazygit (pure Go)
Fast Anything
Don't rewrite it in Rust. Rewrite the 5% that's slow: profile your app, port the hot functions with your coding agent, prove they behave the
Renovate-preview
dry-run Renovate locally, see updates as a table
Aliens Eye
AI powered OSINT engine to discover and map 7,700+ social media identities across the web
Gemini Cli
An open-source AI agent that brings the power of Gemini directly into your terminal.
Frequently Asked Questions about MCP in a Can
How does Cantainer differ from standard Docker containers?
Unlike Docker, which typically relies on a root-level daemon, bridge networks, and complex namespace virtualization, Cantainer is an unprivileged, lightweight runner written in Rust. It utilizes native Linux kernel primitives like Landlock and seccomp to restrict filesystem access and system calls directly from user space without hypervisors or container engine overhead.
Why is running MCP servers with tools like npx or uvx dangerous?
Running third-party MCP servers directly via npx or uvx executes arbitrary scripts with the exact same system permissions as your local user account. If an MCP server is compromised or manipulated via indirect prompt injection, it could read private SSH keys, copy environment variables, exfiltrate local data, or execute arbitrary binaries on your system.
Can I build custom cans for proprietary or internal MCP servers?
Yes. Cantainer supports local builds, enabling developers to package their own MCP tools, language runtimes, and dependencies into OCI-compliant artifacts along with customized, declarative permission manifests.
What operating systems are supported by Cantainer?
Cantainer relies heavily on modern Linux kernel features, specifically Landlock and seccomp. As a result, it natively targets Linux environments. Running Cantainer on macOS or Windows requires a lightweight Linux guest environment such as WSL2 or a minimal VM.