<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arie Radle</title>
    <description>The latest articles on DEV Community by Arie Radle (@arie_radle).</description>
    <link>https://dev.to/arie_radle</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3829509%2F921d8c11-3c13-43b0-bd61-4e3d99285ac6.png</url>
      <title>DEV Community: Arie Radle</title>
      <link>https://dev.to/arie_radle</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arie_radle"/>
    <language>en</language>
    <item>
      <title>MCP in a Can 🥫 - Sandboxed, Reproducible MCP Servers Without Docker</title>
      <dc:creator>Arie Radle</dc:creator>
      <pubDate>Wed, 02 Dec 2026 07:32:55 +0000</pubDate>
      <link>https://dev.to/arie_radle/mcp-in-a-can-sandboxed-reproducible-mcp-servers-without-docker-4nji</link>
      <guid>https://dev.to/arie_radle/mcp-in-a-can-sandboxed-reproducible-mcp-servers-without-docker-4nji</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9xrs2g3y9owgrl7cnzyq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9xrs2g3y9owgrl7cnzyq.png" alt="Cantainer banner" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What happens when you add a new MCP server to your AI agent using &lt;code&gt;npx&lt;/code&gt; or &lt;code&gt;uvx&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;In a conventional, unsandboxed environment, you're downloading third-party code and executing it with your own privileges.&lt;/p&gt;

&lt;p&gt;Your SSH keys. Your cloud credentials. Your source code. Your network.&lt;/p&gt;

&lt;p&gt;Does an MCP memory server really need access to all of that?&lt;/p&gt;

&lt;p&gt;I've been building &lt;strong&gt;Cantainer&lt;/strong&gt;, an open-source project written in Rust that explores a different approach to distributing and executing software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing MCP in a can
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;can&lt;/strong&gt; is a distributable OCI artifact containing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An executable and its runtime.&lt;/li&gt;
&lt;li&gt;Cryptographically pinned dependencies and system libraries.&lt;/li&gt;
&lt;li&gt;A Software Bill of Materials (SBOM).&lt;/li&gt;
&lt;li&gt;A machine-readable, kernel-enforced permission manifest.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it as software packaged together with its security contract.&lt;/p&gt;

&lt;p&gt;Cantainer uses Linux Landlock and seccomp to enforce permissions, with approximately a millisecond of additional startup overhead in initial benchmarks.&lt;/p&gt;

&lt;p&gt;No Docker engine. No root privileges. No background daemon.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does it look like?
&lt;/h2&gt;

&lt;p&gt;Instead of launching an MCP memory server using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx -y @modelcontextprotocol/server-memory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The OCI registry workflow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cant pull ghcr.io/cantainer/server-memory:2.2.1
cant inspect ghcr.io/cantainer/server-memory:2.2.1
cant run ghcr.io/cantainer/server-memory:2.2.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the corresponding Claude Code configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"memory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"cant"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s2"&gt;"run"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"ghcr.io/cantainer/server-memory:2.2.1"&lt;/span&gt;
      &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same MCP server. Same protocol. A fundamentally different security model.&lt;/p&gt;

&lt;p&gt;The server can access its dedicated data directory, but its policy denies access to unrelated personal files and the network.&lt;/p&gt;

&lt;p&gt;These restrictions are enforced by the Linux kernel, rather than an AI prompt or the server's own implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building an MCP server from a Canfile
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;Canfile&lt;/strong&gt; is a declarative recipe that describes where the software comes from, how it is packaged and what it is allowed to do.&lt;/p&gt;

&lt;p&gt;Here is the essential part of the memory server's recipe:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="na"&gt;canfile_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"server-memory"&lt;/span&gt;
&lt;span class="na"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"2.2.1"&lt;/span&gt;

&lt;span class="k"&gt;[build]&lt;/span&gt;
&lt;span class="na"&gt;runtime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"node@24.22.3"&lt;/span&gt;
&lt;span class="na"&gt;npm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"@modelcontextprotocol/server-memory@2.2.1"&lt;/span&gt;
&lt;span class="na"&gt;run&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"dist/index.js"&lt;/span&gt;

