README Documentation
MCP Terminal Server
A simple MCP server that exposes a tool for running terminal commands.
Installation
- Install the MCP Python SDK:
pip install mcp
Usage
- Start the server:
python server.py
- Connect to the server in an MCP-compatible client, such as Claude Desktop:
mcp install server.py
Or use the MCP Inspector to test it:
mcp dev server.py
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:
Can you list the files in the current directory using the terminal tool?
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
Quick Actions
Key Features
Model Context Protocol
Secure Communication
Real-time Updates
Open Source