Terminal Controller MCP
by GongRzhe
Secure terminal command execution and file operations through AI assistants
devops Python Intermediate Self-hostable No API key
β 99 stars π
Updated: 9mo ago
Description
An MCP server for secure terminal command execution, directory navigation, and file system operations. Provides 10 tools covering command execution with timeout controls, directory navigation, file read/write with row-level precision, and command history tracking. Includes built-in security safeguards with command blacklisting to prevent dangerous operations.
β Best for
Teams wanting AI-assisted terminal access with safety controls and file editing capabilities
βοΈ Skip if
You need unrestricted shell access or interactive terminal sessions
π‘ Use cases
- Executing shell commands through AI assistants with safety guardrails
- Navigating and listing directory contents
- Reading and editing files with row-level precision
- Tracking command execution history for audit trails
- Automating terminal workflows with AI guidance
π Pros
- β Built-in security with dangerous command blacklisting
- β Row-level file operations (read, write, insert, update, delete)
- β Command history tracking for auditability
- β Cross-platform support (Windows and UNIX)
π Cons
- β Command blacklist may be too restrictive for some use cases
- β No support for interactive terminal commands
- β Requires Python 3.11+
π§ Exposed tools (10 tools)
| Tool | Category | Description |
|---|---|---|
| execute_command | command | Run terminal commands with timeout controls and output capture |
| get_command_history | command | Retrieve recent command execution records |
| read_file | file-operations | Read file content with optional row range selection |
| write_file | file-operations | Write or append content to files with verification |
| insert_file_content | file-operations | Insert content at specified row positions |
| update_file_content | file-operations | Update content at specific row positions |
| delete_file_content | file-operations | Remove content from specific row positions |
| get_current_directory | navigation | Return the current working directory path |
| change_directory | navigation | Change to a specified directory path |
| list_directory | navigation | Display directory contents with formatted icons |
π‘ Tips & tricks
Use execute_command with timeout for long-running operations. The file tools support row-level precision β use read_file with row ranges to inspect specific sections.
Quick info
- Author
- GongRzhe
- License
- MIT
- Runtime
- Python 3.11+
- Transport
- stdio
- Category
- devops
- Difficulty
- Intermediate
- Self-hostable
- β
- Auth
- β
- Docker
- β
- Version
- 1.0.0
- Updated
- Jun 14, 2025
Client compatibility
- β Claude Code
- β Cursor
- β VS Code Copilot
- β Gemini CLI
- β Windsurf
- β Cline
- β JetBrains AI
- β Warp
Platforms
π macOS π§ Linux πͺ Windows