Skip to main content
Glama
Electron Debug MCP Server

Electron Debug MCP Server

by amafjarkasi

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Electron Debug MCP controls and inspects Electron apps over Chrome DevTools Protocol. Start with doctor when the environment is unknown (Electron binary, DISPLAY, sandbox flags, free port sample). Preferred workflow: start_app (inspectMain:true if you will touch main) or find_apps/attach → vision or snapshot → get_console_messages(level=error) → wait_for → click_ax/type_ax or click/hover/type_text → assert_ui. vision is the one-shot look (screenshot, page, console errors, network failures). snapshot is the accessibility tree. Use click_ax/type_ax when you have an accessible name; use CSS click/hover/drag/scroll/type_text otherwise. assert_ui returns pass:false with per-check detail. That is a failed check, not a tool error. For a failed request use get_network_log, then get_response_body with a finished requestId. network_stub fulfills or fails a urlPattern (* wildcard). export_har has no bodies. inspectMain on start_app opens a pinned --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. emulate_network sets offline, latency, and throughput. select_option sets a by value or label. print_pdf writes the page to a PDF. get_downloads must be called before the download (or pass url to start one). It returns savePath. delete_cookie removes a cookie set with set_cookie. file:// pages need an http(s) url or domain for cookies. screenshot/save_screenshot accept selector to clip an element. resume after pause or later screenshots fail. stop_app kills an owned app and only detaches an attached one, then drops the processId. Read electron://server for package version, uptime, and capability counts without calling a tool. Read electron://artifacts for exported screenshots, traces, heap snapshots, and HAR files.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
start_appB

Start an Electron application with remote debugging enabled. Example: {"appPath":"D:/apps/my-electron-app","debugPort":9222}

attachA

Attach to an already-running Electron/Chromium app that was started with --remote-debugging-port. Example: {"debugPort":9222}

attach_by_pidA

Attach to a running Electron app by PID. Resolves the remote-debugging port from process arguments. App must have been started with --remote-debugging-port.

find_appsA

Scan running OS processes for Electron apps. Returns PID, command, and any detected --remote-debugging-port / --inspect ports. Use to find targets for attach or attach_by_pid.

discover_appsA

Scan a local port range (default: 9222-9235) for reachable Chrome DevTools Protocol endpoints. Useful when an app was started with an unknown debug port.

stop_appA

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

list_appsA

List Electron applications managed or attached by this server

diagnoseA

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

doctorA

Local environment health check: package/node/platform, Electron binary, env flags, managed process count, optional free-port sample (localhost bind only)

get_logsA

Get captured stdout/stderr logs for a managed Electron process

get_console_messagesB

Get buffered page console/log/exception messages captured via CDP

list_targetsA

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

evaluateB

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

screenshotB

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

save_screenshotB

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

get_domB

Read documentElement.outerHTML or a specific element's outerHTML

query_selectorB

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

reloadC

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

pauseC

Pause JavaScript execution on a target via Debugger.pause

resumeC

Resume JavaScript execution on a target via Debugger.resume

cdp_commandC

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

page_infoB

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

navigateB

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

wait_forC

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

clickC

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

hoverA

Move the pointer over a CSS selector (mouseover / hover menus). Does not click.

scrollA

Scroll the page or an element. With a selector and no deltas, scrolls that element into view. With deltaY/deltaX, sends a mouse wheel at the element (or the viewport).

dragA

Press on fromSelector, move to toSelector, and release. Also sends an HTML5 drag with text/plain dataTransfer so drop listeners receive the payload. Pass data to override the source text.

type_textC

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

press_keyC

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

set_console_liveA

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

get_cookiesC

Read cookies for the page (optionally filtered by URL)

set_cookieB

Set a cookie on the page (provide url or domain; defaults to current location.href). file:// pages usually reject cookies unless you pass an http(s) url or domain.

delete_cookieB

Delete a cookie by name. Provide url or domain, same as set_cookie. Defaults url to the page location.

get_storageB

Read localStorage or sessionStorage key/value pairs from the page

set_storageB

Write localStorage or sessionStorage entries (optionally clear first)

clear_buffersB

Clear buffered console messages, network events, process logs, ipc, and/or audits

snapshotB

Accessibility tree snapshot (roles/names) via CDP Accessibility.getFullAXTree — agent-friendly UI map

visionB

One-shot app state: screenshot + page_info + recent console errors + network failures + windows

highlightC

Scroll a CSS selector into view and paint a CDP overlay highlight (auto-hides when durationMs > 0)

click_axA

Click an element by accessibility name (optional role). Uses the AX tree, not CSS.

type_axB

Focus an element by accessibility name and insert text (optional clear)

handle_dialogA

Auto accept or dismiss the next JavaScript dialogs (alert/confirm/prompt). clear:true disarms.

assert_uiB

Check url/title/text/selector/console-error budget/expression. Returns pass:false with per-check detail (does not throw on a failed check).

select_optionA

Choose an option in a by value or visible label, then fire input and change.

act_and_verifyB

Composite action & assertion: performs a UI action (click, click_ax, type_text, type_ax), waits for network idle, verifies assertion (assert_ui), and captures a screenshot immediately if assertion fails.

triageA

One-shot crash and failure triage: inspects page state, collects console errors, failed network calls, audit issues, log tail, and resolves the stack trace of the top exception.

save_storage_stateB

Export all page cookies, localStorage, and sessionStorage into a standardized JSON storage state artifact (Playwright-compatible format)

load_storage_stateB

Restore page cookies, localStorage, and sessionStorage from a saved JSON storage state file or payload

fill_formA

Fill multiple input fields (text, password, checkboxes, radio buttons, dropdowns) and optionally submit in a single turn. Supports {{secret:VAR}} resolution and accessibility refs.

repro_bundleB

Package a complete, self-contained repro investigation bundle (screenshot, MHTML DOM archive, HAR network replay, source-mapped stack traces, logs, and system/health info) into a zip artifact.

responsive_theme_matrixA

Run a multi-theme (dark/light) and multi-viewport responsive sweep, verifying UI layout, detecting text clipping/horizontal overflow, and capturing screenshot artifacts.

get_network_logA

Get buffered network request/response events captured via CDP Network domain. Supports optional filtering by tail, status code, failure status, or URL pattern.

get_response_bodyA

Fetch body for a buffered network requestId (call after Network.loadingFinished)

block_urlsB

Block URL patterns via Network.setBlockedURLs (e.g. .analytics.com/)

set_extra_headersC

Set extra HTTP headers for subsequent requests (Network.setExtraHTTPHeaders)

network_stubA

Intercept matching URLs via Fetch and fulfill or fail them. Replaces a rule with the same urlPattern. Pair with clear_network_stubs.

clear_network_stubsB

Disable Fetch interception and drop stub rules for this session

wait_network_idleA

Wait until no network request is in flight and the log has been quiet for idleMs

export_harB

Write the buffered network log as HAR 1.2 JSON (method, URL, status; no bodies). Also exposes the file as an artifact resource.

emulate_networkA

Set the page offline, or slow it with latency and throughput in bytes per second. clear:true restores a normal network. Does not change viewport, user agent, geolocation, or media; use emulate for those.

get_downloadsA

Arm download capture and list files saved by the app. Requires inspectMain. The first call installs a will-download listener that writes into directory (default: OS temp) and suppresses the save dialog. Call it before the download starts, then call again for savePath.

network_failure_reportA

Composite network diagnostics: gathers all failed HTTP requests (status >= 400 or failed requests), fetches response bodies inline, and exports a HAR artifact.

offline_resilience_checkA

Audit how gracefully the Electron app handles network loss, high latency, or HTTP 500 server faults during interactions. Emulates faults, checks for crashes or unhandled rejections, restores network, and computes a Resilience Grade (A-F).

start_tracingB

Start Chrome DevTools Protocol performance tracing (pair with stop_tracing)

stop_tracingA

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

get_performance_metricsC

Renderer Performance.getMetrics (JS heap, layout count, task duration, …)

start_cpu_profileA