&lt;span class="k"&gt;[capabilities]&lt;/span&gt;
&lt;span class="na"&gt;network&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="na"&gt;fs.ensure_dirs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"~/.local/share/mcp-memory"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;[env]&lt;/span&gt;
&lt;span class="na"&gt;set&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="no"&gt;MEMORY_FILE_PATH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"~/.local/share/mcp-memory/memory.jsonl"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;[test]&lt;/span&gt;
&lt;span class="na"&gt;mcp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The generated lock section pins the runtime, dependencies, system libraries and build tools by cryptographic hash.&lt;/p&gt;

&lt;p&gt;Unlike a traditional Dockerfile, there is no arbitrary sequence of build commands. Runtime-specific presets construct the artifact from pinned inputs.&lt;/p&gt;

&lt;p&gt;The goal is reproducibility across Linux distributions. The same memory server recipe has already produced byte-identical files when built on Ubuntu and Fedora.&lt;/p&gt;

&lt;h2&gt;
  
  
  A growing ecosystem of MCP servers
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/cantainer/cans" rel="noopener noreferrer"&gt;cantainer/cans&lt;/a&gt; repository already contains recipes for 16 MCP servers and integrations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Core tools:&lt;/strong&gt; Memory, Filesystem, Sequential Thinking, Fetch and Time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developer tools:&lt;/strong&gt; GitHub and Context7.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure:&lt;/strong&gt; Kubernetes, Terraform and Grafana.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data and productivity:&lt;/strong&gt; Supabase and Notion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search and web:&lt;/strong&gt; Brave Search, Exa and Firecrawl.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remote integration:&lt;/strong&gt; MCP Remote.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The catalog supports Node.js, Python and native binaries, with automated multi-architecture builds and MCP functional tests.&lt;/p&gt;

&lt;p&gt;Each server declares its own permissions.&lt;/p&gt;

&lt;p&gt;A sequential-thinking server doesn't need the network or access to user files. A filesystem server needs only the directories explicitly granted to it. A GitHub server needs network access and an API token, not access to your home directory.&lt;/p&gt;

&lt;p&gt;The permission model should reflect those differences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;Cantainer runs on Linux with kernel 6.2 or newer, including suitable WSL and Linux VM environments.&lt;/p&gt;

&lt;p&gt;You can install it using Cargo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo install cantainer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check whether your kernel supports the required isolation features:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cant check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then build an MCP memory server locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/cantainer/cans
&lt;span class="nb"&gt;cd&lt;/span&gt; cans

cant build recipes/server-memory/Canfile
cant inspect ./server-memory.can
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Register it with Claude Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add memory -- cant run &lt;span class="s2"&gt;"$PWD/server-memory.can"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The official OCI registry packages are currently private pending artifact signing and licensing compliance. Local builds from the published recipes are already supported.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's still missing?
&lt;/h2&gt;

&lt;p&gt;Cantainer is experimental and has not been independently security-audited.&lt;/p&gt;

&lt;p&gt;Some particularly interesting engineering challenges remain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sigstore-based artifact signing and verification.&lt;/li&gt;
&lt;li&gt;Automated permission approval and permission-aware updates.&lt;/li&gt;
&lt;li&gt;Granular network destination restrictions. Currently, network-enabled cans do not have host-level allowlist enforcement.&lt;/li&gt;
&lt;li&gt;Stronger content-addressed store integrity.&lt;/li&gt;
&lt;li&gt;Expanding the catalog of MCP servers.&lt;/li&gt;
&lt;li&gt;Independent security research and adversarial testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I want to explore whether AI agents could eventually discover, evaluate and install tools autonomously, provided their requested capabilities remain within an approved security policy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installing software should not automatically mean granting it authority.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Looking for collaborators
&lt;/h2&gt;

&lt;p&gt;I'd love to collaborate with developers interested in MCP, Rust, Linux internals, security engineering and reproducible software distribution.&lt;/p&gt;

&lt;p&gt;Contributing doesn't necessarily require Rust knowledge. Adding an MCP server can be as simple as creating a Canfile, generating its dependency lock and testing the resulting artifact.&lt;/p&gt;

