what is terminal-mcp?
Terminal-mcp is a native MCP server for Unix PTY control that provides AI models with authentic, low-latency terminal access by spawning true pseudo-terminals. It allows users to open persistent Bash, Python, or SSH sessions, run commands, and stream only fresh output thanks to smart buffering.
how to use terminal-mcp?
To use terminal-mcp, you can create a session by sending a JSON-RPC request to the server with the desired command. For example, to create a session for SSH, you would send a request with the command ssh prod.server.
key features of terminal-mcp?
- True pseudo-terminals for real Unix terminal interaction.
- Asynchronous, non-blocking I/O powered by Tokio.
- Smart buffering to avoid duplicate outputs.
- Session persistence to keep terminals alive between calls.
- Multi-session support to run and switch between multiple terminals.
use cases of terminal-mcp?
- Automating DevOps tasks through AI-driven terminal orchestration.
- Cloud debugging with persistent terminal sessions.
- Running multiple concurrent production and debugging shells without interruption.
FAQ from terminal-mcp?
- Can terminal-mcp handle multiple sessions?
Yes! Terminal-mcp supports multi-session workflows, allowing you to run and switch between multiple terminals at once.
- Is terminal-mcp suitable for AI applications?
Absolutely! Terminal-mcp is designed to provide AI models with real terminal access for various tasks.
- How do I install terminal-mcp?
You can install terminal-mcp using Cargo with the command:
cargo install --git https://github.com/ianks/terminal-mcp.
Server Config
{
"mcpServers": {
"terminal-mcp": {
"type": "stdio",
"command": "terminal-mcp"
}
}
}