MCP Terminal Server
A simple MCP server that exposes a tool for running terminal commands.
Installation
Install the MCP Python SDK:
Usage
Start the server:
Connect to the server in an MCP-compatible client, such as Claude Desktop:
Or use the MCP Inspector to test it:
Tool Overview
This server exposes one tool:
terminal_command
Runs a terminal command and returns its output.
Parameters:
command
: The command to run in the terminal
Returns:
A dictionary containing:
stdout
: The standard output from the commandstderr
: The standard error output from the commandreturn_code
: The command's return code (0 typically means success)
Example Usage in Claude:
Security Considerations
This tool executes commands directly on your system. Use with caution as it can run any command with the same permissions as the user running the server.
Limitations
Commands timeout after 30 seconds
For security reasons, consider implementing additional validation and restrictions on the commands that can be executed
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.
A simple MCP server that allows running terminal commands with output capture, enabling command execution on the host system from MCP-compatible clients like Claude Desktop.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server to run commands.Last updated -11,092198MIT License
- -securityFlicense-qualityA simple MCP server that allows accessing and executing shell commands on a VM machine through a web-based terminal interface, with automatic tunneling to make the VM accessible from anywhere.Last updated -1874
- -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 -60
- -securityFlicense-qualityA simple MCP server that provides a terminal tool for executing shell commands with safety features like timeouts and error handling.Last updated -