Start V8 CPU profiler on a page target (pair with stop_cpu_profile)

stop_cpu_profileA

Stop CPU profiler and write a .cpuprofile JSON file

heap_snapshotB

Take a V8 heap snapshot (.heapsnapshot) for leak investigation

diff_screenshotC

Capture (or compare) a screenshot against a baseline PNG; reports identical + byte similarity

get_audit_issuesB

Buffered Chromium Audits issues (cookie/CORS/mixed-content/deprecations) captured since attach

start_coverageB

Start JS precise coverage (optional CSS rule usage). Pair with stop_coverage.

stop_coverageC

Stop coverage and return JS (and optional CSS) coverage data; optionally write JSON

set_file_inputA

Set files on an via DOM.setFileInputFiles (host paths)

emulateC

Device metrics / UA / geolocation / media emulation (or clear=true to reset)

start_screencastB

Start Page.startScreencast; buffers up to maxFrames (ack frames). Pair with stop_screencast.

stop_screencastA

Stop screencast; optionally write last frame PNG/JPEG to path

set_breakpointC

Debugger.setBreakpointByUrl (0-based lineNumber). Keep debugger enabled while BPs exist.

remove_breakpointC

Debugger.removeBreakpoint by breakpointId from set_breakpoint

resolve_stackB

