jimsynz

jimsynz

Ash Core Team

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

Showing Posts 1 to 5

lawik

lawik

Nerves Core Team

Interesting! This can be very useful.

What does sandboxed code eval mean in this circumstance?

jimsynz

jimsynz OP

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.

jhogberg

jhogberg

Erlang Core Team

Unfortunately it doesn’t require much skill to wreak havoc, evaluating <<0::really_large_number>> will kill any node and can happen by accident. I wouldn’t be too surprised if an “AI assistant” managed to evaluate something like that by mistake, it might be worth trying to filter that kind of expression too.

jimsynz

jimsynz OP

Ash Core Team

you’re right that it’s easy to work around, so maybe it’s better to remove the feature and avoid any perception of safety.

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.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
387 15136 120
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
woylie
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto. pagination cursor pagination sorta...
New
kip
Please say hi to a new lib, Astro that aims to deliver easy-to-consume astronomy calculations of practical use. For now it only calculat...
New

Other Trending Topics Top

akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews