Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d56238e
add mcp in debugger session
pgourlain Oct 1, 2026
48602fb
documentation
pgourlain Oct 1, 2026
20a9976
Update grammar submodule to latest
pgourlain Oct 1, 2026
27d8915
Add top_processes tool, paused-process info and supervisor child coun…
pgourlain Oct 1, 2026
9fa71a5
Report run queue and VM resource usage in MCP runtime_summary
pgourlain Oct 1, 2026
999088b
Add format=mermaid to MCP graph tools
pgourlain Oct 1, 2026
21639a0
Add topology_overview composite tool to MCP inspector
pgourlain Oct 1, 2026
e4e6fe9
Serve the sample prompt as MCP prompt map_application
pgourlain Oct 1, 2026
182df01
Add changes_since tool to MCP inspector
pgourlain Oct 1, 2026
78b224e
Add top_ports, ets_summary and connected nodes to MCP inspector
pgourlain Oct 1, 2026
de6cbc5
Document post-V1 MCP additions in mcp-tasks and align the sample prompt
pgourlain Oct 1, 2026
d5436f7
Test all MCP tools and the prompt against a real launched target
pgourlain Oct 1, 2026
7abe054
MCP inspector: review fixes and opt-in developer tier
pgourlain Oct 1, 2026
47bd5ed
Rewrite the MCP security note around the developer's real threat mode…
pgourlain Oct 1, 2026
4226465
Adapter e2e: ets_summary counts nothing by default, developer tools a…
pgourlain Oct 1, 2026
545343a
MCP policy: allowed_tools accepts default; initialize lists disabled …
pgourlain Oct 1, 2026
09af47f
Add process_groups tool: processes aggregated by initial call in a fi…
pgourlain Oct 1, 2026
4543ffc
Version 1.2.6
pgourlain Oct 1, 2026
8a70969
remove unused file
pgourlain Oct 1, 2026
adacb88
Update MCP settings test for the erlang.mcp.authToken setting
pgourlain Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pr-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ jobs:
- name: Erlang Common Test suites
run: ./rebar3 ct

