mcp-electron-driver
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| start_appA | Launch an Electron app via Playwright. Must be called before any other driving tool. Pass the absolute path to the compiled main process entry (e.g. out/main/index.js). Wipes the screenshots directory on each fresh start. Detects the single-instance-lock failure mode and gives a helpful hint. |
| stop_appA | Close the running Electron app cleanly. Safe to call even if no app is running. |
| infoA | Get current window title, URL, viewport size (populated from window.innerWidth/innerHeight), uptime, and devicePixelRatio. |
| snapshotA | Return a structured text representation of the visible page with numbered refs. Each interactive or labelled element gets a [ref] number that can be passed to click, type, hover, get_text, and other tools instead of a selector — eliminating selector-guessing round-trips. Call this FIRST before interacting with a page to see what is on screen. The snapshot is an accessibility-tree-based representation similar to Playwright MCP's browser_snapshot. |
| screenshotA | Capture a full-page PNG of the current window. Returns the absolute path. Pass |
| cleanup_screenshotsA | Delete all screenshots from the current session directory. Useful between test phases to keep storage tidy. |
| clickA | Click an element. Pass |
| typeA | Fill a text input, REPLACING existing content. Pass |
| keyboard_typeA | Type a literal string as real keyboard events. Unlike |
| pressB | Press a keyboard key or chord in the window. Examples: "Escape", "Enter", "Control+S", "Shift+Tab", "Control+Shift+P". |
| press_sequenceA | Alias for keyboard_type with no focus selector. Types a literal string into the currently focused element as keyboard events. Kept for backwards compatibility. |
| hoverA | Hover the mouse over an element. Pass |
| dragA | Drag from one point to another using real Chromium input events (via Playwright's CDP mouse pipeline). Because these are trusted browser events, they automatically generate matching PointerEvents — so React |
| waitA | Pause for N milliseconds. Prefer wait_for_selector or wait_for when possible. |
| wait_for_selectorA | Wait until an element matching a selector appears (or reaches a given state: attached/detached/visible/hidden). Returns element count and the bounding box of the first match so you do not need a follow-up eval. Honours timeoutMs (default 5000). |
| wait_forA | Poll a JavaScript predicate in the renderer until it returns truthy, then return its value. The predicate is a function body; use |
| existsA | Fast check for whether any element matches, plus the count. Pass |
| get_attributeB | Read an attribute from the first matching element. Pass |
| get_valueC | Read the current value of a form input, textarea, or select. Pass |
| get_bboxB | Get the bounding box of the first matching element in CSS pixels. Pass |
| get_computed_styleA | Read computed CSS property values from the first element matching a selector. Returns { exists, styles } where styles is an object mapping each requested property to its computed value. Example properties: "background-color", "font-family", "display". |
| elements_listA | Enumerate elements matching a selector, returning basic info about each (tag, text snippet, id, key attributes, bounding box). Great for "what buttons are on this screen" or "give me all list items". Capped at 50 by default. |
| focused_elementA | Return information about the currently focused element: tag, id, classes, text snippet, and bounding box. Returns { focused: false } if nothing meaningful has focus (document.body). |
| clear_inputB | Clear the value of an input or textarea matching a selector. Equivalent to selecting all and deleting. |
| select_optionA | Select an option in a dropdown. Pass |
| checkA | Check a checkbox or radio button matching a selector. No-op if already checked. |
| uncheckA | Uncheck a checkbox matching a selector. No-op if already unchecked. |
| scrollA | Scroll an element (if selector is given) or the window (if not). Pass |
| scroll_into_viewA | Scroll the first element matching a selector into view if needed. Safe to call even if the element is already visible. |
| set_input_filesA | Set files on an without triggering the native file picker. This is the CORRECT way to test file upload UI in Electron — much more reliable than drop_file. Pass one or more absolute file paths. |
| accessibility_snapshotA | Capture the accessibility tree of the current page as JSON. Useful for testing screen-reader behaviour, finding elements by role, or auditing for missing ARIA labels. Optionally pass |
| windows_listA | List every BrowserWindow the app has open, with title, URL, id, and whether it is focused/minimized/maximized. For single-window apps this returns one entry. |
| switch_windowA | Make a different BrowserWindow the "current" one that subsequent tools drive. Pass |
| dialog_handlerA | Install an auto-responder for JavaScript dialogs (alert/confirm/prompt/beforeunload). Once set, the next dialog(s) will be auto-accepted or dismissed without a human. Pass |
| get_textA | Read the text content of the first matching element. Pass |
| eval_rendererA | Evaluate JavaScript in the renderer (page) context. Pass a FUNCTION BODY — use |
| eval_mainA | Evaluate JavaScript in the Electron main process. Pass a FUNCTION BODY — use |
| console_logsA | Return recent console messages captured since the app started. Includes renderer console (log/info/warn/error/debug) and main-process stdout/stderr. Pass |
| drop_fileA | Simulate dropping a file onto a target element by dispatching synthetic drag/drop events with a DataTransfer containing the file contents. Works for apps that read File via web APIs (FileReader, File.text, etc.). Does NOT populate file.path — apps that rely on webUtils.getPathForFile() or legacy file.path must use eval_main to invoke their IPC directly. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mesomya/electron-driver'
If you have feedback or need assistance with the MCP directory API, please join our Discord server