# \[ANN\] julia-mcp — persistent Julia sessions for AI assistants

**URL:** <https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386>\
**Category:** Package Announcements\
**Tags:** ai\
**Created:** [February 1, 2026, 3:20pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386 "2026-02-01T15:20:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [February 1, 2026, 3:20pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/1 "2026-02-01T15:20:48Z")

</div>

If you use AI coding assistants (Claude Code, Claude Desktop, VS Code Copilot), you’ve probably noticed they pay Julia’s startup and compilation costs on every single code execution and test run. That adds up fast during iterative development.

[julia-mcp](https://github.com/aplavin/julia-mcp) is an MCP server that keeps Julia sessions alive across calls. Variables, functions, and loaded packages persist between executions, and the assistant can iterate on code without waiting for recompilation each time.  
Works for tests as well!

Key design choices:

- **Fully automatic** — sessions start on demand, recover from crashes, and clean up on shutdown. The only setup is a one-time MCP registration.

- **Isolated per project** and **per AI session** — each project directory gets its own Julia process. No cross-contamination between environments and sessions.

- **Pure stdio** — no TCP ports or sockets to manage.

- **Revise.jl** is loaded automatically if available, so code changes are picked up without restarting.

There are other projects in this space — [MCPRepl.jl](https://discourse.julialang.org/t/ann-mcprepl-jl-share-your-repl-with-your-ai-agent/130536), REPLicant.jl, DaemonConductor.jl — each with a different take.  
`julia-mcp`’s angle is zero manual management: you register it once and forget about it.

Setup for Claude Code:

```bash
cd /any_directory
git clone https://github.com/aplavin/julia-mcp.git
claude mcp add --scope user julia -- uv run --directory /any_directory/julia-mcp python server.py

```

The server is written in Python (the MCP protocol ecosystem is most mature there), the only dependencies are `uv` and Julia itself.

Repo: [GitHub - aplavin/julia-mcp: MCP server for persistent Julia sessions — fast iteration without startup/compilation overhead](https://github.com/aplavin/julia-mcp).

Feedback and suggestions welcome!

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [February 1, 2026, 3:53pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/2 "2026-02-01T15:53:11Z")

</div>

> replace `/path/to/julia-mcp` with the actual path where you cloned the repo.

Sorry, can you clarify what does this means? What repo? A simple true case example would be better than this description.

You mean, where this landed?

```julia-auto
git clone https://github.com/aplavin/julia-mcp.git

```

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [February 1, 2026, 4:13pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/3 "2026-02-01T16:13:49Z")

</div>

Tweaked the example in the post and in the README! Is it more clear now?

> [@joa-quim](#):
>
> You mean, where this landed?

Yes.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [February 1, 2026, 4:21pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/4 "2026-02-01T16:21:56Z")

</div>

Yes, I guess it was the mention to Python that got me confused to what the server meant.

---

<div class="post-metadata">

**Author:** ![Satvik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/satvik/32/20486_2.png) [@Satvik](https://discourse.julialang.org/u/Satvik)\
**Post date:** [February 1, 2026, 4:24pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/5 "2026-02-01T16:24:33Z")

</div>

I love seeing all the experimentation here. I tried a similar path (using a Jupyter kernel for a persistent Julia session with MCP) but ultimately I wanted a REPL that I could seamlessly interact with manually or with Claude. It turns out that Claude is quite good at reading from/writing to tmux sessions, so I basically just ended up with a skill and a few scripts to have it launch a `juliarepl_project` tmux session.

This is definitely more of a DYI approach, but I’d recommend it to people who enjoy heavily customizing their workflows.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [February 1, 2026, 4:25pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/6 "2026-02-01T16:25:48Z")

</div>

I think the terminology surrounding MCP is a bit weird to be honest 🙂 Especially the “server” name can sound confusing in the common case when the LLM starts a new “server” for each session anyway, they are not shared and just communicate through stdio.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [February 1, 2026, 4:27pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/7 "2026-02-01T16:27:58Z")

</div>

Yes, the focus here is definitely not towards a “shared” repl between LLM and person.  
`julia-mcp` is intended to be a better (more efficient) way for LLM to run Julia code and tests, with the design goal to be fully automatic without any management.  
Nothing more, nothing less (:

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [February 1, 2026, 9:46pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/8 "2026-02-01T21:46:16Z")

</div>

Awesome! I tried to build something like that (for the same purpose) using DaemonMode.jl very recently, but didn’t manage to make it work.

---

<div class="post-metadata">

**Author:** ![nhz2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhz2/32/44428_2.png) [@nhz2](https://discourse.julialang.org/u/nhz2)\
**Post date:** [February 2, 2026, 8:19pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/9 "2026-02-02T20:19:25Z")

</div>

I want to distribute a modified version of the code. I don’t see a license so I wanted to check if you are okay with that.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [February 2, 2026, 8:43pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/10 "2026-02-02T20:43:16Z")

</div>

Sure! Added MIT license.  
Also, curious to see your modifications, anything in particular you found lacking? 🙂

---

<div class="post-metadata">

**Author:** ![KristianHolme](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristianholme/32/216911_2.png) [@KristianHolme](https://discourse.julialang.org/u/KristianHolme)\
**Post date:** [February 3, 2026, 8:00pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/11 "2026-02-03T20:00:57Z")

</div>

Nice, will try it out!  
For Cursor users encountering errors: the shell that launches the MCP server doesn’t have access to `uv` in PATH. I needed to change the command from `"uv"` to the full path `"path/to/your/uv"` (found with `which uv` in a normal terminal).

---

<div class="post-metadata">

**Author:** ![nhz2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhz2/32/44428_2.png) [@nhz2](https://discourse.julialang.org/u/nhz2)\
**Post date:** [February 3, 2026, 9:04pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/12 "2026-02-03T21:04:05Z")

</div>

Currently I’ve modified it to remove the use of TestEnv and setting the “–startup-file=no”, and “–threads=auto” flags on startup, but those might be specific for how I am using julia right now.

---

<div class="post-metadata">

**Author:** ![nhz2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhz2/32/44428_2.png) [@nhz2](https://discourse.julialang.org/u/nhz2)\
**Post date:** [February 3, 2026, 10:57pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/13 "2026-02-03T22:57:24Z")

</div>

Today when trying claude code with using this mcp, the tui complete froze up and started leaking gigabytes of memory. This happened after claude ran some julia code that seg faulted. Not sure if this is a bug in claude code or in the mcp.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [February 3, 2026, 11:56pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/14 "2026-02-03T23:56:02Z")

</div>

> [@KristianHolme](#):
>
> For Cursor users encountering errors \<…\>

I’m not familiar with that, but happy to improve installation instructions! How is this typically handled in Cursor for other MCPs written in Python?

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [February 3, 2026, 11:58pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/15 "2026-02-03T23:58:23Z")

</div>

> [@nhz2](#):
>
> I’ve modified it to remove the use of TestEnv and setting the “–startup-file=no”, and “–threads=auto” flags on startup

Hmmm, interesting… I indeed assumed “everyone” would want to run Julia with these flags 🙂 Can add an option, of course.

---

<div class="post-metadata">

**Author:** ![KristianHolme](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristianholme/32/216911_2.png) [@KristianHolme](https://discourse.julialang.org/u/KristianHolme)\
**Post date:** [February 4, 2026, 9:51am UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/16 "2026-02-04T09:51:39Z")

</div>

I am not sure if there is any standard way specifically for Cursor. I also think this may not be a Cursor-specific issue, but that it depends on how uv is installed. For me, `which uv` is `~/.local/bin`, and i add that to `PATH` in my `.bashrc`, so `~/.local/bin` is not included in the system-wide path. So i would imagine this could be a hiccup for any agentic tool, not just Cursor. My config (`.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "server1": {
	...
    },
    "server2": {
      	...
    },
    "julia": {
      "command": "/home/username/.local/bin/uv",
      "args": [
        "run",
        "--directory",
        "/home/username/servers/julia-mcp",
        "python",
        "server.py"
      ]
    }
  }
}

```

Edit: using absolute paths in config, to avoid `ENOENT` error using Cursor CLI.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [February 7, 2026, 3:00pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/17 "2026-02-07T15:00:42Z")

</div>

> [@aplavin](#):
>
> > [@nhz2](#):
> >
> > setting the “–startup-file=no”, and “–threads=auto” flags on startup
> 
> Hmmm, interesting… I indeed assumed “everyone” would want to run Julia with these flags 🙂 Can add an option, of course.

See the updated version: now, can override the default CLI arguments, pass any arguments to the Julia process.

---

<div class="post-metadata">

**Author:** ![Asmund\_Hjulstad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asmund_hjulstad/32/31820_2.png) [@Asmund\_Hjulstad](https://discourse.julialang.org/u/Asmund_Hjulstad)\
**Post date:** [February 9, 2026, 9:09pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/18 "2026-02-09T21:09:06Z")

</div>

Thanks. I used this with devcontainer (with devpod) and claude code to create a Julia library for working with RDF, SPARQL and SHACL. I cannot (yet) vouch for the LinkedData.jl library I vibed, but it sure was fun to create. Julia-mcp made it quicker to build. And, the devcontainer setup worked well. [ahjulstad/LinkedData.jl: Vibe-coded RDF tools for Julia](https://github.com/ahjulstad/LinkedData.jl)

---

<div class="post-metadata">

**Author:** ![nhz2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhz2/32/44428_2.png) [@nhz2](https://discourse.julialang.org/u/nhz2)\
**Post date:** [February 10, 2026, 9:36pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/19 "2026-02-10T21:36:39Z")

</div>

I am having issues with the AI writing Julia code to edit or remove files in the .julia folder, because it somehow thinks that it needs to fix something broken in julia itself. What kind of sandboxing do people use to prevent this?

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [February 10, 2026, 9:49pm UTC](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386/20 "2026-02-10T21:49:48Z")

</div>

Honestly I never saw anything like that!

[Next page](https://discourse.julialang.org/t/ann-julia-mcp-persistent-julia-sessions-for-ai-assistants/135386.md?page=2)
