Terminal MCP Server

Terminal MCP servers enable AI models to interact with command-line interfaces and shells, providing capabilities for executing commands, managing processes, and handling terminal I/O in a secure environment.

{
  "mcpServers": {
    "terminal-controller": {
      "command": "uvx",
      "args": ["terminal_controller"]
    }
  }
}

Overview

The MCP Terminal Server enables AI models to interact directly with command-line interfaces and shells through the Model Context Protocol (MCP). It provides a standardized interface for executing commands, managing processes, and handling terminal I/O while maintaining security and isolation. 1

Key features include:

  • Command execution and management
  • Process handling and monitoring
  • Environment variable management
  • Input/Output stream handling
  • Shell integration
  • Command history tracking
  • Session management

Security

The Terminal Controller implements robust security measures to ensure safe command execution:

  • Command timeouts prevent long-running or frozen processes
  • Blacklist filtering blocks dangerous system commands (e.g. rm -rf /, format, mkfs)
  • Isolated command execution with proper error handling
  • Restricted access to only explicitly permitted commands and directories

Tools

Sources

Footnotes

  1. https://github.com/GongRzhe/terminal-controller-mcp