Skip to main content
Glama

Electron MCP Server

by halilural

send_command_to_electron

Send JavaScript commands to Electron apps via Chrome DevTools Protocol. Interact with UI elements, fill forms, navigate routes, execute custom code, and debug page structures with structured arguments.

Instructions

Send JavaScript commands to any running Electron application via Chrome DevTools Protocol.

Enhanced UI interaction commands:

  • 'find_elements': Analyze all interactive elements (buttons, inputs, selects) with their properties
  • 'click_by_text': Click elements by their visible text, aria-label, or title
  • 'click_by_selector': Securely click elements by CSS selector
  • 'fill_input': Fill input fields by selector, placeholder text, or associated label
  • 'select_option': Select dropdown options by value or text
  • 'send_keyboard_shortcut': Send keyboard shortcuts like 'Ctrl+N', 'Meta+N', 'Enter', 'Escape'
  • 'navigate_to_hash': Safely navigate to hash routes (e.g., '#create', '#settings')
  • 'get_page_structure': Get organized overview of page elements (buttons, inputs, selects, links)
  • 'debug_elements': Get debugging info about buttons and form elements on the page
  • 'verify_form_state': Check current form state and validation status
  • 'get_title', 'get_url', 'get_body_text': Basic page information
  • 'eval': Execute custom JavaScript code with enhanced error reporting

IMPORTANT: Arguments must be passed as an object with the correct properties:

Examples:

  • click_by_selector: {"selector": "button.submit-btn"}
  • click_by_text: {"text": "Submit"}
  • fill_input: {"placeholder": "Enter name", "value": "John Doe"}
  • fill_input: {"selector": "#email", "value": "user@example.com"}
  • send_keyboard_shortcut: {"text": "Enter"}
  • eval: {"code": "document.title"}

Use 'get_page_structure' or 'debug_elements' first to understand available elements, then use specific interaction commands.

Input Schema

NameRequiredDescriptionDefault
argsNoArguments for the command - must be an object with appropriate properties based on the command type
commandYesCommand to send to the Electron process

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "args": { "additionalProperties": false, "description": "Arguments for the command - must be an object with appropriate properties based on the command type", "properties": { "code": { "description": "JavaScript code to execute (for eval command)", "type": "string" }, "message": { "description": "Message or content for specific commands", "type": "string" }, "placeholder": { "description": "Placeholder text to identify input fields (alternative to selector for fill_input)", "type": "string" }, "selector": { "description": "CSS selector for targeting elements (required for click_by_selector, click_button)", "type": "string" }, "text": { "description": "Text content for searching or keyboard input (required for click_by_text, send_keyboard_shortcut)", "type": "string" }, "value": { "description": "Value to input into form fields (required for fill_input)", "type": "string" } }, "type": "object" }, "command": { "description": "Command to send to the Electron process", "type": "string" } }, "required": [ "command" ], "type": "object" }
Install Server

Other Tools from Electron MCP Server

Related Tools

    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/halilural/electron-mcp-server'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server