- name: Erlang Common Test suites (MCP inspector)
run: ./rebar3 ct --dir apps/erlangbridge/test/mcp
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "npm: compile"
},
{
// Only the extension under development + what is installed in the dedicated
// extensions dir (your normal extensions are not loaded). Install Claude Code there once:
// code --extensions-dir ~/.vscode-erlang-dev/extensions --install-extension anthropic.claude-code
"name": "Launch Extension (sample-mcp, Claude only)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}/../../erlang/sample-mcp",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out"],
"preLaunchTask": "npm: compile"
},
{
"name": "Launch Tests",
"type": "extensionHost",
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Change log


## Version 1.2.6 (October 1, 2026)

* MCP topology inspector for debug sessions (opt-in)
- New settings `erlang.mcp.enabled` (default `false`), `erlang.mcp.host` (loopback only) and `erlang.mcp.port` (`0` = any free port). When enabled, a debug session (launch or attach, not *Run without debugging*) starts a read-only, token-authenticated [MCP](https://modelcontextprotocol.io) server inside the debugged Erlang node, so that an AI agent can map its OTP topology: `runtime_summary`, `application_overview`, `supervision_tree`, `registered_processes`, `process_info`, `top_processes` (hottest processes by queue length, reductions or memory), `ets_tables` (approved tables, metadata only) and `debug_session`. Results are bounded, paginated, with typed edges, evidence, confidence and explicit coverage limitations
- VS Code registers the live endpoint automatically (MCP server list) and **Erlang MCP: Show Connection Details** helps configure other clients. The session token never appears in logs, DAP events or settings
- An optional top-level `{mcp, [...]}` term in the project's `rebar.config` restricts tools, ETS tables and limits. Nothing changes when the setting is off. See [HELP.MD](./HELP.MD#mcp-topology-inspector-ai-agents-debug-sessions-only) and [mcp_security.md](./mcp_security.md)
- Agent-sized answers: graph tools default to `detail: "summary"` (compact entities and edges, 100 items per page, modules listed per application only); `detail: "full"` returns the complete JSON (e.g. to save it to a file), `pageSize` tunes the pages
- **Output > Erlang MCP** journals every MCP request (tool, status, inspector time, size, pages, delay since the previous request) and summarizes the session, to see how an agent uses the inspector; arguments, results and token are never written
- Optional user setting `erlang.mcp.authToken` (development convenience): a fixed token so that a static client such as Claude Code (`claude mcp add`) is configured once; default empty = random token per session
- The verbose debug log no longer prints the Erlang cookie passed to an attach helper
- Supervisors in `supervision_tree` carry their child counts (`children`: specs, active, supervisors, workers); `debug_session` lists the processes stopped at a breakpoint (`pausedProcesses`), `process_info` adds a `debugger` field for such a process, and a supervisor that is itself stopped at a breakpoint is reported with the `unavailable_while_paused` omission instead of a plain timeout
- `runtime_summary` also reports the run queue length and process/atom/port/ETS counts against their VM limits (`resources`)
- Graph tools accept `format: "mermaid"`: the page is also returned as a ready-to-render Mermaid `graph TD`, built from the reported edges
- New tool `topology_overview`: the application, its supervision tree, registered processes and owned approved ETS tables of one application in a single call (each part still subject to the project policy)
- New tool `changes_since`: compares a retained collection with a fresh observation and reports added, removed and replaced (restarted) entities; removals from partial collections are marked unconfirmed
- New tools `top_ports` (local ports by queue size or traffic counters: driver name and owner only, never addresses or command lines) and `ets_summary` (ETS memory per owner process, no table names or contents); `runtime_summary` lists the connected nodes (host redacted by default); new edge type `owns_port`
- Developer tier (opt-in, named in the project's `allowed_tools`): `process_state` (bounded `sys:get_state` of a gen_server/gen_statem/gen_event, never a supervisor), `mailbox_sample` (oldest messages) and `ets_sample` (a few rows of an approved table), with best-effort redaction of secret-like keys and URL credentials; `allowed_ets_tables` accepts `all`; limits can be raised above their defaults up to higher ceilings (e.g. `collection_ttl_ms` up to 10 min)
- Hardening: the bearer token and cursor secret no longer appear in crash reports, non-ASCII workspace paths find the project policy, `ets_summary` only counts approved tables, `top_ports` only names well-known drivers, inspector processes are excluded from the rankings, child ids are redacted
- `allowed_tools` accepts `default` (the built-in set, also after upgrades) or `[default, <<"tool">>]`; the server tells the agent in its `instructions` which tools the project policy disables
- New tool `process_groups`: all local processes aggregated by initial call (count, memory, reductions, queue, registered vs unregistered, sample ids) in an answer of fixed size, to find fan-out and leaks of anonymous processes
- MCP prompt `map_application`: the sample prompt served by the inspector itself (argument-checked, grants nothing)
- A ready-to-use prompt to map an application with an agent: [HELP.MD](./HELP.MD#mcp-topology-inspector-ai-agents-debug-sessions-only) (*Sample prompt*)

* Update erlang.plist to latest

---

## Version 1.2.5 (September 27, 2026)

* [358](https://github.com/pgourlain/vscode_erlang/issues/358) : Launch (Run / Debug) broken on Linux and macOS since 1.2.4
Expand Down
7 changes: 7 additions & 0 deletions DevelopersReadme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ then

```bash
./rebar3 ct
./rebar3 ct --dir apps/erlangbridge/test/mcp # MCP inspector suites (policy, server, debugger bridge)
npm test # includes out/test/test-suite/mcp/* (real erl target)
```

The embedded MCP inspector lives in `apps/erlangbridge/src/mcp/` (`mcp_*.erl`, all Erlang) and is
only compiled to `_build/default/lib/ebin` by the debug adapter and started on request
(`vscode_connection`: `mcp_start`, `mcp_renew`, `mcp_stop`); the LSP node never loads it. Its
tests/fixtures are in `apps/erlangbridge/test/mcp/` and `test/test-suite/mcp/`.

## build package

- vsce package : 'vscode:prepublish' is executed
Expand Down
Loading
Loading