Get the FREE Ultimate OpenClaw Setup Guide →

electron

MCP server from laststance/electron-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio laststance-electron-mcp-server npx -y @laststance/electron-mcp-server@latest \
  --env SECURITY_LEVEL="balanced" \
  --env SCREENSHOT_ENCRYPTION_KEY="your-32-byte-hex-string"

How to use

This MCP server provides AI-powered automation, debugging, and observability for Electron applications. It exposes commands that let you interact with the target Electron app through a secure MCP interface, including real-time UI actions, DOM inspection, and DevTools protocol integration. Use the included secure command set to click elements, fill inputs, navigate, and extract page state, while benefiting from screenshot capture and state reporting for debugging and automation workflows. The server is designed to work with any Electron app without modifying the app itself, enabling streamlined automation, inspection, and performance monitoring across development and QA pipelines.

How to install

Prerequisites:

  • Node.js (LTS) installed on your system
  • Access to a shell/terminal

Installation steps:

  1. Install the MCP server package (as part of your project or globally via npx):
    • Using NPX (recommended for MCP servers): npm install -g @laststance/electron-mcp-server@latest
  2. Verify installation:
    • Run the server with the provided mcp_config or start via your MCP client configuration.
  3. Start the MCP server (example using the command from mcp_config): npx -y @laststance/electron-mcp-server@latest
  4. Connect your MCP client (e.g., VS Code MCP, Claude Desktop) using the electron server name and the configured command/args.

Notes:

  • Ensure your environment variable SECURITY_LEVEL is set to a suitable level for your use case (balanced recommended by default).
  • Provide a 32-byte hex string for SCREENSHOT_ENCRYPTION_KEY as part of your security configuration.

Additional notes

Tips and considerations:

  • The server uses the Chromium DevTools Protocol under the hood to drive Electron apps; ensure the target Electron app is accessible and not blocked by security settings.
  • Use the recommended argument structure for commands (wrap values in objects, e.g., {"selector": "..."} for click_by_selector).
  • If you encounter issues with selectors or DOM queries, start with get_page_structure or debug_elements to understand the current DOM.
  • Store sensitive environment values (like encryption keys) securely in your MCP client configuration or environment instead of hardcoding them in scripts.
  • For production, prefer SECURITY_LEVEL = strict or balanced; development can use development for broader functionality during testing.

Related MCP Servers

Sponsor this space

Reach thousands of developers