Back to Home
1999AZZAR icon

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

Run Command
node build/index.js

Environment 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

Stats

Interest Score9
Security Score3
Cost ClassLow
Avg Tokens200
Stars1
Forks0
Last Update2025-12-17

Tags

MCPTerminalSSHCommand ExecutionAI Tooling