1. Conduid
  2. Developer Tools
  3. Electron MCP Server
MCP server · Developer Tools

Electron MCP Server

MCP server for debugging Electron apps via Chrome DevTools Protocol. Start/attach processes, capture screenshots, read console errors & network logs, inspect DOM, evaluate JS, and automate UI — built for Cursor and other MCP clients.

Unclaimed ISC devtools
51Fair

Scored 11 days ago · breakdown

About Electron MCP Server

Electron MCP Server is an MCP server published by amafjarkasi in the Developer Tools category: mCP server for debugging Electron apps via Chrome DevTools Protocol. Start/attach processes, capture screenshots, read console errors & network logs, inspect DOM, evaluate JS, and automate UI — built for Cursor and other MCP clients.

The repository has 91 stars and 23 forks, with the last commit 5 days ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/amafjarkasi/electron-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (36)

attachAttach to an already-running Electron/Chromium app that was started with --remote-debugging-port. Example: {

Parameters not published.

attach_by_pidAttach to a running Electron app by OS process id (resolves --remote-debugging-port from the process command line)

Parameters not published.

cdp_commandExecute an arbitrary Chrome DevTools Protocol method on a target (Domain.method)

Parameters not published.

clear_buffersClear buffered console messages, network events, and/or process logs

Parameters not published.

clickClick the center of a CSS selector via CDP Input.dispatchMouseEvent

Parameters not published.

diagnoseSummarize process health: debug port reachability, target roles (page/worker/browser), recent console errors, and discovered local debug ports

Parameters not published.

discover_appsScan local ports for Electron/Chromium instances exposing Chrome DevTools Protocol

Parameters not published.

evaluateEvaluate JavaScript in an Electron target via CDP Runtime.evaluate. Defaults to the first page/renderer target.

Parameters not published.

evaluate_mainEvaluate JavaScript in the Electron main/node CDP target (use start_app with inspectMain:true for best results)

Parameters not published.

find_appsFind running Electron processes on this machine (PID, command, debugPort if present in argv)

Parameters not published.

Show all 36 tools
get_console_messagesGet buffered page console/log/exception messages captured via CDP

Parameters not published.

get_cookiesRead cookies for the page (optionally filtered by URL)

Parameters not published.

get_domRead documentElement.outerHTML or a specific element

Parameters not published.

get_logsGet captured stdout/stderr logs for a managed Electron process

Parameters not published.

get_network_logGet buffered network request/response events captured via CDP Network domain

Parameters not published.

get_storageRead localStorage or sessionStorage key/value pairs from the page

Parameters not published.

list_appsList Electron applications managed or attached by this server

Parameters not published.

list_targetsList Chrome DevTools Protocol targets with role classification (page/worker/browser/other)

Parameters not published.

navigateNavigate a page target to a URL (Page.navigate) and optionally wait for load

Parameters not published.

page_infoGet URL, title, readyState, and userAgent for a page target

Parameters not published.

pausePause JavaScript execution on a target via Debugger.pause

Parameters not published.

press_keyPress a key or shortcut (Enter, Escape, Tab, Arrow*, or a character) with optional modifiers

Parameters not published.

query_selectorQuery DOM nodes with document.querySelectorAll and return tag/id/class/text summary

Parameters not published.

reloadReload a page target (or all page targets) in an Electron app

Parameters not published.

resumeResume JavaScript execution on a target via Debugger.resume

Parameters not published.

save_screenshotCapture a screenshot and write it to a local file path (PNG/JPEG); optional selector clips to element

Parameters not published.

screenshotCapture a PNG/JPEG screenshot of a page target via Page.captureScreenshot (optional CSS selector clips to element bounds)

Parameters not published.

set_console_liveEnable/disable live MCP log notifications for console events (all levels when enabled; errors always notify)

Parameters not published.

set_cookieSet a cookie on the page (provide url or domain; defaults to current location.href)

Parameters not published.

set_storageWrite localStorage or sessionStorage entries (optionally clear first)

Parameters not published.

start_appStart an Electron application with remote debugging enabled. Example: {

Parameters not published.

start_tracingStart Chrome DevTools Protocol performance tracing (pair with stop_tracing)

Parameters not published.

stop_appStop a process started by start_app, or detach bookkeeping for an attached session

Parameters not published.

stop_tracingStop CDP tracing and write a JSON trace file (open in chrome://tracing)

Parameters not published.

type_textType text into the focused element (optionally click a selector first)

Parameters not published.

wait_forWait until a selector exists/hides/enables, text/URL/console matches, or node count is met

Parameters not published.

Ask AI

✦

Ask AI about Electron MCP Server

Powered by Claude · Grounded in docs

I know everything about Electron MCP Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v1.9.4v1.9.4
v1.9.3v1.9.3
v1.9.2v1.9.2
v1.9.1v1.9.1
v1.9.0v1.9.0

README

An agent that can only read your repo cannot see an Electron window. This server is that debugger. It runs locally, speaks MCP over stdio, and drives the app through the Chrome DevTools Protocol.

You add it to Cursor or Claude and ask in normal language. The client shows the agent every tool and its arguments. This page is the map of what those tools are for.

Changelog

Full history, including 1.6 and 1.5, is in CHANGELOG.md on GitHub. The same file ships in the npm package.

Version What landed
1.10.0 emulate_network, select_option, set_window_bounds, and print_pdf. 88 tools.
1.9.4 set_permission is visible to the page as granted. Clipboard reads and writes PNG. drag delivers dataTransfer.
1.9.3 Transparent logo, and a See / Drive / Inspect header so the npm page is not a bare list.
1.9.2 Changelog section on the README, linked to this file on GitHub.
1.9.1 README layout fix for the npm page: no empty table rows.
1.9.0 delete_cookie, hover, scroll, drag, focus_window, clipboard, get_downloads, set_permission. Prompts start from vision and assert_ui.
1.8.0 click_ax / type_ax, network stub, HAR, assert_ui, dialogs, deep links.
1.7.0 Coverage, file input, emulation, screencast, breakpoints, MHTML, virtual clock, window topology.
1.6.0 vision, snapshot, response bodies, CPU profile, heap snapshot, IPC tap, screenshot diff.

What you can ask it to do

Job What happens
Explain a blank or crashed window Screenshot, console errors, exceptions, and the process log
Check that a button or form works Wait for the control, click or type, then assert the result
See why a request failed Network log, response body, or a stubbed URL
Catch a visual regression Compare the window to a PNG baseline
Inspect main-process or IPC bugs Window list, main-process JavaScript, IPC log, deep links
Debug an app that is already open Find its PID or debug port and attach, without killing it
Investigate a slow or leaky screen Trace, CPU profile, heap snapshot, coverage, or a short audit
Window, clipboard, or a download Focus a window, read or write clipboard text, report the saved path
Scroll, drag, or a permission prompt Scroll into view, drag between two elements, allow or deny camera, notifications, and geolocation

Examples you can type:

  • “Start D:/apps/my-app and tell me if the window is blank.”
  • “Click Go, type Ada in the name field, and tell me if the status says saved.”
  • “What failed on the network, and what did the response body say?”
  • “Attach to the Electron app I already launched and screenshot it.”
  • “Profile the settings screen, then save a heap snapshot.”

Install

Cursor and Claude should spawn the process. Running it in a terminal looks idle because it is waiting on stdio.

{
  "mcpServers": {
    "electron-debug": {
      "command": "npx",
      "args": ["-y", "electron-debug-mcp"],
      "env": {
        "ELECTRON_MCP_NO_SANDBOX": "1"
      }
    }
  }
}

Claude Desktop config files:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

From a clone, build once and point command at node with the absolute path to build/index.js. Templates live in the repo under examples/.

npm install
npm run build

electron is an optional dependency. Attach-only installs can use npm install --omit=optional. On Windows, if npm skips postinstall, run scripts/fix-electron.cmd. Requires Node 18 or newer.

How a session works

start_app launches your app with a DevTools port. find_apps reads Electron PIDs from the process list. discover_apps probes local ports. attach and attach_by_pid join an app that is already running.

The reply includes an id, usually electron-…. Later calls pass that id as processId.

stop_app kills a process this server started. On an attached session it only detaches. Either way the session leaves list_apps.

Pass inspectMain: true when the bug is in the main process. That opens a separate --inspect port. These tools need it: evaluate_main, main_state, ipc_tap, get_ipc_log, webcontents_topology, open_deep_link, focus_window, set_window_bounds, get_clipboard, set_clipboard, get_downloads, set_permission.

Page targets keep console, network, and audit events buffered between calls.

Start, look, act, check

{ "appPath": "/path/to/your-app", "inspectMain": true }

start_app returns id. Use it as processId.

vision returns a screenshot plus the page URL, console errors, and failed requests. snapshot returns the accessibility tree when a CSS selector is the wrong handle.

{ "processId": "electron-…", "name": "Submit", "role": "button" }
{ "processId": "electron-…", "textIncludes": "Saved", "maxConsoleErrors": 0 }

click_ax clicks the button named Submit. assert_ui returns pass: true or pass: false with one line per check. A failed check is not a crashed tool.

get_network_log lists requests. get_response_body needs a finished requestId from that log. network_stub fulfills or fails a URL pattern. stop_app removes the session.

doctor is the first call when the environment itself is suspect: missing Electron binary, no display, sandbox flags.

Tools

Connect

Tool What it does
start_app Launch with remote debugging. inspectMain adds the main-process target.
attach Join an existing --remote-debugging-port.
attach_by_pid Resolve that port from a main-process PID.
find_apps Electron PIDs plus debug and inspect ports from argv.
discover_apps Probe a local CDP port range (9222–9235 by default).
find_installed_apps Packaged apps under Applications, Program Files, and .desktop files.
list_apps Sessions this server owns or has attached.
stop_app Kill an owned process, or detach an attached one.
diagnose Port, target roles, recent console errors.
doctor This machine: Node, Electron binary, env flags, free port.

See

Tool What it does
vision Screenshot plus page, console errors, and network failures.
snapshot Accessibility tree (role and name).
screenshot PNG or JPEG. selector clips to an element. Returns an image.
save_screenshot Same capture, written to a file.
diff_screenshot Compare a PNG baseline. Reports identical and byte similarity.
highlight Scroll a selector into view and paint a DevTools overlay.
get_dom outerHTML for the document or one selector.
query_selector Tag, id, class, and text for matches.
page_info URL, title, readyState, userAgent.
list_targets DevTools targets with role: page, worker, browser, other.
webcontents_topology BrowserWindow and webContents mapped to DevTools targets. Needs inspectMain.

Act

Tool What it does
navigate Go to a URL, then optionally wait for load.
reload Page targets only. Never the Node inspect target.
wait_for Selector, hidden, enabled, text, URL, console text, or node count.
click Click the center of a CSS selector.
hover Move the pointer over a selector. Does not click.
scroll Wheel the page or an element. A selector and no deltas scrolls it into view.
drag Press, move, and release. Also delivers text/plain on dataTransfer so HTML5 drop listeners see the payload.
select_option Choose a <select> option by value or visible label.
click_ax Click by accessibility name and optional role.
type_text Insert text. Optional focus, clear, and Enter.
type_ax Focus by accessibility name, then insert text.
press_key Key or shortcut, with modifiers.
set_file_input Set files on <input type="file">.
handle_dialog Auto accept or dismiss the next alert, confirm, or prompt.
assert_ui URL, title, text, selector, expression, console-error budget. Failed checks return pass: false.
open_deep_link Emit open-url and second-instance. Needs inspectMain.
pause / resume Pause JavaScript. resume then disables the debugger so screenshots and input work again.

Page state

Tool What it does
evaluate JavaScript in a page, worker, or browser target.
evaluate_main JavaScript in the main process. Needs inspectMain.
main_state Windows, app paths, versions, metrics. Needs inspectMain.
get_console_messages Buffered console, log, and exceptions.
set_console_live Also stream non-error console lines as MCP logs. Errors always notify.
get_logs Process stdout and stderr.
get_cookies / set_cookie Read or write cookies. file:// pages usually need an explicit http(s) url or domain.
delete_cookie Remove a cookie by name. Same url or domain rules as set_cookie.
get_clipboard / set_clipboard OS clipboard text and PNG (imageDataUrl). Needs inspectMain.
get_storage / set_storage localStorage or sessionStorage.
clear_buffers Drop console, network, logs, ipc, and audit buffers.

Network

Tool What it does
get_network_log Buffered request and response events.
get_response_body Body for a requestId after the response finishes.
export_har HAR 1.2 from that buffer. No bodies.
block_urls Block URL patterns.
set_extra_headers Extra headers on later requests.
network_stub Fulfill or fail URLs that match a pattern. The same pattern replaces the previous rule.
clear_network_stubs Turn request interception off.
wait_network_idle Wait until nothing is in flight and the log has been quiet.
get_downloads Save downloads from every webContents session and return savePath. Call it before the download, or pass url to start one. Needs inspectMain.
emulate_network Go offline, or add latency and cap throughput. clear restores a normal network.

Profile

Tool What it does
get_performance_metrics Renderer performance counters.
perf_audit Metrics, navigation and paint timing, recent audit issues. Not full Lighthouse.
get_audit_issues Buffered audit issues: cookies, CORS, mixed content, deprecations.
start_tracing / stop_tracing One trace per session. Open the JSON in chrome://tracing or Perfetto.
start_cpu_profile / stop_cpu_profile V8 .cpuprofile.
heap_snapshot V8 .heapsnapshot.
start_coverage / stop_coverage Precise JS coverage, optional CSS.
emulate Viewport, user agent, geolocation, media. clear resets.
virtual_clock Pause or advance virtual time.
start_screencast / stop_screencast Bounded frame buffer. Stop can write the last frame.
capture_mhtml Save the page as MHTML.
print_pdf Write the page to a PDF. Uses Page.printToPDF, or webContents.printToPDF when that method is missing.
set_breakpoint / remove_breakpoint Break on a script URL and line.
resolve_stack Map stack frames to source snippets.

Main process

Tool What it does
ipc_tap / get_ipc_log Record IPC in the main process, then read it. Needs inspectMain.
focus_window Show and focus a window. windowId comes from webcontents_topology. show: false skips showing a hidden window. Needs inspectMain.
set_window_bounds Move or resize a window. Omitted fields stay as they are. Does not show a hidden window. Needs inspectMain.
set_permission Allow or deny a permission prompt and grant it in the page (checked: "granted"). Unlisted permissions are denied after this is installed. Needs inspectMain.
cdp_command Any DevTools Domain.method the wrappers above do not cover.

Prompts

Prompt When
debug_blank_window White or blank window. Starts from vision.
find_renderer_exception Console errors and exceptions.
ui_smoke_check Wait, interact, then assert_ui.
attach_and_screenshot Find or attach, then vision and console errors.
vision_then_act vision, then snapshot, act, verify.
ax_then_assert snapshot, then click_ax / type_ax, then assert_ui.

Resources

URI What
electron://server Version, uptime, platform, capability counts.
electron://info Managed processes.
electron://targets DevTools targets.
electron://process/{id} One session, including recent errors.
electron://logs/{id} stdout and stderr.
electron://console/{id} Buffered console.
electron://cdp/{processId}/{targetId} One target.

Configuration

Variable Effect
ELECTRON_PATH Use this Electron binary.
ELECTRON_MCP_NO_SANDBOX=1 Always pass --no-sandbox. Also applied when CI=true or Linux has no DISPLAY.
ELECTRON_MCP_ALLOWED_ROOTS ; or | separated allowlist for start_app paths. Unset means unrestricted.
ELECTRON_MCP_OUTPUT_ROOTS Allowlist for screenshot, trace, profile, and heap paths. The sensitive-path blocklist still applies.
ELECTRON_MIRROR Mirror for the Electron zip.
ELECTRON_CACHE Zip cache directory.
$env:ELECTRON_MCP_ALLOWED_ROOTS="D:\apps;D:\src"

Screenshot and trace writes are rejected under credential and system roots (~/.ssh, ~/.aws, ~/.gnupg, ~/.kube, ~/.docker, /etc, /proc, /usr, /root, C:\Windows, C:\Program Files, and similar). Existing ancestors are resolved so macOS /tmp → /private/tmp still matches.

Security

This is a local debugger. It can start binaries, evaluate JavaScript, and read page content, cookies, storage, and network bodies. Set ELECTRON_MCP_ALLOWED_ROOTS on a shared machine. Attach only to apps you trust. Do not expose stdio on an open network. Buffers and exported traces can contain secrets from the app under test.

Troubleshooting

Symptom What to do
Electron failed to install correctly npm run ensure-electron, or scripts/fix-electron.cmd on Windows.
allowScripts warning Expected on newer npm. Run the ensure script.
Terminal hangs on node build/index.js The process is waiting for an MCP client. Configure Cursor or Claude to spawn it.
Main-process tools fail Restart with inspectMain: true. That covers evaluate_main, main_state, ipc_tap, get_ipc_log, webcontents_topology, open_deep_link, focus_window, set_window_bounds, clipboard, get_downloads, and set_permission.
Screenshot fails after pause Call resume. It disables the debugger.
set_cookie fails on file:// Pass an http(s) url or domain.
wait_for or click cannot find the node Wait for it, then screenshot.
get_response_body fails Use a requestId from a finished response.
start_app path rejected The path is outside ELECTRON_MCP_ALLOWED_ROOTS.
Output path rejected Avoid home credential dirs and system dirs, or set ELECTRON_MCP_OUTPUT_ROOTS.
attach_by_pid cannot find a port The app must have been started with --remote-debugging-port. Check find_apps.
list_apps empty after stop Expected. Stopped sessions are removed.
Linux headless ELECTRON_MCP_NO_SANDBOX=1 and a display such as Xvfb.
Empty trace Call start_tracing before the slow path. One trace at a time.

Develop

npm test

That builds, runs unit tests, and runs the MCP smoke test against fixtures/minimal-electron-app. CI runs the same suite on Ubuntu (Xvfb), Windows, and macOS.

Script What it does
npm run ensure-electron Download or repair the Electron binary.
npm run build Compile TypeScript to build/.
npm start Run the server on stdio.
npm run doctor Build, then call doctor and read electron://server.
npm run pack:check npm pack --dry-run.

src/index.ts wires the server and the stdio transport. src/tools/ registers each group: connect, page, network, profile, main, prompts, and resources. src/process-manager.ts owns sessions and DevTools. src/power-tools.ts holds the higher-level helpers. Logs go to stderr so stdout stays clean for JSON-RPC.

The npm package contains build/, assets/, this README, LICENSE, and CHANGELOG.md.

License

ISC

README fetched from the repository 4 days ago. The original is authoritative.

Questions

About Electron MCP Server

How do I install Electron MCP Server?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Electron MCP Server safe to use with an AI agent?

Its trust score is 51 out of 100 (fair). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Electron MCP Server still maintained?

Yes — the last commit was 5 days ago. The repository has 91 stars and 23 forks.