MCP Terminal Server is an MCP server that enables AI models to interact directly and securely with a user's command-line interface. Built for developers, DevOps engineers, and system administrators using clients like Claude Desktop, it connects LLMs to local shells across Windows, macOS, and Linux. The server exposes the execute_command tool, allowing language models to run shell scripts, issue terminal commands, and perform remote operations such as SSH connections. To safeguard host environments, MCP Terminal Server implements path restrictions that limit file operations to specified directories, validates and sanitizes input commands before running them, and manages environment variables. This setup provides a controlled bridge for coding assistants to automate tasks, test command output, and manage project workflows directly from an AI interface without unrestricted system access.
Category: Cloud & Infrastructure
Tags: bash, cli, command-execution, shell, terminal
To install and configure MCP Terminal Server in Claude Desktop, follow these steps: 1. Open your Claude Desktop configuration file (claude_desktop_config.json). 2. Add the terminal entry under the mcpServers object: json { "mcpServers": { "terminal": { "command": "npx", "args": [ "@dillip285/mcp-terminal", "--allowed-paths", "/path/to/allowed/directory" ] } } } 3. Replace /path/to/allowed/directory with the absolute path to the directory you want the server to access. 4. Save the configuration file and restart Claude Desktop to load the server.
Part of MCP Servers
You can configure it directly in your Claude Desktop configuration file using npx with the package name @dillip285/mcp-terminal. Specify the --allowed-paths argument followed by the directory path you wish to expose. After saving the configuration file, restart Claude Desktop to start using the server.
MCP Terminal Server provides the execute_command tool. This tool allows the connected AI model to run terminal commands, execute shell scripts, and initiate remote connections like SSH within the boundaries set by the administrator.
MCP Terminal Server features cross-platform support and can run on Windows, macOS, and Linux operating systems as long as Node.js and npx are available.
The server restricts all file operations strictly to user-specified allowed paths. In addition, commands are validated and sanitized before execution, environment variables are managed securely, and proper error handling is enforced for security-related issues.
Yes, MCP Terminal Server is open source and licensed under the MIT License. The complete source code and development instructions are available on its GitHub repository.