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.
A simple MCP server that exposes a tool for running terminal commands.
pip install mcp
python server.py
mcp install server.py
Or use the MCP Inspector to test it:
mcp dev server.py
This server exposes one tool:
Runs a terminal command and returns its output.
Parameters:
command
: The command to run in the terminalReturns:
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:
Can you list the files in the current directory using the terminal tool?
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.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!