&lt;p&gt;Both repositories are open source under MIT or Apache 2.0.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Runtime and architecture:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/cantainer/cantainer" rel="noopener noreferrer"&gt;https://github.com/cantainer/cantainer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP server recipes:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/cantainer/cans" rel="noopener noreferrer"&gt;https://github.com/cantainer/cans&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The broader architectural vision:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://medium.com/@arie.radle/we-gave-ai-agents-a-shell-now-what-00399a2e1d96" rel="noopener noreferrer"&gt;We Gave AI Agents a Shell. Now What?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which MCP servers would you like to see packaged next? What security guarantees would you need before trusting an ecosystem like this?&lt;/p&gt;

&lt;p&gt;Feedback, architectural discussions and pull requests are welcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;By default, you can't.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>security</category>
      <category>ai</category>
      <category>rust</category>
    </item>
    <item>
      <title>How a runaway AI agent cost me $47 while I slept (and how I fixed it)</title>
      <dc:creator>Arie Radle</dc:creator>
      <pubDate>Tue, 17 Mar 2026 13:50:00 +0000</pubDate>
      <link>https://dev.to/arie_radle/how-a-runaway-ai-agent-cost-me-47-while-i-slept-and-how-i-fixed-it-2cl6</link>
      <guid>https://dev.to/arie_radle/how-a-runaway-ai-agent-cost-me-47-while-i-slept-and-how-i-fixed-it-2cl6</guid>
      <description>&lt;p&gt;Have you ever woken up to a massive API bill because your AI agent got stuck in a loop? I have.&lt;/p&gt;

&lt;p&gt;Recently, I spent &lt;strong&gt;$47&lt;/strong&gt; debugging a LangGraph retry loop. The agent kept failing, LangGraph kept retrying, and OpenAI kept charging me—all while I was fast asleep. &lt;/p&gt;

&lt;p&gt;I realized we need better guardrails for AI agents. So, I built &lt;a href="https://arieradle.github.io/shekel/latest/" rel="noopener noreferrer"&gt;Shekel&lt;/a&gt; so you don't have to learn that expensive lesson yourself.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Shekel? 🪙
&lt;/h3&gt;

&lt;p&gt;Shekel is a zero-config, open-source Python library for LLM budget enforcement and cost tracking. It works with LangGraph, CrewAI, AutoGen, or any framework that calls OpenAI, Anthropic, or LiteLLM.&lt;/p&gt;

&lt;p&gt;The best part? It takes exactly &lt;strong&gt;one line of code&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How it works
&lt;/h3&gt;

&lt;p&gt;You wrap your agent execution in a budget context manager. If your agent hits the max USD spend, it stops the execution by raising a &lt;code&gt;BudgetExceededError&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;shekel&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;budget&lt;/span&gt;

&lt;span class="c1"&gt;# Enforce a hard cap of $1.00
&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;budget&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_usd&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;1.00&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nf"&gt;run_my_agent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;# raises BudgetExceededError if spend exceeds $1.00
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't want to change your code? You can enforce it right from the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;shekel run agent.py &lt;span class="nt"&gt;--budget&lt;/span&gt; 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Cool Features 🚀
&lt;/h3&gt;

&lt;p&gt;Beyond basic hard caps, I built Shekel to handle real-world agentic workflows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Smart Fallback:&lt;/strong&gt; Automatically switch to cheaper models (like &lt;code&gt;gpt-4o-mini&lt;/code&gt;) instead of crashing when you hit 80% of your budget.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nested Budgets:&lt;/strong&gt; Track multi-stage workflows hierarchically (e.g., $2 for research, $5 for analysis).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool Budgets:&lt;/strong&gt; Cap the number of tool calls before they bankrupt you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenTelemetry &amp;amp; Langfuse:&lt;/strong&gt; Export cost, utilization, and spend rates directly to your observability backend.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Try it out!
&lt;/h3&gt;

&lt;p&gt;You can install it via pip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;shekel
&lt;span class="c"&gt;# or [anthropic], [litellm], [all]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check out the &lt;a href="https://github.com/arieradle/shekel" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; (I'd love a star if you find it useful!) or read the full &lt;a href="https://arieradle.github.io/shekel/latest/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I'd love to hear your thoughts:&lt;/strong&gt; What's your worst "accidental cloud bill" story? Let me know in the comments! 👇&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>llm</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
