stack-control
v0.1.0
Published
Control the whole stack. From pixel to silicon. MCP server for full-stack debugging — React to silicon.
Maintainers
Readme
Control
Control the whole stack. From pixel to silicon.
┌─────────────────────────────────────────────────────────────────┐
│ │
│ You don't debug the stack. │
│ You don't observe the stack. │
│ You don't hope the stack works. │
│ │
│ You CONTROL the stack. │
│ │
└─────────────────────────────────────────────────────────────────┘What is This?
Control is an MCP (Model Context Protocol) server that gives AI assistants complete control over the entire software stack — from React components down to silicon.
Not just JavaScript. Not just native code. All of it.
React Component
↓
JavaScript Runtime
↓
TurboModules / JSI
↓
Swift / Objective-C / Kotlin
↓
C / C++
↓
Private APIs (ANE Runtime, Metal, IOKit)
↓
Hardware Instructions
↓
Silicon (ANE / GPU / CPU)
↓
Memory BuffersOne toolchain. Every layer. Full control.
The Layers
react
Inspect the React component tree via Metro DevTools.
react({ method: "status" }) // List debuggable apps
react({ method: "connect" }) // Connect to Metro
react({ method: "tree", maxDepth: 10 }) // Full component tree
react({ method: "find", displayName: "Button" }) // Find components by name
react({ method: "props", componentName: "Header" }) // Get props/state
react({ method: "evaluate", expression: "..." }) // Execute JS in app contextbridge
Verify the native-to-JS boundary (TurboModules).
bridge({ method: "module_list" }) // List all TurboModules with health
bridge({ method: "module_list", status: "broken" }) // Filter by status
bridge({ method: "module_status", name: "MyModule" }) // Detailed module status
bridge({ method: "platform_diff", name: "MyModule" }) // Compare iOS vs Android
bridge({ method: "type_mappings" }) // Show platform type equivalencesnative
Full LLDB integration for native debugging.
// Batch (stateless)
native({ method: "crash_run", binary: "./test" }) // Run and capture crash
native({ method: "memory_read", address: "0x..." }) // Read memory
// Interactive (session-based)
native({ method: "session_attach", binary: "./test" })
native({ method: "breakpoint_set", sessionId: "...", location: "main" })
native({ method: "continue", sessionId: "..." })
native({ method: "backtrace", sessionId: "..." })chrome
Chrome browser inspection via CDP (Chrome DevTools Protocol).
chrome({ method: "status" }) // List tabs, browser version
chrome({ method: "connect" }) // Connect to first tab
chrome({ method: "connect", targetId: "..." }) // Connect to specific tab
chrome({ method: "evaluate", expression: "document.title" })
chrome({ method: "screenshot" }) // Viewport screenshot (base64)
chrome({ method: "screenshot", fullPage: true }) // Full page screenshot
chrome({ method: "dom", selector: "h1" }) // Query DOM elements
chrome({ method: "navigate", url: "https://..." }) // Navigate to URL
chrome({ method: "network" }) // List captured requests
chrome({ method: "console" }) // List captured messages
chrome({ method: "accessibility" }) // Full accessibility treeChrome must be launched with: --remote-debugging-port=9222
device
iOS Simulator and Android Emulator management.
device({ method: "list" }) // List simulators/emulators
device({ method: "boot", deviceId: "...", platform: "ios" })
device({ method: "screenshot", deviceId: "..." })
device({ method: "crash_logs", appName: "MyApp" })
device({ method: "fingerprint" }) // Detect native code changessilicon
Direct hardware control — ANE validation, GPU monitoring.
silicon({ method: "ane_validate", dimensions: [1, 32, 32, 64], dtype: "fp16" })
silicon({ method: "ane_status" }) // ANE compiler state
silicon({ method: "ane_info" }) // Device capabilities
silicon({ method: "gpu_info" }) // GPU cores, Metal support
silicon({ method: "gpu_power" }) // GPU frequency and power state
silicon({ method: "gpu_sample", duration: 5000 }) // GPU power variance analysiskernel
Kernel-level crash analysis.
kernel({ method: "panic_list", limit: 5 }) // List recent kernel panics
kernel({ method: "panic_analyze", path: "/path/to/panic.log" })
kernel({ method: "panic_parse", log: "..." }) // Parse panic log contentdiscover
Reverse engineering and exploration tools.
discover({ method: "discoveries" }) // List known discoveries
discover({ method: "discoveries", target: "ane" }) // Filter by target
discover({ method: "frameworks", filter: "ANE" }) // List private frameworks
discover({ method: "symbols", path: "/System/Library/PrivateFrameworks/..." })Who Is This For?
People building hard things:
- Native modules with C/C++ dependencies
- Embedded databases on mobile
- On-device ML/AI pipelines
- Complex rendering engines
People going where Apple doesn't want you to go:
- Reverse engineering private frameworks
- Using undocumented hardware features
- Pushing beyond documented limits
- Understanding black boxes
People who need AI assistance at every level:
- From "why isn't this component rendering?"
- To "why did this tensor shape panic the kernel?"
Philosophy
Control applies Mill's harm principle to platform restrictions: the same API can be legitimate or illegitimate to restrict depending on context.
Three cases:
| API Type | Local Use | Distribution | |----------|-----------|--------------| | Can harm hardware (ANE compute) | Your right — self-regarding | Apple's restriction is fair | | Cannot harm hardware (read-only) | Your right | Restriction is rent-seeking | | Protects secrets (Secure Enclave) | Off-limits | Off-limits |
We respect locks that protect users. We question locks that protect market position. We accept risk on our own hardware and don't impose it on others.
Principles
- No black boxes — If it runs on your device, you can understand it
- Full stack means full stack — Pixel to silicon, not just React + Node
- Controlled failure is learning — Crashes teach us limits; we turn them into knowledge
- AI at every layer — Help at the kernel level, not just JavaScript
Technical Architecture
Control is built on:
- MCP (Model Context Protocol) — Standard protocol for AI tool use
- LLDB — Native debugging (batch and interactive)
- Chrome DevTools Protocol — Browser and React Native inspection via CDP
- Reverse-engineered APIs — ANE runtime, private frameworks
- Direct hardware access — IOSurface, IOKit, Metal
Control is stateless by design — pure inspection tools with no database.
┌─────────────────────────────────────────────────────────────────┐
│ AI Assistant │
│ (Claude, Cursor, VS Code, etc.) │
├─────────────────────────────────────────────────────────────────┤
│ Control MCP │
│ react | bridge | chrome | native | device | silicon | kernel | discover │
├─────────────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Metro │ │ LLDB │ │ Hardware │ │
│ │ DevTools │ │ Bridge │ │ Probes │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
├─────────────────────────────────────────────────────────────────┤
│ The Device │
│ iOS / macOS / Android / Simulator │
└─────────────────────────────────────────────────────────────────┘Current Status
All layers implemented and working:
| Layer | Methods | Status | |-------|---------|--------| | react | connect, disconnect, status, elements, inspect, tree, find, props, navigation, screen, evaluate | ✅ | | bridge | module_list, module_status, platform_diff, type_mappings | ✅ | | chrome | connect, disconnect, status, select, evaluate, screenshot, navigate, reload, dom, network, console, accessibility | ✅ | | native | crash_run, breakpoint_trace, session_attach, lldb commands | ✅ | | device | list, boot, shutdown, install, launch, logs, screenshot, crash_logs, fingerprint | ✅ | | silicon | ane_validate, ane_status, ane_info, gpu_info, gpu_power, gpu_sample | ✅ | | kernel | panic_parse, panic_list, panic_analyze | ✅ | | discover | discoveries, frameworks, symbols | ✅ |
Getting Started
npm install -g stack-controlAdd to Claude Code (.mcp.json):
{
"mcpServers": {
"control": {
"command": "npx",
"args": ["stack-control"]
}
}
}Then use the tools:
react({ method: "tree" })
bridge({ method: "module_list" })
native({ method: "crash_run", binary: "./test" })Origin Story
This started as debugging tools for Expo/React Native apps. Then we embedded a database on mobile and needed to debug C code. Then we ran ML models on the Neural Engine and found ourselves causing kernel panics.
We weren't debugging React components anymore. We were reverse engineering silicon.
The tools grew to match the work:
- From
devtools_findtolldb.memory_read - From "why won't this render" to "why did the ANE panic at 513 dimensions"
- From JavaScript to assembly
Control is what those tools became. Infrastructure for controlling the entire stack.
The Name
"Control the whole stack. From pixel to silicon."
Not debug. Not observe. Not hope.
Control.
License
MIT
Contributing
See CONTRIBUTING.md.
If you're building something hard — native packages with C dependencies, hardware access, private APIs — we want to hear from you. The goal is to make this kind of work accessible to more people.
Built by humans and AI, working together at every layer of the stack.
