dejank
Captures native Android logs (logcat) from the running app, enabling debugging of runtime errors and device behavior.
Attaches to Expo/React Native apps running in debug mode to inspect the UI, take screenshots, reproduce taps, and gather logs and profiles.
Collects native logs from the iOS Simulator and supports debugging and validation on iOS devices.
Uses the Metro bundler to discover debug targets and connect to the running React Native app for inspection and profiling.
Captures React/JS profiles and component tree data via Fusebox DevTools to diagnose rendering and performance issues.
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., "@dejank Why is the screen slow when I press Load feed?"
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.
Dejank
Give your AI coding agent hands on a live React Native app.
Dejank is an MCP server. Your agent can tap the UI, read the screen, pull native logs, capture React/JS profiles, and save evidence — so it can find bugs, verify fixes, and investigate performance without you switching to DevTools by hand.
You describe what's wrong in plain English. The agent uses Dejank to look at the running app and figure it out.
What you need first
A React Native or Expo app running in debug mode
Metro already started (usually port
8081)A simulator or device with the app open
An AI tool that supports MCP (Cursor, Claude, VS Code, ChatGPT desktop, Windsurf, Antigravity, Gemini CLI, …)
Dejank doesn't start Metro or your app for you — it attaches to what's already running.
Related MCP server: react-native-dev-mcp
Install
1. Add Dejank to your AI tool
From this repo:
pnpm mcp:install-global -- --npxThat writes a dejank MCP server into every client it finds on your machine:
App | Config |
Cursor |
|
Claude Desktop |
|
Claude Code |
|
VS Code / VSCodium |
|
ChatGPT desktop |
|
Windsurf |
|
Antigravity |
|
Gemini CLI |
|
GitHub Copilot (Agent Host) |
|
Warp |
|
Amazon Q / Kiro / LM Studio / Cline / Roo | when their config dirs already exist |
Equivalent Cursor / Claude config:
{
"mcpServers": {
"dejank": {
"command": "npx",
"args": ["-y", "dejank"],
"env": {
"DEJANK_METRO_HOST": "localhost",
"DEJANK_METRO_PORT": "8081"
}
}
}
}VS Code uses the same command, but the top-level key is servers (not mcpServers). ChatGPT desktop on macOS stores MCP in ~/.codex/config.toml under [mcp_servers.dejank].
Developing Dejank itself? Use the local build instead of npm:
pnpm mcp:install-globalFully quit and reopen your AI tools so they reload MCP. In VS Code, use Agent mode in Copilot Chat.
2. Start your app
npx expo start
# open the app on a simulator or deviceMetro should be running (usually on port 8081) before you ask the agent anything.
Try it
Just ask your agent, in plain English:
Reproduce the bug when I tap Submit and tell me what failed.
I fixed the null check — tap Submit again and confirm the error is gone.
Why is the screen slow when I press Load feed?
Show me the UI tree and a screenshot of the current screen.
Pull the last minute of device logs after I tap Retry.
The agent picks the right Dejank tools for the job — no need to know their names.
What it's good for
Goal | Dejank gives the agent |
Fix a bug | UI tree, tap, screenshot, native logs, component tree |
Verify a fix | The same tap/screenshot/logs, repeatable before vs after |
Diagnose slowness | One-shot JS + React profiling around a tap, via |
Check UI state | UI tree + screenshot |
Trace React renders | Component tree and profiler data via Fusebox DevTools |
Catch runtime noise | Android logcat / iOS Simulator logs |
Dejank collects evidence from the live app. Your agent — and you — decide the fix.
Not built yet: dedicated JS console streaming, network inspection, memory/heap profiling. Native device logs often catch JS/runtime errors anyway, since most get printed there too.
How it works
you ask to debug / verify / profile
│
▼
agent calls Dejank (MCP)
│
▼
Dejank attaches to Metro / the app
│
▼
tap · screenshot · logs · JS/React profiles
│
▼
evidence returns to the agent
│
▼
agent explains it, and can patch your codeTools
Tool | Use it for |
| Performance — one-shot JS + React profiling + diagnosis around an optional tap |
| See on-screen controls; reproduce taps by label or coordinates |
| Visual proof for bugs and UI checks |
| Native logs (logcat / iOS Simulator) |
| React component names via Fusebox DevTools |
| Finer-grained JS or React profiling when you need more control |
| Metro debug targets, useful if attaching fails |
| Find recent evidence files |
For "is it slow?" questions, investigate_slow_screen alone is usually enough. For bugs and validation, the agent composes tap + get_ui_tree + take_screenshot + get_device_logs.
Settings
Env var | Meaning | Default |
| Where Metro runs |
|
| Metro port |
|
| Where profiles and screenshots are saved |
|
Developing Dejank itself
pnpm install
pnpm build
pnpm mcp:install-global # local dist/ → Cursor / Claude (use -- --npx for npm)
pnpm mcp # run the server in the foregroundContributor checks:
pnpm validate:m0 # basic attach / capability check
pnpm validate:m3 # injected slow-screen scenarios (sample app + simulator)Historical product notes: docs/SCOPE.md.
License
MIT
Available Tools
16 toolscapture_js_profileA
Capture Hermes JS CPU profile for durationMs; writes artifact under .dejank/artifacts
Inputs: targetId, durationMs.
capture_react_profileC
Capture React Profiler session via Fusebox CDP; writes artifact
Inputs: targetId, profileMs.
get_capabilitiesC
Live capability probes (CDP, profilers, UI). May take 30–60s.
Inputs: host, port, skipInteraction.
get_component_treeC
Best-effort React component display names / renderer info via Fusebox DevTools operations
Inputs: targetId.
get_device_logsD
Native logs — Android logcat / iOS Simulator unified logs
Inputs: clear, filter, maxLines, platform, +1 more.
get_target_infoB
Get details for one Metro CDP target by id
Inputs: id (required), host, port.
get_ui_treeC
Compact UI tree (Android uiautomator / iOS AX)
Inputs: platform.
investigate_slow_screenA
PREFERRED one-shot: profile JS + React around an optional tap, fetch component names, return rule-based diagnosis + artifact paths. Use this instead of chaining start/stop/tap tools when asking why a screen is slow.
Inputs: platform, settleMs, tapLabel, targetId, +1 more.
list_artifactsC
List recent TracePilot evidence artifacts
Inputs: limit.
list_targetsC
List Metro/CDP debug targets for the connected React Native app
Inputs: host, port.
start_js_profileB
Start Hermes JS CPU profiler (pair with stop_js_profile around a repro)
Inputs: targetId.
start_react_profileC
Start React Profiler (Fusebox); pair with stop_react_profile
Inputs: targetId.
stop_js_profileA
Stop JS CPU profiler and save artifact
Inputs: no named parameters.
stop_react_profileA
Stop React Profiler and save profilingData artifact
Inputs: no named parameters.
take_screenshotA
Capture device screenshot (adb / simctl) to .dejank/artifacts
Inputs: platform.
tapB
Tap by label (e.g. "Go to next screen") or x/y
Inputs: x, y, label, platform.
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: target discovery, capability probing, JS/React profiling (start/stop/capture), UI tree, interaction, logs, screenshots, and artifact listing. The profile tools are differentiated by 'js' vs 'react' and 'start/stop/capture', and the high-level investigate_slow_screen is explicitly preferred over chaining, reducing ambiguity.
All tools use snake_case with a verb-first pattern (investigate_, list_, get_, start_, stop_, capture_, take_, tap). The modifiers 'js' vs 'react' and 'profile' are applied uniformly, creating a predictable and readable convention.
16 tools is slightly above the typical 3-15 well-scoped range, but each tool serves a distinct purpose in the performance diagnostic workflow. The redundancy between capture and start/stop pairs is justified by different use cases (fixed-duration vs manual repro), so the count is reasonable if slightly heavy.
The tool set covers the full diagnostic lifecycle: target discovery, capability probing, JS and React profiling, UI tree inspection, interaction, device logs, screenshots, and artifact management. The one-shot investigate_slow_screen provides a high-level entry point, while the granular tools allow manual control, leaving no obvious gaps for the stated purpose.
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Let your AI agent control real iPhones: screenshots, tap, swipe, type and open apps.
Mobile sandboxes for AI agents: each agent gets its own cloud Android phone or iOS simulator over MCP, reads the screen, taps, types and installs your app. Android $0.01/min, iOS $0.03/min, parked phones free.
Give an AI agent an iPhone to see, tap and type on over MCP. Free early access (Simulator).
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that lets AI agents control iOS and Android devices (tap, scroll, type, take screenshots, read UI trees, and run code). Works with multiple devices at the same time.100 npm54MIT
- AlicenseAqualityCmaintenanceMCP server that gives AI coding agents hands, eyes and a mechanic's ear for React Native development.914 npm2MIT
- AlicenseBqualityDmaintenanceEnables AI agents to inspect, log, and control React Native apps on Android emulators or iOS simulators, including UI tree, tap, scroll, and hot reload.2246 npm5MIT
- AlicenseAqualityNot gradedmaintenanceAn MCP server that lets an AI agent drive the iOS Simulator in a loop, enabling tapping, typing, swiping, reading the screen via the accessibility tree, and verifying app state.14MIT