Esquie
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Esquie decode hex 48656c6c6f to ASCII"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Esquie
MCP server providing computation, encoding, and note-taking tools for AI-assisted reverse engineering. Designed to complement disassembler-specific MCP servers (IDA Pro, Ghidra, Binary Ninja) by handling the ad-hoc computation side of RE work: struct unpacking, address math, crypto checks, encoding/decoding, and arbitrary Python scripting.
Renamed from
re-helper-toolsin 0.3.0. Existing users should remove the old image/container:docker rmi re-helper-sandbox:latest && docker rm -f re-helper-sandbox.
Prerequisites
Node.js 20 or later
npm (included with Node.js)
Docker Desktop or Docker Engine — must be running before using
python_eval
Verify your environment:
node --version # v20.x or later
docker info # should print server info without errorsRelated MCP server: re-mcp
Quick Start
# Clone and enter the project
git clone <repo-url> && cd esquie
# Install dependencies and compile TypeScript
npm install
npm run build
# Build the Python sandbox Docker image (~1-2 min on first run)
docker build -t esquie-sandbox:latest .The Docker image is also built automatically on the first
python_evalcall if it doesn't exist, but pre-building avoids a delay during your first session.
MCP Configuration
Claude Code
Add to your project's .mcp.json or ~/.claude.json under mcpServers:
{
"mcpServers": {
"esquie": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/absolute/path/to/esquie"
}
}
}cwd must point to the project root so the server can locate the Dockerfile for auto-building the sandbox image.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"esquie": {
"command": "node",
"args": ["/absolute/path/to/esquie/dist/index.js"],
"cwd": "/absolute/path/to/esquie"
}
}
}Tools Reference
python_eval
Execute arbitrary Python in a sandboxed Docker container. Session state (variables, imports, function definitions) persists across calls within the same server session.
Parameter | Type | Required | Description |
| string | yes | Python code to execute |
| number | no | Timeout in ms (default: 30000) |
Pre-installed packages: capstone, lief, pycryptodome, dill. To add packages, build a custom image extending esquie-sandbox:latest and point the server at it via ESQUIE_SANDBOX_IMAGE (see Extending the sandbox). Network is disabled inside the container by design, so pip install from python_eval is not possible.
Examples:
# Expression — result is returned automatically
0x401000 + 0x1a4
# → 4198564
# State persists across calls
from capstone import *
md = Cs(CS_ARCH_X86, CS_MODE_64)
# Subsequent call can use `md`
for insn in md.disasm(b"\x55\x48\x89\xe5", 0x1000):
print(f"0x{insn.address:x}: {insn.mnemonic} {insn.op_str}")
# → 0x1000: push rbp
# → 0x1001: mov rbp, rspHex/Binary Utilities
Native TypeScript tools — no Docker overhead, instant response.
Tool | Parameters | Description | Example |
|
| Hex to decimal (BigInt-safe) |
|
|
| Decimal to hex (BigInt-safe) |
|
|
| Hex bytes to UTF-8 text |
|
|
| UTF-8 text to hex bytes |
|
|
| XOR two buffers (shorter repeats) |
|
|
| MD5/SHA1/SHA256 digest |
|
|
| Find byte pattern offsets ( |
|
|
| Base64 encode (utf8 or hex input) |
|
|
| Base64 decode (utf8 or hex output) |
|
All hex parameters accept optional 0x prefix and ignore whitespace.
Sandbox Management
Tool | Parameters | Description |
| (none) | Destroy the container and clear all session state. Next |
|
| Upload a file (base64-encoded) into |
| (none) |
|
|
| Read |
Scratchpad
Key-value store for persisting analysis notes, renamed symbols, struct definitions, and other context. By default in-memory only (cleared on server restart). Set ESQUIE_NOTES_FILE to an absolute file path to persist notes to disk.
Tool | Parameters | Description |
|
| Store or overwrite a note |
|
| Retrieve a note by key |
| (none) | List all notes as JSON |
|
| Remove a note |
Notes are also exposed as MCP resources under note://{key} URIs, so MCP clients that support resources can browse and reference them directly.
Sandbox Security Model
The python_eval container runs with multiple layers of isolation:
Constraint | Effect |
| No network access — cannot exfiltrate data or download payloads |
| Hard memory limit prevents runaway allocations |
| Capped at 1 CPU core |
| Prevents fork bombs |
| All Linux capabilities dropped — zero effective/permitted/inheritable caps |
| Shared memory restricted from default 64MB |
| Filesystem is immutable — only |
| Ephemeral writable scratch space, capped at 100MB |
| Non-root user (uid 1000) inside the container |
| Prevents privilege escalation via setuid/setgid binaries |
Per-call timeout | Default 30s, configurable — kills exec on expiry |
Output truncation | stdout/stderr capped at 100KB to prevent context flooding |
Idle auto-expiry | Container destroyed after 30min of inactivity (configurable) |
Upload/download size cap | 10MB per call to bound exfil-via-roundtrip risk |
Read-only host mount | When |
Architecture
Claude Code / Claude Desktop
│
│ stdio (JSON-RPC)
▼
┌─────────────────────────┐
│ MCP Server (Node.js) │
│ │
│ ┌───────────────────┐ │
│ │ hex-utils.ts │──┼── hex_to_dec, xor_buffers, hash, ...
│ │ (native TS) │ │
│ └───────────────────┘ │
│ ┌───────────────────┐ │
│ │ scratchpad.ts │──┼── set_note, get_note, list_notes, ...
│ │ (Map + opt. JSON) │──┼── MCP resources: note://{key}
│ └───────────────────┘ │
│ ┌───────────────────┐ │
│ │ python-eval.ts │──┼── python_eval, reset_sandbox,
│ │ (5 MCP tools) │ │ upload/list/download_from_sandbox
│ └─────────┬─────────┘ │
│ │ calls │
│ ▼ │
│ ┌─────────┴─────────┐ │ ┌───────────────────────────────┐
│ │ sandbox.ts │──┼──────►│ Docker Container │
│ │ (Docker lifecycle)│ │ │ (esquie-sandbox:latest) │
│ └───────────────────┘ │ │ │
│ │ │ python3 /opt/runner.py │
│ │ │ ├─ loads session from pkl │
│ │ │ ├─ exec(code) in namespace │
│ │ │ └─ saves session to pkl │
└─────────────────────────┘ └───────────────────────────────┘Lazy init: Container is created on the first
python_evalcall and kept alive for the session.Session persistence: Python variables survive across calls via
dillserialization to/tmp/session.pklinside the container.Auto-expiry: Container is automatically destroyed after 30 minutes of idle time (configurable via
ESQUIE_SANDBOX_IDLE_TIMEOUT).Cleanup: Container is stopped and removed on server shutdown (SIGINT/SIGTERM).
Configuration
Resource limits and timeouts are configured via environment variables:
Variable | Default | Description |
|
| Memory limit in MB (64–8192) |
|
| CPU core count (1–16) |
|
| Default exec timeout in ms (1000–600000) |
|
| PID limit (8–1024) |
|
| Auto-expiry idle timeout in ms (60000–86400000, default 30 min) |
| (unset) | Absolute path to a JSON file. When set, scratchpad notes persist across server restarts. |
| (unset) | Absolute path to a host directory. When set, the directory is bind-mounted read-only at |
|
| Docker image tag the sandbox container is created from. Override to use a custom image (e.g. one that bundles extra Python packages). When set to anything other than the default, the image must already exist locally — the server will not auto-build it. See Extending the sandbox. |
Out-of-range values are clamped to the nearest bound and a warning is logged to stderr.
Set them in your MCP config's env block or export before starting the server:
{
"mcpServers": {
"esquie": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/absolute/path/to/esquie",
"env": {
"ESQUIE_SANDBOX_MEMORY": "1024",
"ESQUIE_SANDBOX_TIMEOUT": "60000",
"ESQUIE_NOTES_FILE": "/Users/me/.esquie/notes.json",
"ESQUIE_SANDBOX_MOUNT": "/Users/me/samples"
}
}
}
}Extending the sandbox
The default sandbox image is intentionally minimal: capstone, lief, pycryptodome, dill. The container has no network access by design, so packages cannot be installed at runtime via python_eval. To add tools (e.g. pwntools, unicorn, keystone-engine, yara-python, angr, custom wheels), bake them into a derived image and point Esquie at it.
Build the base image once:
docker build -t esquie-sandbox:latest .Write a custom Dockerfile that extends it:
FROM esquie-sandbox:latest USER root RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential cmake pkg-config libffi-dev \ && pip install --no-cache-dir --target=/opt/pylibs \ pwntools unicorn keystone-engine yara-python \ && apt-get purge -y build-essential cmake pkg-config \ && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* USER sandboxBuild it:
docker build -t my-esquie-sandbox:latest -f Dockerfile.custom .Set
ESQUIE_SANDBOX_IMAGEin your MCP config:"env": { "ESQUIE_SANDBOX_IMAGE": "my-esquie-sandbox:latest" }If a previous container exists, force a fresh one so the new image takes effect:
docker rm -f esquie-sandbox
When ESQUIE_SANDBOX_IMAGE is set to a tag other than the default, the server will not auto-build the image — it expects you to have built or pulled it. Missing custom image → first python_eval fails with an actionable error pointing at the build command.
Development
# Run in development mode (auto-compiles via tsx)
npm run dev
# Compile TypeScript to dist/
npm run build
# Rebuild the Docker image (required after changing runner.py or Dockerfile)
docker build -t esquie-sandbox:latest .
# Force-recreate the sandbox container (e.g. after image rebuild)
docker rm -f esquie-sandboxCI runs npm ci && npm run build on every push and PR to main (.github/workflows/build.yml).
Project Structure
esquie/
├── package.json
├── tsconfig.json
├── Dockerfile # Python sandbox image definition
├── .github/workflows/
│ └── build.yml # CI build check
├── src/
│ ├── index.ts # Entry point: server setup, tool/resource registration, shutdown
│ ├── docker/
│ │ ├── config.ts # Env var config parsing
│ │ ├── sandbox.ts # DockerSandbox class: container lifecycle + exec + file I/O
│ │ └── runner.py # Python runner baked into Docker image
│ └── tools/
│ ├── python-eval.ts # python_eval, reset_sandbox, upload/list/download
│ ├── hex-utils.ts # Native hex/binary/encoding tools
│ └── scratchpad.ts # Key-value notepad (in-memory + optional JSON persistence)
└── dist/ # Compiled output (git-ignored)Troubleshooting
python_eval fails with "Cannot connect to the Docker daemon"
Docker Desktop or Docker Engine is not running. Start it and try again.
python_eval hangs on first call
The sandbox Docker image is being built automatically. This takes 1-2 minutes on first run. Pre-build with docker build -t esquie-sandbox:latest . to avoid this.
"Conflict. The container name /esquie-sandbox is already in use" A leftover container from a previous session. Remove it:
docker rm -f esquie-sandboxSession state is lost
The container was destroyed (server restart, Docker restart, manual removal). State lives in /tmp inside the container and does not survive container removal. This is by design.
"Execution timed out"
The default timeout is 30 seconds. Pass a higher timeout value (in ms) for long-running computations. Maximum practical limit depends on the MCP client.
Docker image is stale after editing runner.py
Rebuild the image and remove the old container:
docker build -t esquie-sandbox:latest .
docker rm -f esquie-sandboxUpgrading from re-helper-tools
Remove the old image and container after upgrading:
docker rmi re-helper-sandbox:latest
docker rm -f re-helper-sandboxUpdate any RE_SANDBOX_* env vars in your MCP config to ESQUIE_SANDBOX_*.
Available Tools
18 toolsascii_to_hexA
Encode ASCII text as hex bytes
Inputs: text (required).
base64_decodeB
Decode a base64 string
Inputs: data (required), output_encoding.
base64_encodeC
Base64-encode data
Inputs: data (required), encoding.
byte_pattern_searchA
Find all offsets of a byte pattern in hex data. Supports ?? as wildcard bytes.
Inputs: pattern (required), hex_data (required).
dec_to_hexB
Convert a decimal number to hex
Inputs: dec (required).
delete_noteA
Delete a note from the scratchpad
Inputs: key (required).
download_from_sandboxA
Read a file from the sandbox container's /tmp directory and return its base64-encoded content. Maximum file size: 10MB.
Inputs: filename (required).
get_noteB
Retrieve a note from the scratchpad
Inputs: key (required).
hashC
Compute a hash digest of the input data
Inputs: data (required), algorithm (required), encoding.
hex_to_asciiA
Decode a hex string to ASCII text
Inputs: hex (required).
hex_to_decA
Convert a hex string to decimal
Inputs: hex (required).
list_notesA
List all notes in the scratchpad
Inputs: no named parameters.
list_sandbox_filesA
List files in the sandbox container's /tmp directory (output of ls -la /tmp).
Inputs: no named parameters.
python_evalA
Execute Python code in a sandboxed Docker container. Pre-installed packages: pwntools, capstone, keystone, unicorn, lief, yara, pycryptodome. Session state (variables, imports) persists across calls.
Inputs: code (required), timeout.
reset_sandboxA
Destroy the Python sandbox container and clear all session state. The next python_eval call will create a fresh container.
Inputs: no named parameters.
set_noteB
Store a note in the scratchpad
Inputs: key (required), value (required).
upload_to_sandboxA
Upload a file into the sandbox container's /tmp directory. Useful for dropping binaries or samples for Python analysis.
Inputs: filename (required), content_base64 (required).
xor_buffersA
XOR two hex buffers. Shorter buffer is repeated to match the longer one.
Inputs: hex_a (required), hex_b (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool has a clearly distinct purpose: hex/dec/ascii conversions, XOR, hashing, pattern search, base64, notes CRUD, and sandbox operations (eval, reset, file transfer). No two tools overlap in function, and descriptions are sufficiently clear to avoid misselection.
Naming conventions are mixed: noun_to_noun for conversions (hex_to_dec, dec_to_hex), verb_noun for notes (set_note, get_note, delete_note), and a mix for sandbox tools (python_eval, reset_sandbox, upload_to_sandbox). While all use snake_case, the verb placement is inconsistent, making the set slightly less predictable.
18 tools is slightly high for a utility server, but each tool covers a distinct function across three clusters (conversion/encoding, notes, sandbox). The count is reasonable for the breadth of capabilities offered, though a few conversion tools could potentially be consolidated.
The tool surface is comprehensive for a hex/binary utility server with sandboxing. It covers conversion, encoding, hashing, pattern search, full note CRUD, and sandbox lifecycle including file upload/download/list. No obvious dead ends or missing core operations.
Maintenance
Related MCP Connectors
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
An MCP server for deep research or task groups
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Hosted iOS app intelligence and creative research MCP server.
Related MCP Servers
- AlicenseBqualityFmaintenanceMCP server for reverse engineering that enables interaction with IDA Pro for analysis tasks such as decompilation, disassembly, and memory engagement reports.2446MIT
- AlicenseAqualityCmaintenanceA multi-backend MCP server that exposes binary analysis capabilities from IDA Pro and Ghidra, allowing LLMs to directly drive reverse-engineering tools via natural language.11181Apache 2.0
- AlicenseNot gradedqualityBmaintenanceAn enterprise-grade MCP server for AI-powered reverse engineering. Enables AI agents to perform comprehensive binary analysis through natural language commands.115 PyPI224MIT
- FlicenseNot gradedqualityDmaintenanceA PyGhidra-based MCP server that exposes Ghidra's reverse engineering capabilities to AI agents, enabling binary analysis via tools like overview, search, view, list, edit, script execution, and version control.1-