terminal-mcp
native mcp server for unix pty control
Documentation
terminal-mcp
> native mcp server for unix pty control.
what
mcp server that gives ai models real terminal access. spawn sessions, run commands, read output. that's it.
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "create_session",
"arguments": {
"session_name": "prod-debug",
"command": "ssh prod.server"
}
}
}features
- true ptys not applescript hacks, real unix terminals
- async everything tokio-powered non-blocking i/o
- smart buffering only new output, no duplicates
- session persistence terminals stay alive between calls
- multi-session support run multiple terminals at once and switch between them
concepts
- sessions: named terminal instances (`bash`, `python`, `ssh`)
- tools: mcp protocol endpoints the ai calls
- ptys: pseudo-terminals for proper shell interaction
- managers: lifecycle and cleanup automation
tools
- `create_session`: spawn a new terminal
- `execute_command`: run and get output immediately
- `execute_command_async`: start long-running commands
- `read_streaming_output`: poll async command progress
- `list_sessions`: see what's running
- `destroy_session`: cleanup when done
- `send_control_character`: ctrl-c and friends
config
claude code:
cargo install --git https://github.com/ianks/terminal-mcp
claude mcp add --scope user terminal-mcpdev
cargo test -- --nocapture # see test output
RUST_LOG=debug cargo run # verbose logging
cargo clippy # lint
cargo fmt # formatarchitecture
mcp api layer (json-rpc)
↓
session manager (lifecycle)
↓
pty engine (pty-process)
↓
unix ptys (kernel)philosophy
> ai can interact with computers like humans do.
> no abstractions. just shells.
license
mit
Frequently asked questions
What is terminal-mcp?
terminal-mcp is native mcp server for unix pty control
How do I install terminal-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is terminal-mcp open source?
Yes — it is hosted on GitHub at https://github.com/ianks/terminal-mcp and has 7 stars.
Related MCP tools
AWS MCP Servers — helping you get the most out of AWS, wherever you use MCP. Python-based implementation. Trusted by 6900+ developers.
开盒即用的优雅管理mcp服务 | 结合Agent框架 | 作者听劝 | 已发布pypi | Vue页面demo Python-based implementation.
An open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM for the Model Context Protocol. Enhance AI
🌍 Terraform Model Context Protocol (MCP) Tool - An experimental CLI tool that enables AI assistants to manage and operate Terraform environments.
Mcp-use is the easiest way to interact with mcp servers with custom agents TypeScript-based implementation. Trusted by 8100+ developers.
A collection of MCP clients. Trusted by 5900+ developers. Trusted by 5900+ developers. Trusted by 5900+ developers. Trusted by 5900+ developers.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP