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
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 -2265150TypeScriptMIT 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 -392JavaScript
- -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 -7Python
- -securityAlicense-qualityAn enhanced MCP server that grants AI assistants the ability to execute terminal commands on a user's system with improved security controls, designed for use in controlled environments.Last updated -PythonMIT License