MCPdir β€” MCP Server Directory
πŸ‡¬πŸ‡§ πŸ‡ͺπŸ‡Έ

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)

ToolCategoryDescription
execute_commandcommandRun terminal commands with timeout controls and output capture
get_command_historycommandRetrieve recent command execution records
read_filefile-operationsRead file content with optional row range selection
write_filefile-operationsWrite or append content to files with verification
insert_file_contentfile-operationsInsert content at specified row positions
update_file_contentfile-operationsUpdate content at specific row positions
delete_file_contentfile-operationsRemove content from specific row positions
get_current_directorynavigationReturn the current working directory path
change_directorynavigationChange to a specified directory path
list_directorynavigationDisplay 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