Resolve stack frames to source snippets (Debugger.getScriptSource / file://)

perf_auditB

Lighthouse-lite: Performance.getMetrics + nav/paint timing + recent Audits issues (not full Lighthouse)

capture_mhtmlC

Save page as MHTML via Page.captureSnapshot. Also registers the file as an artifact resource.

virtual_clockB

Emulation.setVirtualTimePolicy — pause / advance virtual time (use budget when advancing)

print_pdfB

Write the page to a PDF. Uses Page.printToPDF, and falls back to webContents.printToPDF when that method is missing (needs inspectMain). printBackground defaults to true. Also registers as an artifact resource.

perf_snapshotA

Composite performance profiler: coordinates start_tracing + start_cpu_profile + start_coverage, optionally captures an interaction or reload, stops all collectors, and bundles perf audit, metrics, and artifact URIs.

leak_checkA

Memory leak detector: triggers garbage collection, measures baseline DOM and heap counters, repeats an action or wait, runs GC again, and reports retained node/listener/heap growth.

evaluate_mainC

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

main_stateC

Electron main-process nervous system: windows, app paths, versions, metrics (requires inspectMain / node target)

ipc_tapA

Install main-process IPC tap (ipcMain.handle wrap + webContents send/ipc-message). Requires inspectMain.

get_ipc_logB

Drain / read captured IPC entries after ipc_tap. Requires inspectMain.

find_installed_appsA

Scan common install locations for packaged Electron apps (.app / exe / .desktop)

webcontents_topologyA

Map BrowserWindows / webContents (main) to CDP targets. Requires inspectMain.

open_deep_linkA

Emit Electron open-url and second-instance (requires inspectMain). Returns the URL the app recorded and mirrors it to window.DEEP_LINK.

focus_windowA

Bring an Electron BrowserWindow forward (show, focus, moveTop). Requires inspectMain. Omit windowId to use the first window. Pass show:false to focus without showing a hidden window.

get_clipboardA

Read the OS clipboard. Returns text and, when present, imageDataUrl (PNG). Requires inspectMain.

set_clipboardA

Write the OS clipboard. Pass text, imageDataUrl (a data:image/... URL), or both. Requires inspectMain.

set_permissionA

Allow or deny an Electron permission and grant it to the page via Browser.grantPermissions. Returns checked, the page's Notification.permission or equivalent. Requires inspectMain. Unlisted permissions are denied after the handler is installed.

set_window_boundsA

Move or resize a BrowserWindow. Omit a field to leave it unchanged. Requires inspectMain. Does not show a hidden window.

electron_security_auditA

Run security audit against Electron security recommendations (inspects webPreferences, sandbox, nodeIntegration, contextIsolation, setWindowOpenHandler, will-navigate guards, and binary fuses). Requires inspectMain.

ipc_invokeA

Directly invoke a main-process IPC handle channel or emit an IPC event with arguments. Requires inspectMain.

ipc_schema_inferenceA

Infer IPC channel contracts, argument shapes, and generate TypeScript interfaces from captured IPC tap traffic. Requires inspectMain.

mock_electron_apiB

Mock an Electron main-process API (e.g. dialog.showOpenDialog, shell.openExternal, app.getPath) with a custom return value or implementation. Requires inspectMain.

get_mock_callsB

Get recorded invocations and arguments for a mocked Electron API method

restore_electron_mocksB

Restore original implementations of mocked Electron APIs

get_application_menuB

Inspect the native Electron application menu hierarchy, items, roles, accelerators, and enabled states

click_menu_itemC

Trigger a click on a native application menu item by path (e.g. 'File > Open File...'), id, or role

trigger_shortcutC

Trigger an Electron global shortcut accelerator (e.g. 'CommandOrControl+Shift+P')

get_process_healthB

Watchdog health check diagnosing renderer crashes (OOM, killed), window hangs, responsiveness, and process memory

ipc_fuzz_and_verifyB

Fuzz test renderer-to-main IPC channels with boundary and malformed payloads (null, prototype pollution, path traversal, oversized buffers) and verify process crash resistance.

run_scriptA

Advanced server-side step runner & workflow engine: executes an array of tool steps sequentially with templating ({{vars.x}}, {{steps[0].result.x}}, {{secret:KEY}}), conditional branching (if), assertions (expect), automatic retries, diagnostic failure screenshots, and optional export to Playwright test specs.

Prompts

Interactive templates invoked by user choice

NameDescription
debug_blank_windowWorkflow for diagnosing a blank or white Electron window
find_renderer_exceptionWorkflow for finding renderer exceptions and console errors
ui_smoke_checkWorkflow for a quick interactive UI smoke check in an Electron window
attach_and_screenshotFind or attach to an Electron app, then screenshot and collect console errors
vision_then_actAgent loop: vision → snapshot → act → verify (screenshot/diff)
ax_then_assertAgent loop: snapshot → click_ax/type_ax → assert_ui (accessibility-first)

Resources

Contextual data attached and managed by the client

NameDescription
serverServer identity: package version, uptime, Node/platform, capability counts
infoOverview of Electron apps managed by this server
targetsAll CDP targets across running Electron processes
artifactsList of all exported artifacts (screenshots, traces, heapsnapshots, HARs, PDFs)

TDQS

B3.1/5.0

Scored across 111 tools

Disambiguation2/5

Many tools have overlapping boundaries: screenshot/save_screenshot/diff_screenshot, diagnose/doctor/triage/get_process_health/vision all report app health, attach vs attach_by_pid, and find_apps/discover_apps/list_apps/find_installed_apps all hunt for targets. There are also parallel primitive-vs-composite paths (assert_ui vs act_and_verify vs run_script; perf_audit vs perf_snapshot; network_failure_report vs offline_resilience_check vs repro_bundle) that an agent could easily misselect.

Naming Consistency4/5

Almost all names are snake_case and mostly verb_noun (get_dom, set_cookie, click_ax, stop_tracing), which makes the surface scannable. The deviations are bare nouns/verbs like attach, diagnose, doctor, evaluate, screenshot, snapshot, vision, and triage, plus a cluster of *_ax variants, but nothing chaotic.

Tool Count1/5

111 tools is far beyond a well-scoped surface for this purpose; the set spans process management, CDP automation, network stubbing, performance profiling, main-process introspection, and security auditing in one flat namespace. Numerous composite tools duplicate functionality already reachable by pairing primitives.

Completeness5/5

Coverage is exhaustive for Electron debugging: app lifecycle, CDP primitives, DOM/AX interaction, network interception and HAR export, storage/cookies, profiling, heap/leak analysis, main-process inspection, IPC tapping/fuzzing, mocking, and security auditing. The problem is redundancy, not missing operations.

Maintenance

ActivityMaintained
ResponsivenessLimited data