Skip to main content
Glama
README.md
# electronjs-desktop-mcp-tool

[![CI](https://github.com/ks-rdz-07/electronjs-desktop-mcp-tool/actions/workflows/ci.yml/badge.svg)](https://github.com/ks-rdz-07/electronjs-desktop-mcp-tool/actions/workflows/ci.yml)
[![CodeQL](https://github.com/ks-rdz-07/electronjs-desktop-mcp-tool/actions/workflows/codeql.yml/badge.svg)](https://github.com/ks-rdz-07/electronjs-desktop-mcp-tool/actions/workflows/codeql.yml)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/ks-rdz-07/electronjs-desktop-mcp-tool/badge)](https://scorecard.dev/viewer/?uri=github.com/ks-rdz-07/electronjs-desktop-mcp-tool)
[![npm version](https://img.shields.io/npm/v/@ks-rdz-07/electronjs-desktop-mcp-tool?logo=npm)](https://www.npmjs.com/package/@ks-rdz-07/electronjs-desktop-mcp-tool)
[![npm downloads](https://img.shields.io/npm/dm/@ks-rdz-07/electronjs-desktop-mcp-tool)](https://www.npmjs.com/package/@ks-rdz-07/electronjs-desktop-mcp-tool)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Node.js](https://img.shields.io/badge/node-%3E%3D20.11-339933?logo=node.js&logoColor=white)](https://nodejs.org)
[![Electron](https://img.shields.io/badge/electron-up%20to%2045-47848F?logo=electron&logoColor=white)](https://www.electronjs.org)
[![MCP](https://img.shields.io/badge/MCP-stdio%20server-8A2BE2)](https://modelcontextprotocol.io)
[![Runtime deps: 0](https://img.shields.io/badge/runtime%20deps-0-brightgreen)](package.json)
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)

[![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=electronjs-desktop-mcp-tool&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBrcy1yZHotMDcvZWxlY3Ryb25qcy1kZXNrdG9wLW1jcC10b29sIl19)
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=electronjs-desktop-mcp-tool&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40ks-rdz-07%2Felectronjs-desktop-mcp-tool%22%5D%7D)
[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=electronjs-desktop-mcp-tool&quality=insiders&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40ks-rdz-07%2Felectronjs-desktop-mcp-tool%22%5D%7D)

A [Model Context Protocol](https://modelcontextprotocol.io) server that lets an AI agent run, see, drive and debug Electron apps, and review Electron code for security and upgrade problems.

- **Runtime tools (111):** start or attach to a running Electron app over the Chrome DevTools Protocol, then look at it (screenshot, accessibility snapshot, DOM), drive it (click, type, keys, drag), run JavaScript in the renderer or main process, and read console, network, IPC and performance data.
- **Knowledge and audit tools (18, `electron_*`):** audit `BrowserWindow` options, preload and IPC code for security problems, scaffold IPC channels and preload bridges, generate CSP and fuses config, diagnose build errors, and produce version migration checklists. These are pure functions over the text you pass in. They never touch an app, a file or the network.

One stdio server, one binary (`electronjs-desktop-mcp-tool`), bundled into a single file with no runtime dependencies. Electron itself is optional and is never downloaded at install time.

## Contents

- [Requirements](#requirements)
- [Install](#install)
- [Add to your AI client](#add-to-your-ai-client)
- [Electron binary](#electron-binary)
- [Quick start](#quick-start)
- [Configuration](#configuration)
- [Security notes](#security-notes)
- [Tools](#tools)
- [Development](#development)
- [Contributing](#contributing)
- [Security policy](#security-policy)
- [License](#license)

## Requirements

- Node.js 20.11 or newer (tested on 20 and 22)
- For `start_app`: an Electron binary (see [Electron binary](#electron-binary)). Attaching to an app that is already running needs no Electron install.

## Install

Published on npm as [`@ks-rdz-07/electronjs-desktop-mcp-tool`](https://www.npmjs.com/package/@ks-rdz-07/electronjs-desktop-mcp-tool).

**Option 1: npx (no install)**

```sh
npx -y @ks-rdz-07/electronjs-desktop-mcp-tool
```

npx downloads the package on first run and caches it. To pin a version, use `@ks-rdz-07/electronjs-desktop-mcp-tool@1.0.2`.

**Option 2: global install**

```sh
npm install -g @ks-rdz-07/electronjs-desktop-mcp-tool
electronjs-desktop-mcp-tool --version
```

Then use `electronjs-desktop-mcp-tool` as the command in your client config.

**Option 3: local clone, run with plain node**

```sh
git clone https://github.com/ks-rdz-07/electronjs-desktop-mcp-tool.git
node electronjs-desktop-mcp-tool/dist/index.js --version
```

`dist/index.js` is committed and has no dependencies, so `npm install` is not needed just to run it. This form is the most reliable on Windows because it does not go through `npx` or a `.cmd` shim.

## Add to your AI client

Every client below starts the same command. Pick the form that fits:

| Form | `command` | `args` |
|---|---|---|
| npx (macOS / Linux) | `npx` | `["-y", "@ks-rdz-07/electronjs-desktop-mcp-tool"]` |
| npx (Windows) | `cmd` | `["/c", "npx", "-y", "@ks-rdz-07/electronjs-desktop-mcp-tool"]` |
| global install | `electronjs-desktop-mcp-tool` (Windows: `cmd` with `["/c", "electronjs-desktop-mcp-tool"]`) | `[]` |
| local clone (any OS) | `node` | `["/path/to/electronjs-desktop-mcp-tool/dist/index.js"]` |

> **Windows:** most clients cannot spawn `npx.cmd` directly. Use the `cmd /c` form or the local clone form. The examples below use the macOS / Linux npx form; swap in the Windows row where needed.

Most JSON-config clients take this block (only the file differs):

```json
{
  "mcpServers": {
    "electronjs-desktop-mcp-tool": {
      "command": "npx",
      "args": ["-y", "@ks-rdz-07/electronjs-desktop-mcp-tool"]
    }
  }
}
```

<details>
<summary><b>Claude Code</b></summary>

```sh
claude mcp add -s user electronjs-desktop-mcp-tool -- npx -y @ks-rdz-07/electronjs-desktop-mcp-tool
```

Windows (PowerShell or `cmd.exe`):

```powershell
claude mcp add -s user electronjs-desktop-mcp-tool -- cmd /c npx -y @ks-rdz-07/electronjs-desktop-mcp-tool
# or, after cloning to C:\tools\electronjs-desktop-mcp-tool
claude mcp add -s user electronjs-desktop-mcp-tool -- node C:\tools\electronjs-desktop-mcp-tool\dist\index.js
```

From Git Bash, prefix with `MSYS_NO_PATHCONV=1`, otherwise Git Bash rewrites `/c` to `C:/` and the server will not start:

```sh
MSYS_NO_PATHCONV=1 claude mcp add -s user electronjs-desktop-mcp-tool -- cmd /c npx -y @ks-rdz-07/electronjs-desktop-mcp-tool
```

Use `-s project` instead of `-s user` to write a shared `.mcp.json` in the repo. Check with `claude mcp list` (it should show `electronjs-desktop-mcp-tool: ... - Connected`).

</details>

<details>
<summary><b>Claude Desktop</b></summary>

Settings → Developer → Edit Config, or edit the file directly:

- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`

Add the `mcpServers` block above and restart Claude Desktop.

</details>

<details>
<summary><b>Cursor</b></summary>

Click **Install in Cursor** at the top, or add the `mcpServers` block to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project).

</details>

<details>
<summary><b>VS Code (GitHub Copilot agent mode)</b></summary>

Click **Install in VS Code** at the top, or run:

```sh
code --add-mcp '{"name":"electronjs-desktop-mcp-tool","command":"npx","args":["-y","@ks-rdz-07/electronjs-desktop-mcp-tool"]}'
```

Or add it to `.vscode/mcp.json` in the workspace (note the `servers` key):

```json
{
  "servers": {
    "electronjs-desktop-mcp-tool": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@ks-rdz-07/electronjs-desktop-mcp-tool"]
    }
  }
}
```

</details>

<details>
<summary><b>Windsurf</b></summary>

Add the `mcpServers` block to `~/.codeium/windsurf/mcp_config.json`, then press refresh in the Cascade MCP panel.

</details>

<details>
<summary><b>OpenAI Codex CLI</b></summary>

```sh
codex mcp add electronjs-desktop-mcp-tool -- npx -y @ks-rdz-07/electronjs-desktop-mcp-tool
```

Or in `~/.codex/config.toml`:

```toml
[mcp_servers.electronjs-desktop-mcp-tool]
command = "npx"
args = ["-y", "@ks-rdz-07/electronjs-desktop-mcp-tool"]
```

</details>

<details>
<summary><b>Gemini CLI</b></summary>

```sh
gemini mcp add -s user electronjs-desktop-mcp-tool -- npx -y @ks-rdz-07/electronjs-desktop-mcp-tool
```

Or add the `mcpServers` block to `~/.gemini/settings.json` (or `.gemini/settings.json` in a project).

</details>

<details>
<summary><b>GitHub Copilot CLI</b></summary>

Run `/mcp add` inside `copilot`, or add to `~/.copilot/mcp-config.json`:

```json
{
  "mcpServers": {
    "electronjs-desktop-mcp-tool": {
      "type": "local",
      "command": "npx",
      "args": ["-y", "@ks-rdz-07/electronjs-desktop-mcp-tool"],
      "tools": ["*"]
    }
  }
}
```

</details>

<details>
<summary><b>Cline</b></summary>

MCP Servers → Installed → Configure MCP Servers, then add the `mcpServers` block to `cline_mcp_settings.json`.

</details>

<details>
<summary><b>Roo Code</b></summary>

Add the `mcpServers` block to `.roo/mcp.json` (project) or open the global file from the MCP panel.

</details>

<details>
<summary><b>Kilo Code</b></summary>

MCP Servers → Edit Global MCP (or `.kilocode/mcp.json` in a project), then add the `mcpServers` block.

</details>

<details>
<summary><b>Zed</b></summary>

In `settings.json`:

```json
{
  "context_servers": {
    "electronjs-desktop-mcp-tool": {
      "command": "npx",
      "args": ["-y", "@ks-rdz-07/electronjs-desktop-mcp-tool"]
    }
  }
}
```

</details>

<details>
<summary><b>JetBrains IDEs (AI Assistant / Junie)</b></summary>

Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add → **As JSON**, and paste the `mcpServers` block. Junie has the same option under Settings → Tools → Junie → MCP Settings.

</details>

<details>
<summary><b>Continue</b></summary>

Create `.continue/mcpServers/electronjs-desktop-mcp-tool.yaml`:

```yaml
name: electronjs-desktop-mcp-tool
version: 0.0.1
schema: v1
mcpServers:
  - name: electronjs-desktop-mcp-tool
    command: npx
    args: ["-y", "@ks-rdz-07/electronjs-desktop-mcp-tool"]
```

</details>

<details>
<summary><b>opencode</b></summary>

In `opencode.json` (project) or `~/.config/opencode/opencode.json`:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "electronjs-desktop-mcp-tool": {
      "type": "local",
      "command": ["npx", "-y", "@ks-rdz-07/electronjs-desktop-mcp-tool"],
      "enabled": true
    }
  }
}
```

</details>

<details>
<summary><b>Goose</b></summary>

```sh
goose session --with-extension "npx -y @ks-rdz-07/electronjs-desktop-mcp-tool"
```

To keep it, run `goose configure` → Add Extension → Command-line Extension, and enter the same command.

</details>

<details>
<summary><b>Amazon Q Developer CLI</b></summary>

Add the `mcpServers` block to `~/.aws/amazonq/mcp.json` (global) or `.amazonq/mcp.json` (workspace).

</details>

<details>
<summary><b>Kiro</b></summary>

Add the `mcpServers` block to `~/.kiro/settings/mcp.json` (global) or `.kiro/settings/mcp.json` (workspace).

</details>

<details>
<summary><b>Warp</b></summary>

Settings → AI → Manage MCP servers → Add, and paste the `mcpServers` block.

</details>

<details>
<summary><b>LM Studio</b></summary>

Program tab → Install → Edit `mcp.json`, and add the `mcpServers` block.

</details>

<details>
<summary><b>Any other MCP client</b></summary>

It is a standard stdio server: point the client at `npx -y @ks-rdz-07/electronjs-desktop-mcp-tool` or `node /path/to/electronjs-desktop-mcp-tool/dist/index.js`. No environment variables are required.

</details>

## Electron binary

`start_app` looks for Electron in this order:

1. `ELECTRON_PATH` (full path to `electron.exe` or `electron`)
2. the `electron` package in the target app's own `node_modules` (most Electron projects already have it as a dev dependency)
3. an `electron` package installed next to this server

If the `electron` package is found but its binary has not been downloaded yet (Electron 34 and newer download lazily), `start_app` downloads it once and logs to stderr. Nothing is downloaded at install time.

`attach`, `attach_by_pid`, `find_apps` and `discover_apps` work with any app already started with `--remote-debugging-port`. Main-process tools (`evaluate_main`, clipboard, IPC tap and so on) need the app started with `start_app` and `inspectMain: true`, or started yourself with `--inspect=<port>`.

## Quick start

Ask your agent things like:

- "Start the Electron app in `C:/work/my-app` with inspectMain, take a screenshot and show me console errors."
- "Attach to the app on port 9222, click the Save button and check the status text says Saved."
- "Audit this BrowserWindow config for security problems: `{ webPreferences: { nodeIntegration: true } }`."
- "Scaffold a typed IPC channel `files:read` with a preload bridge."
- "Give me a migration checklist from Electron 30 to 45."

## Configuration

| Variable | Effect |
|---|---|
| `ELECTRON_PATH` | Electron executable used by `start_app`. |
| `ELECTRON_MCP_ALLOWED_ROOTS` | `;`-separated folders. When set, `start_app` only launches apps inside them. |
| `ELECTRON_MCP_OUTPUT_ROOTS` | `;`-separated folders that screenshots, traces, HAR, PDF and other output may be written to. |
| `ELECTRON_MCP_NO_SANDBOX` | `1` adds `--no-sandbox` (CI and containers). Also on when `CI=true` or no `DISPLAY` is set. |
| `ELECTRON_MCP_*` (any other name) | Values that `{{secret:NAME}}` and `{{env.NAME}}` in tool arguments may read, for example `ELECTRON_MCP_SECRET_API_TOKEN`. No other environment variable can be read from tool arguments. |

Output is always refused inside system and credential folders (Windows, Program Files, ProgramData, `.ssh`, `.aws`, `.gnupg`, `.git-credentials`, `.npmrc`, `.netrc` and others), and the same guard applies to files tools read (`set_file_input`, `load_storage_state`, `run_script` files), even with no allowlist set. On Windows, Git Bash style paths such as `/c/work/app` are accepted and converted to `C:/work/app`.

## Security notes

Read these before pointing the server at an app that holds real data.

- **`evaluate`, `evaluate_main`, `cdp_command` and `run_script` run arbitrary code.** `evaluate` runs JavaScript in the renderer, `evaluate_main` runs it in the Electron main process with full Node.js access (files, processes, network), and `cdp_command` sends any raw DevTools Protocol command. Anything the agent can be talked into, these tools can do. Keep a human in the loop for these tools, and do not auto-approve them.
- **A debug port is a remote code execution port.** Any local process that can reach `--remote-debugging-port` or `--inspect` can run code inside the app. Only open them on `127.0.0.1`, only while debugging, and never on a production build or a machine you share.
- **Attaching to an app you use for real work gives the agent its data.** Cookies, local storage, IndexedDB, clipboard and screenshots are all readable through these tools. Test against a copy or a throwaway profile.
- `set_clipboard` and `get_clipboard` use the system clipboard of the machine.
- `set_permission`, `network_stub`, `set_cookie` and `set_storage` change app state. `stop_app` kills apps that `start_app` launched and only detaches from attached apps.
- Use `ELECTRON_MCP_ALLOWED_ROOTS` and `ELECTRON_MCP_OUTPUT_ROOTS` to limit which apps can be launched and where files can be written.
- **Secrets in tool arguments.** `{{secret:NAME}}` and `{{env.NAME}}` only read `ELECTRON_MCP_*` variables, so a steered agent cannot pull the API keys and cloud credentials the server inherits from your client. A secret you do expose is masked in tool output, but the agent can still type it into the app or send it to a URL, so expose only what the app under test needs.
- The knowledge and audit tools (`electron_*`) are read-only and run no code. Their advice is based on Electron docs verified up to Electron 45 (see `electron_knowledge_version`).

Two tools have similar names but do different things: `electron_security_audit` (runtime) inspects a **running** app through the main process, and `electron_audit_security` (knowledge) reviews the **config text** you pass in.

## Tools

The server also exposes 6 prompts (`debug_blank_window`, `find_renderer_exception`, `ui_smoke_check`, `attach_and_screenshot`, `vision_then_act`, `ax_then_assert`) and 4 resources (`electron://server`, `electron://info`, `electron://targets`, `electron://artifacts`).

### Runtime tools (111)

| Tool | What it does |
|---|---|
| `start_app` | Start an Electron application with remote debugging enabled. |
| `attach` | Attach to an already-running Electron/Chromium app that was started with --remote-debugging-port. |
| `attach_by_pid` | Attach to a running Electron app by PID. |
| `find_apps` | Scan running OS processes for Electron apps. |
| `discover_apps` | Scan a local port range (default: 9222-9235) for reachable Chrome DevTools Protocol endpoints. |
| `stop_app` | Stop a process started by start_app, or detach bookkeeping for an attached session |
| `list_apps` | List Electron applications managed or attached by this server |
| `diagnose` | Summarize process health: debug port reachability, target roles (page/worker/browser), recent console errors, and discovered local debug ports |
| `doctor` | Local environment health check: package/node/platform, Electron binary, env flags, managed process count, optional free-port sample (localhost bind only) |
| `get_logs` | Get captured stdout/stderr logs for a managed Electron process |
| `get_console_messages` | Get buffered page console/log/exception messages captured via CDP |
| `list_targets` | List Chrome DevTools Protocol targets with role classification (page/worker/browser/other) |
| `evaluate` | Evaluate JavaScript in an Electron target via CDP Runtime.evaluate. |
| `screenshot` | Capture a PNG/JPEG screenshot of a page target via Page.captureScreenshot (optional CSS selector clips to element bounds) |
| `save_screenshot` | Capture a screenshot and write it to a local file path (PNG/JPEG); optional selector clips to element |
| `get_dom` | Read documentElement.outerHTML or a specific element's outerHTML |
| `query_selector` | Query DOM nodes with document.querySelectorAll and return tag/id/class/text summary |
| `reload` | Reload a page target (or all page targets) in an Electron app |
| `pause` | Pause JavaScript execution on a target via Debugger.pause |
| `resume` | Resume JavaScript execution on a target via Debugger.resume |
| `cdp_command` | Execute an arbitrary Chrome DevTools Protocol method on a target (Domain.method) |
| `page_info` | Get URL, title, readyState, and userAgent for a page target |
| `navigate` | Navigate a page target to a URL (Page.navigate) and optionally wait for load |
| `wait_for` | Wait until a selector exists/hides/enables, text/URL/console matches, or node count is met |
| `click` | Click the center of a CSS selector via CDP Input.dispatchMouseEvent |
| `hover` | Move the pointer over a CSS selector (mouseover / hover menus). |
| `scroll` | Scroll the page or an element. |
| `drag` | Press on fromSelector, move to toSelector, and release. |
| `type_text` | Type text into the focused element (optionally click a selector first) |
| `press_key` | Press a key or shortcut (Enter, Escape, Tab, Arrow*, or a character) with optional modifiers |
| `set_console_live` | Enable/disable live MCP log notifications for console events (all levels when enabled; errors always notify) |
| `get_cookies` | Read cookies for the page (optionally filtered by URL) |
| `set_cookie` | Set a cookie on the page (provide url or domain; defaults to current location.href). |
| `delete_cookie` | Delete a cookie by name. |
| `get_storage` | Read localStorage or sessionStorage key/value pairs from the page |
| `set_storage` | Write localStorage or sessionStorage entries (optionally clear first) |
| `clear_buffers` | Clear buffered console messages, network events, process logs, ipc, and/or audits |
| `snapshot` | Accessibility tree snapshot (roles/names) via CDP Accessibility.getFullAXTree — agent-friendly UI map |
| `vision` | One-shot app state: screenshot + page_info + recent console errors + network failures + windows |
| `highlight` | Scroll a CSS selector into view and paint a CDP overlay highlight (auto-hides when durationMs > 0) |
| `click_ax` | Click an element by accessibility name (optional role). |
| `type_ax` | Focus an element by accessibility name and insert text (optional clear) |
| `handle_dialog` | Auto accept or dismiss the next JavaScript dialogs (alert/confirm/prompt). |
| `assert_ui` | Check url/title/text/selector/console-error budget/expression. |
| `select_option` | Choose an option in a <select> by value or visible label, then fire input and change. |
| `act_and_verify` | 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 |
| `triage` | 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 t |
| `save_storage_state` | Export all page cookies, localStorage, and sessionStorage into a standardized JSON storage state artifact (Playwright-compatible format) |
| `load_storage_state` | Restore page cookies, localStorage, and sessionStorage from a saved JSON storage state file or payload |
| `fill_form` | Fill multiple input fields (text, password, checkboxes, radio buttons, dropdowns) and optionally submit in a single turn. |
| `repro_bundle` | Package a complete, self-contained repro investigation bundle (screenshot, MHTML DOM archive, HAR network replay, source-mapped stack traces, logs, and system/h |
| `responsive_theme_matrix` | Run a multi-theme (dark/light) and multi-viewport responsive sweep, verifying UI layout, detecting text clipping/horizontal overflow, and capturing screenshot a |
| `get_network_log` | Get buffered network request/response events captured via CDP Network domain. |
| `get_response_body` | Fetch body for a buffered network requestId (call after Network.loadingFinished) |
| `block_urls` | Block URL patterns via Network.setBlockedURLs (e.g. |
| `set_extra_headers` | Set extra HTTP headers for subsequent requests (Network.setExtraHTTPHeaders) |
| `network_stub` | Intercept matching URLs via Fetch and fulfill or fail them. |
| `clear_network_stubs` | Disable Fetch interception and drop stub rules for this session |
| `wait_network_idle` | Wait until no network request is in flight and the log has been quiet for idleMs |
| `export_har` | Write the buffered network log as HAR 1.2 JSON (method, URL, status; no bodies). |
| `emulate_network` | Set the page offline, or slow it with latency and throughput in bytes per second. |
| `get_downloads` | Arm download capture and list files saved by the app. |
| `network_failure_report` | Composite network diagnostics: gathers all failed HTTP requests (status >= 400 or failed requests), fetches response bodies inline, and exports a HAR artifact. |
| `offline_resilience_check` | Audit how gracefully the Electron app handles network loss, high latency, or HTTP 500 server faults during interactions. |
| `start_tracing` | Start Chrome DevTools Protocol performance tracing (pair with stop_tracing) |
| `stop_tracing` | Stop CDP tracing and write a JSON trace file (open in chrome://tracing) |
| `get_performance_metrics` | Renderer Performance.getMetrics (JS heap, layout count, task duration, …) |
| `start_cpu_profile` | Start V8 CPU profiler on a page target (pair with stop_cpu_profile) |
| `stop_cpu_profile` | Stop CPU profiler and write a .cpuprofile JSON file |
| `heap_snapshot` | Take a V8 heap snapshot (.heapsnapshot) for leak investigation |
| `diff_screenshot` | Capture (or compare) a screenshot against a baseline PNG; reports identical + byte similarity |
| `get_audit_issues` | Buffered Chromium Audits issues (cookie/CORS/mixed-content/deprecations) captured since attach |
| `start_coverage` | Start JS precise coverage (optional CSS rule usage). |
| `stop_coverage` | Stop coverage and return JS (and optional CSS) coverage data; optionally write JSON |
| `set_file_input` | Set files on an <input type=file> via DOM.setFileInputFiles (host paths) |
| `emulate` | Device metrics / UA / geolocation / media emulation (or clear=true to reset) |
| `start_screencast` | Start Page.startScreencast; buffers up to maxFrames (ack frames). |
| `stop_screencast` | Stop screencast; optionally write last frame PNG/JPEG to path |
| `set_breakpoint` | Debugger.setBreakpointByUrl (0-based lineNumber). |
| `remove_breakpoint` | Debugger.removeBreakpoint by breakpointId from set_breakpoint |
| `resolve_stack` | Resolve stack frames to source snippets (Debugger.getScriptSource / file://) |
| `perf_audit` | Lighthouse-lite: Performance.getMetrics + nav/paint timing + recent Audits issues (not full Lighthouse) |
| `capture_mhtml` | Save page as MHTML via Page.captureSnapshot. |
| `virtual_clock` | Emulation.setVirtualTimePolicy — pause / advance virtual time (use budget when advancing) |
| `print_pdf` | Write the page to a PDF. |
| `perf_snapshot` | Composite performance profiler: coordinates start_tracing + start_cpu_profile + start_coverage, optionally captures an interaction or reload, stops all collecto |
| `leak_check` | Memory leak detector: triggers garbage collection, measures baseline DOM and heap counters, repeats an action or wait, runs GC again, and reports retained node/ |
| `evaluate_main` | Evaluate JavaScript in the Electron main/node CDP target (use start_app with inspectMain:true for best results) |
| `main_state` | Electron main-process nervous system: windows, app paths, versions, metrics (requires inspectMain / node target) |
| `ipc_tap` | Install main-process IPC tap (ipcMain.handle wrap + webContents send/ipc-message). |
| `get_ipc_log` | Drain / read captured IPC entries after ipc_tap. |
| `find_installed_apps` | Scan common install locations for packaged Electron apps (.app / exe / .desktop) |
| `webcontents_topology` | Map BrowserWindows / webContents (main) to CDP targets. |
| `open_deep_link` | Emit Electron open-url and second-instance (requires inspectMain). |
| `focus_window` | Bring an Electron BrowserWindow forward (show, focus, moveTop). |
| `get_clipboard` | Read the OS clipboard. |
| `set_clipboard` | Write the OS clipboard. |
| `set_permission` | Allow or deny an Electron permission and grant it to the page via Browser.grantPermissions. |
| `set_window_bounds` | Move or resize a BrowserWindow. |
| `electron_security_audit` | Run security audit against Electron security recommendations (inspects webPreferences, sandbox, nodeIntegration, contextIsolation, setWindowOpenHandler, will-na |
| `ipc_invoke` | Directly invoke a main-process IPC handle channel or emit an IPC event with arguments. |
| `ipc_schema_inference` | Infer IPC channel contracts, argument shapes, and generate TypeScript interfaces from captured IPC tap traffic. |
| `mock_electron_api` | Mock an Electron main-process API (e.g. |
| `get_mock_calls` | Get recorded invocations and arguments for a mocked Electron API method |
| `restore_electron_mocks` | Restore original implementations of mocked Electron APIs |
| `get_application_menu` | Inspect the native Electron application menu hierarchy, items, roles, accelerators, and enabled states |
| `click_menu_item` | Trigger a click on a native application menu item by path (e.g. |
| `trigger_shortcut` | Trigger an Electron global shortcut accelerator (e.g. |
| `get_process_health` | Watchdog health check diagnosing renderer crashes (OOM, killed), window hangs, responsiveness, and process memory |
| `ipc_fuzz_and_verify` | Fuzz test renderer-to-main IPC channels with boundary and malformed payloads (null, prototype pollution, path traversal, oversized buffers) and verify process c |
| `run_script` | Advanced server-side step runner & workflow engine: executes an array of tool steps sequentially with templating ({{vars.x}}, {{steps[0].result.x}}, {{secret:KE |

### Knowledge and audit tools (18)

| Tool | What it does |
|---|---|
| `electron_scaffold_ipc_channel` | Generate complete IPC boilerplate for a new feature: ipcMain handler in the main process, preload bridge function with contextBridge, TypeScript type declaratio |
| `electron_generate_preload_bridge` | Generate a complete, secure preload.ts with contextBridge.exposeInMainWorld for multiple API methods. |
| `electron_audit_ipc_security` | Analyze preload script and main process IPC code for security issues. |
| `electron_generate_window_manager` | Generate multi-window management boilerplate for Electron apps. |
| `electron_explain_process_model` | Get a clear, version-aware explanation of Electron's multi-process architecture. |
| `electron_audit_security` | Audit an Electron app against the official security checklist. |
| `electron_configure_fuses` | Generate @electron/fuses configuration to harden your Electron app. |
| `electron_configure_csp` | Generate a Content Security Policy for an Electron app. |
| `electron_lint_security` | Static analysis of Electron code for dangerous patterns: shell.openExternal with user input, @electron/remote usage, disabled webSecurity, missing navigation re |
| `electron_diagnose_build_error` | Diagnose Electron build/packaging errors from electron-builder, electron-forge, or electron-packager output. |
| `electron_configure_auto_update` | Generate complete auto-update configuration using electron-updater. |
| `electron_configure_deep_linking` | Generate complete custom protocol / deep linking setup for Electron. |
| `electron_scaffold_project` | Generate a complete, secure, modern Electron project scaffold. |
| `electron_migrate_version` | Generate a migration checklist for upgrading between Electron versions. |
| `electron_check_deprecated_apis` | Scan code for usage of deprecated or removed Electron APIs. |
| `electron_audit_performance` | Analyze Electron app code for 7 official performance anti-patterns: eager module loading, synchronous main-process operations, excessive BrowserWindows at start |
| `electron_explain_concept` | Get a clear, authoritative explanation of an Electron concept. |
| `electron_knowledge_version` | Return metadata about the embedded Electron knowledge used by this MCP's analysis tools -- the date it was last verified against official Electron docs, the cur |

## Development

```sh
npm install
npm run typecheck
npm test          # bundle, unit tests, stdio server tests, smoke test
npm run test:e2e  # drives a real Electron app (test/fixtures/minimal-electron-app) through the server
npm run pack:check
```

`npm run test:e2e` needs the Electron binary: `node node_modules/electron/install.js` downloads it once. The fixture window stays hidden and every app the test starts is stopped at the end.

After changing anything under `src/`, run `npm run build` and commit `dist/index.js` (CI fails if it is out of date).

## Contributing

Bug reports, fixes and new tools are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request, and follow the [Code of Conduct](CODE_OF_CONDUCT.md).

## Security policy

Please do not report vulnerabilities in public issues. See [SECURITY.md](SECURITY.md) for how to report one privately.

## License

[MIT](LICENSE). Third-party notices for code this project builds on and for the npm packages bundled into `dist/index.js` are in [THIRD_PARTY_LICENSES](THIRD_PARTY_LICENSES).

TDQS

B3.2/5.0

Scored across 129 tools

Disambiguation3/5

Most tools have clear, specialized purposes, but the set contains several overlapping clusters: screenshot/save_screenshot/diff_screenshot/vision, find_apps/discover_apps/find_installed_apps/list_apps, and perf_audit/perf_snapshot/get_performance_metrics. Detailed descriptions help, but with 129 tools an agent can still reasonably hesitate between similar diagnostics or capture tools.

Naming Consistency4/5

Names are overwhelmingly snake_case and most runtime actions follow a predictable verb_noun pattern (get_cookies, set_cookie, click_ax, start_tracing). Minor inconsistencies exist, such as noun-y tools like snapshot, vision, and triage, plus the electron_ prefix on code-generation/knowledge tools, but the convention remains readable and predictable.

Tool Count1/5

With 129 tools, this is far beyond a well-scoped surface. The server mixes runtime debugging, automation, security auditing, scaffolding, migration guidance, and packaging diagnostics, making the count an extreme mismatch for a single MCP toolset.

Completeness5/5

The tool surface is exceptionally broad: app lifecycle, CDP/automation, DOM/input, network, storage, cookies, IPC inspection, security audits, performance profiling, crash triage, code generation, migration, and packaging diagnostics are all represented. For an Electron development/debugging MCP, there are no obvious major gaps.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues