terminal-mcp-server
by 1999AZZAR
Overview
Provides a Model Context Protocol (MCP) interface for executing commands locally or remotely via SSH, enabling AI models to interact with system terminals.
Installation
node build/index.jsEnvironment Variables
- SSH_KEY_PATH
- DEBUG
Security Notes
The server is highly vulnerable to command injection. The `executeCommand` function passes user-supplied `command` strings directly to `child_process.exec` (for local execution) and `ssh2` shell streams (for remote interactive shell execution) without robust shell-specific escaping or sanitization. While `executeWithExec` attempts basic double-quote escaping, it does not reliably mitigate other shell metacharacters, allowing potential execution of arbitrary commands. The `CONTRIBUTING.md` highlights the importance of input validation and never executing user input directly, but this principle is not fully implemented in the core command execution logic.
Similar Servers
wcgw
Empowering chat applications to code, build, and run on your local machine by providing tightly integrated shell and code editing tools.
ssh-mcp-server
Bridging AI assistants to remote SSH server operations for command execution, file transfer, and server status retrieval via the Model Context Protocol (MCP).
mcp-use-cli
An interactive command-line interface (CLI) tool for connecting to and interacting with Model Context Protocol (MCP) servers using natural language, acting as an AI client that orchestrates LLM responses with external tools.
mcp-ssh-manager
Manages remote SSH servers via the Model Context Protocol (MCP), enabling AI assistants like Claude Code and OpenAI Codex to execute commands, transfer files, monitor health, and automate DevOps tasks.