vemiliogp/CourseMcpShellServer
3.1
If you are the rightful owner of CourseMcpShellServer and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Shell Server MCP is a simple Model Context Protocol server designed to execute shell commands through a terminal tool.
Tools
1
Resources
0
Prompts
0
Shell Server MCP
A simple Model Context Protocol (MCP) server that provides a terminal tool for executing shell commands.
Features
- Terminal Tool: Execute shell commands and get their output
- Safety Features: 30-second timeout on commands
- Error Handling: Proper error messages for failed commands
- Working Directory Support: Optional working directory specification
Installation
# Install dependencies
uv sync
Usage
Running the Server
python server.py
The server runs in stdio mode and communicates via JSON-RPC over stdin/stdout.
Available Tools
terminal
Execute shell/terminal commands and return their output.
Parameters:
command(required): The shell command to executeworking_directory(optional): Directory to run the command in (defaults to current directory)
Example:
{
"name": "terminal",
"arguments": {
"command": "ls -la",
"working_directory": "/home/user"
}
}
Response includes:
- STDOUT output (if any)
- STDERR output (if any)
- Return code
- Error messages for timeouts or execution failures
Security Considerations
- Commands have a 30-second timeout to prevent hanging
- The server runs with the same permissions as the Python process
- Be cautious when exposing this server to untrusted clients
- Consider implementing additional command filtering for production use
Development
The server is built using the official MCP Python SDK and follows MCP protocol specifications.
Project Structure
server.py: Main MCP server implementationpyproject.toml: Project dependencies and metadataREADME.md: This documentation
License
MIT