Back to Home
ljchg12-hue icon

tty-mcp-server

Verified Safe

by ljchg12-hue

Overview

An MCP server that enables secure execution of TTY/PTY commands and interactive shell sessions for AI assistants or other clients.

Installation

Run Command
node /path/to/tty-mcp-server/build/index_minimal.js

Environment Variables

  • HOME

Security Notes

The server implements strong security measures, including a command whitelist, explicit blocking of dangerous shell metacharacters and command substitution patterns in both commands and arguments, and validation of the working directory to prevent path traversal. It uses `node-pty` to spawn commands directly, bypassing shell interpretation, which is a critical defense against injection. PTY sessions include timeouts and proper cleanup. The extensive whitelist of commands could slightly increase the attack surface if any whitelisted command has an unknown vulnerability, but overall, the approach is robust.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens2000
Stars0
Forks0
Last Update2026-01-16

Tags

PTYTTYMCP ServerSecurityCommand ExecutionNode.js