jimsynz

jimsynz

Ash Core Team

Erl_dist_mcp - An MCP server for distribution

erl_dist_mcp — Give your AI assistant direct access to your running BEAM nodes

Hey all,

I’ve just released erl_dist_mcp, an MCP server that connects AI assistants directly to your Erlang/BEAM nodes via the distribution protocol. It gives tools like Claude, Cursor, and other MCP-compatible editors the ability to introspect, debug, and trace your running systems.

What it does

It exposes 30+ tools over the Model Context Protocol, including:

  • Process inspection — list, search, and inspect processes, top-N by memory/reductions/message queue
  • OTP introspection — supervision trees, GenServer state and status, application info
  • System monitoring — memory breakdown, scheduler utilisation, ETS tables
  • Function tracing — safe tracing via recon (with dbg fallback), with structured output
  • Log capture — auto-installs an OTP logger handler to capture and retrieve recent log events
  • Code evaluation — sandboxed eval_code and rpc_call (opt-in with --allow-eval)

Output is formatted in your language of choice: Elixir, Erlang, Gleam, or LFE.

Why?

I wanted to be able to say things like “connect to my local node and show me which processes are using the most memory” or “trace calls to MyApp.Repo.query/2 and show me what’s happening” — and have the AI actually do it, rather than telling me how to do it myself.

Getting started

cargo install erl_dist_mcp

Or grab a binary from the releases page (Linux, macOS, Windows).

Add it to your Claude Desktop config (or Cursor, Continue.dev, Cline, Claude Code — any MCP client):

{
  "mcpServers": {
    "erlang": {
      "command": "erl_dist_mcp",
      "args": ["--mode", "elixir"]
    }
  }
}

Then just ask your AI to connect:

Connect to my_app@localhost with cookie MYSECRETCOOKIE

The README has full setup and usage docs.

Technical details

It’s written in Rust using the erl_dist crate for the distribution protocol and rmcp for the MCP server. No dependencies on the target node — it connects as a hidden node and uses standard RPC via the rex process.

Apache-2.0 licensed. Feedback and contributions welcome.

https://github.com/jimsynz/erl_dist_mcp

Most Liked

lawik

lawik

Nerves Core Team

Interesting! This can be very useful.

What does sandboxed code eval mean in this circumstance?

lawik

lawik

Nerves Core Team

I’d put code eval behind a config flag. It is incredibly useful, especially for dev, but absolutely bad for some cases, especially in prod.

jimsynz

jimsynz

Ash Core Team

It’s covered in the README, but I think calling it a sandbox is probably overstating it.

The eval_code tool includes safety mechanisms:

  • Process-level sandbox: Evaluation runs in a separate process with resource limits

  • Heap size limit: Prevents memory exhaustion

  • Timeout: Prevents infinite loops

  • Low priority: Reduces impact on system performance

  • Function whitelist: Only safe operations allowed (arithmetic, comparisons, list/map operations)

  • Blocks dangerous operations: No file I/O, network, process spawning, or code loading

Note: These safety mechanisms are NOT a complete sandbox. Skilled attackers may find ways to bypass restrictions. Only use on nodes you control.

Where Next?

Popular in Announcing Top

wmnnd
Hi there, for my project DBLSQD, I needed a file storage solution that is a bit more flexible than Arc. Because I thought others might f...
New
josevalim
Hi everyone, We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
Crowdhailer
The latest release of Ace (0.10.0) includes serving content over HTTP/2. I have started writing a webserver to teach my self more about...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
622 19010 194
New
hpopp
After just over two years in development, this latest version of Pigeon is what I finally consider done in regards to my original vision ...
New
zachdaniel
Ash Framework What is Ash? Ash Framework is a declarative, resource-oriented application development framework for Elixir. A resource can...
New
OvermindDL1
Been making an MLElixir thing (not released yet…) for fun in spare time in the past day. I’m just trying to see how much I can get an ML...
132 14085 106
New
tmbb
I’ve decided to create this topic to discuss optimization possibilities for something like Phoenix LiveView. I’ve created this topic unde...
144 10483 141
New

Other popular topics Top

malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31307 143
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54250 245
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement