# Experimenting with a Docker-based MCP server for Julia

**URL:** <https://discourse.julialang.org/t/experimenting-with-a-docker-based-mcp-server-for-julia/136166>\
**Category:** Tooling\
**Tags:** docker, ai, mcp\
**Created:** [March 12, 2026, 3:38pm UTC](https://discourse.julialang.org/t/experimenting-with-a-docker-based-mcp-server-for-julia/136166 "2026-03-12T15:38:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mthelm85](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mthelm85/32/224164_2.png) [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Post date:** [March 12, 2026, 3:38pm UTC](https://discourse.julialang.org/t/experimenting-with-a-docker-based-mcp-server-for-julia/136166/1 "2026-03-12T15:38:37Z")

</div>

This is still very much an experiment, but it’s been working well for my workflows where I want the AI to have access to a full Julia environment without giving it access to my local network or filesystem, so I thought I’d share in case others are interested!

> **[GitHub - mthelm85/julia-mcp-server: An MCP (Model Context Protocol) server that gives...](https://github.com/mthelm85/julia-mcp-server)**
>
> An MCP (Model Context Protocol) server that gives LLM clients access to a hardened, stateful Julia execution environment running in Docker.

The server is written in TypeScript/Node.js and manages a pair of Docker containers to keep the host system safe ( ⚠ no guarantees!). High-level overview:

- **The Sandbox:** A persistent execution container that is completely network-isolated (`--network none`). This is where the Julia REPL lives.

- **The Installer:** An ephemeral sidecar container that _does_ have network access. It is used exclusively for `Pkg.add()` and shares a `julia-depot` volume with the sandbox so new packages are available immediately.

- **Stateful Sessions:** Variables and modules persist across tool calls within a session.

- **File Output:** Plots and data files saved to a specific scratch directory in the container are automatically mapped to a host folder for easy access by the user.

- **Precompiled Stack:** I’ve pre-baked a few of my favorite packages (e.g., `DataFrames`, `JuMP`, `CairoMakie`) into the image to minimize startup latency.

Let me know what you think!

---

<div class="post-metadata">

**Author:** ![technocrat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/technocrat/32/220947_2.png) [@technocrat](https://discourse.julialang.org/u/technocrat)\
**Post date:** [March 12, 2026, 4:59pm UTC](https://discourse.julialang.org/t/experimenting-with-a-docker-based-mcp-server-for-julia/136166/2 "2026-03-12T16:59:53Z")

</div>

I had a recent experience with flailing around with MCPs that resulted in a runaway process that burned out the SSD with cache flailing. It’s an irreproducible result, so i can’t pinpoint the exact culprit, but at one point Claude was trying to access it and occupying 32GB of RAM and another 70GB of swapfile. YMMV

---

<div class="post-metadata">

**Author:** ![mthelm85](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mthelm85/32/224164_2.png) [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Post date:** [May 5, 2026, 2:37pm UTC](https://discourse.julialang.org/t/experimenting-with-a-docker-based-mcp-server-for-julia/136166/3 "2026-05-05T14:37:54Z")

</div>

😲 I have resource limits baked in to this, the docker container only gets 4GB of RAM and 2 CPUs by default. I’m quite happy with the setup so far and haven’t really had many problems with it. It’s particularly great for one-off analyses where I just want to explore some data and generate some outputs, or when I just want to quickly test an idea…
