Skip to Content
New release 11.7 available 🎉

Babel MCP Server

The Babel user interface can expose itself to an AI assistant. When the MCP automation server is enabled, an assistant such as Claude Code connects to the running Babel UI and drives it the way you would: it opens views, loads projects, changes obfuscation settings, starts a build, decodes a stack trace — and takes screenshots of the window so it can see the result of what it did.

This turns the UI into something an assistant can operate on your behalf:

  • Reproduce a customer issue — “load this project, enable dynamic proxy on the failing assembly, obfuscate it, and show me the warnings.”
  • Decode and explain a crash — “decode this stack trace with these map files and tell me which of my methods actually threw.”
  • Explore settings — “list every setting containing ‘encrypt’ and tell me which ones are on for this assembly.”
  • Capture screenshots — for a bug report, a support ticket, or your own documentation.

MCP (Model Context Protocol ) is the open standard AI assistants use to talk to external tools, so any MCP-capable client can connect — not just one vendor’s.

The automation server is available with the Ultimate license. Builds that do not carry it show no Automation page at all.

Enabling the server

The server is off by default. Nothing listens until you turn it on.

  1. Open the Babel user interface.
  2. Go to Tools → Options, then Environment → Automation.
  3. Tick Enable the automation server.
  4. Leave the port at 8765 unless it is already taken on your machine.
  5. Press Generate to create an access token, and copy it — you will paste it into your AI client.
  6. Optionally set a screenshot folder. Left empty, screenshots go to your system temporary folder, under BabelAutomation.
  7. Click OK.

The status line at the bottom of the page confirms the server is up and shows the address to give your client.

The Automation page of the Babel Options dialog, with the automation server enabled

Options → Environment → Automation

Changes take effect immediately — you do not need to restart Babel. Unticking the box stops the server just as immediately.

Settings

SettingDefaultMeaning
Enable the automation serveroffMaster switch. Nothing listens while this is off.
Port8765The loopback port the server listens on.
Access tokenemptyOptional shared secret. When set, a client must present it in the X-Babel-Token header.
Screenshot folderemptyWhere ui_screenshot writes PNG files. Empty means %TEMP%\BabelAutomation.

Connecting your AI assistant

The server speaks MCP over HTTP at:

http://127.0.0.1:8765/mcp

Configure that address in your MCP client as an HTTP (streamable HTTP) server, and send the access token as the X-Babel-Token header. Most clients accept a JSON configuration of this shape:

{ "mcpServers": { "babel-ui": { "type": "http", "url": "http://127.0.0.1:8765/mcp", "headers": { "X-Babel-Token": "paste-the-token-from-the-options-page" } } } }

If you left the access token empty, omit the headers block entirely.

Claude Code

With the Claude Code CLI, the same registration is one command:

claude mcp add --transport http babel-ui http://127.0.0.1:8765/mcp \ --header "X-Babel-Token: paste-the-token-from-the-options-page"

Start Babel first, then the assistant. Ask it to list its tools, or simply say “take a screenshot of the Babel window” — if a PNG comes back, you are connected.

Checking the connection yourself

The server answers a plain readiness probe that needs no MCP client:

curl http://127.0.0.1:8765/health

A healthy server replies with its address, the number of requests it has served, and how many connections are open:

Babel automation server: ready url: http://127.0.0.1:8765/mcp requests: 128 connections: 1

If that responds but your assistant does not, the problem is the client configuration — usually the token or the transport type — not Babel.

What the assistant can do

The server exposes its capabilities as MCP tools. They come in two layers: tools for the operations you perform most often, and generic tools that reach any control the first layer does not cover — so an assistant is never limited to a fixed menu.

Application and navigation

ToolPurpose
app_get_stateVersion, license, hosted view, open project, whether an obfuscation is running
ui_list_viewsEvery view that can be hosted in the main window
ui_show_viewNavigate to a view
ui_screenshotCapture the window, a dialog, or a single control to a PNG file
app_screenshot_folderWhere those PNG files are written

Any control, by name

ToolPurpose
ui_treeList the controls of the current view or open dialog, with their type, value and state
ui_get_value / ui_set_valueRead or write a control: check box, editor, text
ui_invokeClick a button, toggle a check box
ui_open_options / ui_close_dialogOpen the Options dialog on a given page, and close it

Projects and input assemblies

