bitslicer-mcp
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., "@bitslicer-mcp Attach to PID 4242 and scan for integer 100"
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.
bitslicer-mcp
A safety-bounded, macOS ARM64 bridge that lets Codex use Bit Slicer's real memory-inspection engine through the Model Context Protocol (MCP). It does not automate the GUI: a TypeScript stdio server talks over a user-only Unix socket to a separately built Bit Slicer MCP application.
Authorization requirement: Use this project only with software and processes you own or are explicitly authorized to assess. The bridge is read-only by default. Memory writes require explicit opt-in at both server layers, approval of the target, and a short-lived edit session. This project does not provide injection, target code execution, stealth, anti-cheat bypass, arbitrary shell access, unrestricted process control, or automatic page-protection changes.
Status
The read-only native integration is implemented against pinned upstream Bit Slicer commit 035ca123781152a97245d2f8b9d1a8149202386d. Process listing, explicit attachment, VM regions, bounded reads/dumps, typed exact scans, exact and relative refinement, pointer-chain resolution, loaded Mach-O images, and bounded ARM64 disassembly call verified Bit Slicer source APIs. All real-target writes remain disabled.
The build is named Bit Slicer MCP, uses bundle ID com.krisgnyc.BitSlicerMCP, and is emitted under this repository. It neither changes nor replaces /Applications/Bit Slicer.app.
flowchart LR
C["Codex / ChatGPT desktop"] -->|"MCP over stdio"| M["TypeScript MCP server"]
M -->|"newline JSON + launch token"| U["0600 Unix socket"]
U --> N["Native companion in Bit Slicer fork"]
N --> B["Pinned, inspected Bit Slicer internal abstractions"]
N --> P["Native target approval"]
M -. local tests .-> K["In-memory mock bridge"]Related MCP server: hopper-mcp
What is included
16 MCP tools covering connection health, processes, explicit attachment, regions, bounded reads, value scans and filtering, pointer chains, loaded Mach-O images, bounded dumps, ARM64 disassembly, and controlled edit sessions.
A newline-delimited JSON protocol with a per-launch token and checked request/response IDs.
A Swift socket-listener skeleton for protocol development plus a real Objective-C overlay linked into a pinned Bit Slicer source checkout.
A complete mock target and integration tests for attach/read/scan/patch/apply/undo behavior.
Protocol notes, threat model, tool reference, integration plan, and roadmap in
docs/.
New to MCP? Follow the Mac-specific TUTORIAL.md, an absolute beginner's guide with copy-and-paste Codex prompts for attaching, scanning, refining, reading, and disassembling.
Requirements
Apple Silicon Mac, macOS 13 or later
Node.js 20 or later and npm
Xcode 16 or newer for the integrated application build
Build and test
cd /absolute/path/to/bitslicer-mcp
npm install
npm run check
./scripts/build-bit-slicer-mcp.shnpm run check runs the TypeScript/mock and Swift-package tests. The build script obtains the pinned upstream checkout under ignored upstream/, applies the reviewed overlay, builds arm64, ad-hoc signs a distinct product, and emits build/Bit Slicer MCP/Bit Slicer MCP.app.
Try it locally with the mock bridge
Generate a fresh token for this launch and keep the same shell environment for both processes:
cd /absolute/path/to/bitslicer-mcp
export BITSLICER_SESSION_TOKEN="$(openssl rand -hex 32)"
export BITSLICER_SOCKET_PATH="/tmp/bitslicer-mcp-$UID.sock"
export BITSLICER_ENABLE_WRITES=false
npm run build
npm run mockThe mock process is PID 4242; attachment still requires a meaningful authorizationReason. Set BITSLICER_ENABLE_WRITES=true in both bridge and MCP-server environments only for an authorized patching exercise.
Connect Codex exactly
Codex supports local stdio MCP servers and stores shared configuration in ~/.codex/config.toml or a trusted project's .codex/config.toml. See the official MCP configuration documentation.
Build the project once:
cd /absolute/path/to/bitslicer-mcp npm install && npm run buildStart the integrated app with the automated launcher. On this Mac:
cd /Volumes/Ex-SSD/REV-ENG/bitslicer-mcp npm run launchAlternatively, double-click
Launch Bit Slicer MCP.commandin Finder. The app generates a fresh token, writes a mode-0600session descriptor under the current user's Application Support directory, and removes it when the app exits. The MCP server rereads it for every request, so relaunching the bridge does not require restarting Codex. TheMCP ●menu-bar item shows listener/target status.Add this exact table to
~/.codex/config.toml, replacing both absolute paths:[mcp_servers.bitslicer] command = "/absolute/path/to/node" args = ["/absolute/path/to/bitslicer-mcp/dist/src/server.js"] default_tools_approval_mode = "writes" startup_timeout_sec = 10 tool_timeout_sec = 75 enabled = trueFind the Node path with
command -v node. No secret is stored in Codex configuration.Restart the Codex app/CLI host once after installing or changing this entry. Future Bit Slicer MCP launches do not require a Codex restart. Run
codex mcp listor type/mcpin the Codex TUI to confirm the server, then callpingbefore listing processes.Call
attachwith a PID and an explicit authorization reason. Bit Slicer MCP shows a local approval prompt before acquiring the task. Real-target writes are not available in this build even if the environment flag is changed.
See docs/codex-usage.md for safe prompting and troubleshooting.
Repository layout
src/ TypeScript MCP server, client, validation, and mock bridge
test/ Node unit and Unix-socket integration tests
native/ Swift package and Bit Slicer integration seam
integration/ Reviewed Objective-C overlay using verified upstream APIs
scripts/ Reproducible pinned-source preparation and app build
protocol/ Machine-readable JSON Schema
docs/ Architecture, protocol, threat model, tool reference, and roadmapDesign boundaries
Socket access is local and file mode
0600; every request also carries a high-entropy token generated automatically by the native app for that launch. Its session descriptor is stored in a mode-0700directory with mode-0600permissions.A target must be explicitly attached and approved before target operations.
Reads, dumps, pointer depth, scan results, disassembly, and patch sizes are bounded.
Dumps are returned as data; neither MCP nor bridge exposes arbitrary filesystem paths.
The integrated app exposes no write primitive and never changes page protections.
Patch preview compares expected bytes; apply compares them again and consumes a one-time confirmation. Undo also compares the post-patch bytes before restoring.
License
MIT. This repository is independent and does not include Bit Slicer source code.
Available Tools
16 toolsapply_memory_patchADestructive
Apply only a previously previewed patch using its one-time confirmation ID.
Inputs: editSessionId (required), confirmationId (required).
attachBRead-only
Request explicit attachment. The native bridge must independently approve the target before access.
Inputs: pid (required), authorizationReason (required).
begin_edit_sessionADestructive
Begin a short-lived write session. Requires server write opt-in and native target authorization.
Inputs: justification (required).
disassembleCRead-only
Decode a bounded instruction range through the bridge disassembly abstraction.
Inputs: address (required), instructionCount (required), architecture.
dump_memoryARead-only
Return a base64 memory dump of at most 1048576 bytes; this tool does not write files.
Inputs: length (required), address (required).
end_edit_sessionADestructive
Invalidate previews and close the active edit session.
Inputs: editSessionId (required).
filter_scanARead-only
Filter a prior scan using an exact, changed, unchanged, increased, or decreased predicate.
Inputs: scanId (required), predicate (required), value, maxResults.
list_loaded_imagesARead-onlyIdempotent
List Mach-O images loaded in the approved target.
Inputs: no named parameters.
list_memory_regionsARead-onlyIdempotent
List mapped regions for the currently approved target.
Inputs: no named parameters.
list_processesARead-onlyIdempotent
List attachable processes. Listing does not authorize attachment.
Inputs: query.
pingARead-onlyIdempotent
Check the local Bit Slicer bridge and report capabilities.
Inputs: no named parameters.
preview_memory_patchCDestructive
Compare expected bytes and preview a patch of at most 64 bytes without writing.
Inputs: address (required), expectedHex (required), editSessionId (required), replacementHex (required).
read_memoryBRead-onlyIdempotent
Read at most 65536 bytes from an approved target.
Inputs: length (required), address (required).
resolve_pointer_chainARead-only
Resolve a base address plus a bounded sequence of pointer offsets.
Inputs: offsets (required), baseAddress (required).
scan_valueARead-only
Start a bounded integer or UTF-8 string scan in readable regions.
Inputs: value (required), valueType (required), maxResults.
undo_last_patchADestructive
Undo the latest patch in the edit session using recorded compare-before-write metadata.
Inputs: editSessionId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool has a clearly distinct purpose: attach/list processes, read/dump memory, scan/filter, edit session phases, and utility functions. The only close pair is read_memory vs dump_memory, but descriptions clearly distinguish by size and encoding.
All tools follow a consistent snake_case verb_noun pattern (e.g., list_memory_regions, apply_memory_patch, resolve_pointer_chain). Standalone verbs like ping, attach, and disassemble are also in snake_case and fit the convention.
16 tools is slightly above the typical 3-15 range for a well-scoped server, but every tool serves a distinct function in the memory editing workflow. The count feels justified by the domain's complexity.
Covers process attachment, memory enumeration/reading, scanning/filtering, pointer resolution, disassembly, and a safe patch workflow with preview/apply/undo. Missing an explicit detach tool, and writes are restricted to previewed patches, but the core lifecycle is well covered.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Reasoning, code, anti-deception, memory harness MCP tools. Stdio or HTTPS api.ejentum.com/mcp
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA Linux-native MCP server that gives AI assistants direct access to DMA-based memory operations for memory inspection, process analysis, reverse engineering, and game engine SDK extraction via natural language.13AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server providing LLM clients with structured, transaction-safe access to Hopper-derived reverse-engineering snapshots, enabling binary analysis without the disassembler in the model's context window.1MIT
- FlicenseNot gradedqualityDmaintenanceA local, privacy-first MCP server that orchestrates Ghidra, Binary Ninja, x64dbg, and system tools to provide AI assistants with powerful binary analysis capabilities.-
- AlicenseNot gradedqualityBmaintenanceA macOS-native MCP server that provides AI hosts with fresh workspace state, bounded context, and retained execution evidence, avoiding collapsing operations into shell strings.9 npmApache 2.0