console-terminal-mcp-server
3
The Electron Terminal MCP server allows for seamless interaction with a system terminal within an Electron app through a defined MCP interface. It integrates with Node.js and Express to handle terminal command execution, session management, and output retrieval effectively, providing a versatile tool for remote development.
Electron Terminal MCP Server
This project provides a Model Context Protocol (MCP) Server using Electron to facilitate client interaction with a system terminal within an Electron app. Features include command execution, session management, and output retrieval programmatically.
Features
- MCP Server: A Node.js script that listens for MCP requests and serves as a bridge to the Electron backend. It starts the Electron backend automatically if required.
- Electron Backend: Hosts an Express HTTP server for communication and manages terminal processes with
node-pty
.
Installation
- Ensure Node.js and npm are installed.
- Clone the repository.
- Install dependencies using npm.
- Rebuild native modules for Electron.
Usage
- Start the MCP Server by running the
index.js
script. - Clients connect to the process via stdio using
use_mcp_tool
commands.
Tools
terminal_start
: Start a new terminal session.terminal_execute
: Execute commands in a session.terminal_get_output
: Get session outputs.terminal_stop
: Stop a session.terminal_get_sessions
: List active sessions.
Requirements
- Node.js (v20 or later)
- npm
- Compatible OS with Electron (Windows, macOS, Linux)
Synergy
Works effectively with the Filesystem MCP Server for a comprehensive development experience.