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

kelvinst
Hey everyone! Well, we made this lib a while ago and now we decided to finally go out and public with it! It’s a tool for creating and m...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: GitHub - devonestes/assertions: Helpful a...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44532 311
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44139 214
New
trisolaran
Hi! :waving_hand: I would like to present LiveSelect, a little library that I wrote to easily add a dynamic selection input to your LV f...
198 11220 107
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36654 110
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement