Used as the runtime environment for the MCP server with specific version requirements (v16+).
Allows execution of shell commands with full output capture, proper quote/escape handling, and timeout protection.
Provides tools for creating and managing terminal sessions, executing shell commands, reading terminal history, and controlling multiple terminal tabs in an isolated tmux environment.
🖥️ Terminally MCP
Supercharge AI Assistants with Terminal Control Powers ⚡
Give your AI assistant the power to create, manage, and control terminal sessions like a pro developer! Built on the Model Context Protocol (MCP) for seamless integration with AI tools like Claude, ChatGPT, and more.
Features • Quick Start • Installation • API Reference • Examples
🎯 What is Terminally MCP?
Terminally MCP is a Model Context Protocol (MCP) server that bridges the gap between AI assistants and terminal operations. It provides a safe, controlled environment where AI can:
- 🚀 Execute shell commands with full output capture
- 📂 Manage multiple terminal sessions simultaneously
- 🔍 Read terminal history and scrollback buffers
- 🛡️ Isolated tmux environment that won't interfere with your existing sessions
- ⚡ Real-time command execution with timeout protection
Perfect for AI-powered development workflows, automation, system administration, and interactive coding assistance!
✨ Features
🎮 Terminal Control
- Create and manage multiple terminal tabs
- Execute commands with proper quote/escape handling
- Capture command output and exit codes
- Read terminal history and scrollback
🔒 Safe & Isolated
- Dedicated tmux server instance
- No interference with user's tmux sessions
- Timeout protection for long-running commands
- Clean session management
🤖 AI-Optimized
- MCP protocol compliance
- Structured JSON responses
- Error handling and recovery
- Marker-based output capture
🛠️ Developer Friendly
- TypeScript with full type safety
- Comprehensive test suite
- Clean, modular architecture
- Easy to extend and customize
🚀 Quick Start
Get up and running in under 2 minutes!
That's it! The server is now ready to accept MCP connections.
📦 Installation
Prerequisites
- Node.js v16 or higher
- tmux installed on your system
- pnpm (recommended) or npm/yarn
Install tmux
Setup for AI Assistants
Add to your Claude Desktop configuration:
Add to your MCP client configuration:
📖 API Reference
🔧 Available Tools
create_tab
Creates a new terminal session.
execute_command
Run any shell command in a specific terminal tab.
list_tabs
Get all active terminal sessions.
read_output
Read the terminal buffer including history.
close_tab
Close a terminal session.
💡 Examples
Basic Command Execution
Multi-Tab Workflow
Complex Command Chains
🏗️ Architecture
Key Design Decisions
- 🔐 Isolated tmux Server: Each instance uses a unique socket path to prevent conflicts
- 📍 Marker-Based Output Capture: Reliable command output extraction using UUID markers
- ⏱️ Timeout Protection: Configurable timeouts prevent hanging on long-running commands
- 🎯 Type Safety: Full TypeScript implementation with strict typing
🧪 Development
🤝 Contributing
We love contributions! Whether it's:
- 🐛 Bug reports
- 💡 Feature requests
- 📖 Documentation improvements
- 🔧 Code contributions
Please feel free to:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
📄 License
This project is licensed under the ISC License - see the LICENSE file for details.
🙏 Acknowledgments
- Built on the Model Context Protocol specification
- Powered by tmux - the terminal multiplexer
- Inspired by the need for better AI-terminal integration
🌟 Star History
If you find this project useful, please consider giving it a ⭐ on GitHub!
Built with ❤️ for the AI-assisted development community
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
An MCP server that gives AI assistants the ability to create, manage, and control terminal sessions through a safe, isolated tmux environment.
Related MCP Servers
- -securityFlicense-qualityAn MCP server that allows AI assistants like Claude to execute terminal commands on the user's computer and return the output, functioning like a terminal through AI.Last updated -47Python
- AsecurityAlicenseAqualityA server that enables AI assistants to execute terminal commands and retrieve outputs via the Model Context Protocol (MCP).Last updated -316PythonMIT License
- -securityAlicense-qualityAn enhanced MCP server that grants AI assistants the ability to execute terminal commands on a user's system with improved security controls, designed for use in controlled environments.Last updated -PythonMIT License
- AsecurityFlicenseAqualityAn MCP server that allows AI models to execute system commands on local machines or remote hosts via SSH, supporting persistent sessions and environment variables.Last updated -167316TypeScript