Terminal-mcp is a native MCP server for controlling Unix pseudo-terminals (PTYs). It gives AI models direct, low-latency access to real terminals. The tool launches authentic Bash, Python, or SSH sessions and uses smart output buffering to send only new content.
To start a session, send a JSON-RPC request to the server with your command. For instance, to open an SSH connection, you would issue a request containing the command ssh prod.server.
Its key features include true PTYs for authentic Unix interaction, asynchronous I/O built on Tokio, and smart buffering to prevent duplicate outputs. It also supports persistent sessions that stay alive between calls and allows managing multiple terminals concurrently.
Common use cases are automating DevOps tasks via AI-driven terminal commands, cloud debugging with lasting sessions, and running multiple production or debugging shells simultaneously without disruption.
It supports multi-session workflows for running and switching between several terminals. Designed specifically for AI integration, it provides models with real terminal access for task execution. Installation is done via Cargo: cargo install --git https://github.com/ianks/terminal-mcp.
{
"mcpServers": {
"terminal-mcp": {
"type": "stdio",
"command": "terminal-mcp"
}
}
}