ToolPurpose
project_new / project_open / project_save / project_infoManage the obfuscation project
assembly_add / assembly_list / assembly_select / assembly_removeManage input assemblies

Obfuscation settings

ToolPurpose
settings_listEvery obfuscation setting of the selected assembly, with type and current value
settings_get / settings_setRead or write one setting, for example DynamicProxyCalls or GenerateMapFile

These three cover the whole settings surface of the Settings, Optimization and Output views — the assistant does not need a separate tool per option.

Running an obfuscation

ToolPurpose
obfuscate_startRun the obfuscation, as the Play button does
obfuscate_cancel / obfuscate_statusStop a run; check whether one is in progress and how the last one ended
output_getThe obfuscation log shown in the Console view
warnings_get / statistics_getWarnings and statistics from the last run

Stack Decoder

ToolPurpose
stackdecoder_decodeLoad XML map files, set the obfuscated trace, optionally tick Hide Babel generated frames, decode, and return the result

The Stack Decoder view is left populated afterwards, so a follow-up ui_screenshot captures the real decoded trace. See Decoding Stack Traces.

Working with it

Ask for outcomes, not tool names — the assistant picks the tools. A few requests that work well:

Open C:\Projects\Acme\Acme.babel, select Acme.exe, turn on dynamic proxy for all calls and map file generation, then obfuscate it and tell me about any warnings.

Decode the stack trace in crash.txt using Acme.exe.map.xml. Then tick “Hide Babel generated frames” and show me the difference.

Show me every setting with “encrypt” in the name that is currently enabled for this assembly.

Take a screenshot of the Output view so I can attach it to a support ticket.

The assistant is operating the real application: it can change your project settings, start obfuscation runs, and overwrite output assemblies. Work on a copy of a project when you are letting an assistant explore freely.

Long operations

Obfuscating a large assembly can take longer than an AI client is willing to wait for a single reply. If a run is slow, tell the assistant to start it without waiting and poll instead — obfuscate_start accepts a wait argument, and obfuscate_status reports progress. A well-behaved client does this on its own when a run times out.

Security

The automation server is a deliberate hole in a desktop application, so it is drawn tight:

  • Off by default. You have to enable it.
  • Loopback only. It binds to 127.0.0.1 and is not reachable from the network — not from another machine, not from another user’s session.
  • Token protected. Set an access token and every request must present it in X-Babel-Token; a request without it is rejected with 401. Anything running as your user on your machine can reach the port, so on a shared or multi-user machine, set one.
  • Bounded. The server accepts a limited number of simultaneous connections and drops idle ones, so it cannot be tied up.
  • Local only. Screenshots are written to a folder on your machine. Nothing is uploaded anywhere by Babel; what your AI client does with a file you point it at is governed by that client.

Turn the server off when you are not using it. The check box is the whole story — no leftover process, no listening port.

Reliability

An in-process automation server is only useful if it stays up for the length of a working session, so the server is built not to need a restart:

  • Kept-alive connections. An assistant issues a stream of small calls; they are served over the same connection instead of reconnecting for each one.
  • Nothing hangs. Every request is bounded. If the user interface is busy or you have a dialog open, the call returns a clear error saying so, rather than leaving the client waiting on a dead socket — and the server keeps serving.
  • Failures stay local. A tool that fails reports the failure as a result; it does not disturb the connection or the other tools. A dropped, truncated or malformed request is discarded without affecting anything else.
  • Self-healing. If the listening socket is ever lost, the server rebinds it instead of quietly dying.

If the assistant does report that it cannot reach Babel, work through this in order:

SymptomCauseFix
Client cannot connect at allServer not enabled, or Babel not runningCheck the status line on the Automation page
401 from every callToken missing or mismatchedRe-copy the token from the Options page into the client configuration
Server did not start; Options shows a reasonPort already in useChoose another port and press OK
Calls report the UI did not respondA modal dialog is open, or a long operation is running in the UIClose the dialog or let the operation finish; the server is still running
There is no Automation page in OptionsThis build does not carry the serverThe automation server is available with the Ultimate license

Command line

For scripted and unattended use, the user interface accepts an --automation switch:

Babel.Win.exe --automation Babel.Win.exe --automation=9100

This enables the server for that run only, on the given port (8765 if omitted), without changing your saved settings and without an access token. It is meant for local automation and test runs on a machine you control — for everyday use, prefer the Options page with a token.

Last updated on