Skip to content
Install
mcp-registry/mcp-shell-server
mcp-shell-server logo

mcp-shell-server

Author: tumf

Description: Secure shell command execution server implementing the Model Context Protocol (MCP); executes only whitelisted commands, supports stdin, timeout and returns stdout/stderr/status/time.

Stars: 118

Forks: 31

License: MIT License

Category: Open Source

Overview

Installation

1. Clone the repository
git clone https://github.com/tumf/mcp-shell-server.git cd mcp-shell-server
2. Create and activate a virtual environment (optional but recommended)
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
3. Install the Python package requirements
pip install -r requirements.txt
4. Copy the example environment file if present and adjust to your environment
cp .env.example .env # then edit .env # or manually export environment variables required by MCP (e.g., LISTEN_PORT, AUTH_TOKEN, DATA_PATH, etc.)
5. Run database migrations (if the project uses a DB; check README once it is added)
6. Launch the MCP Shell server
python -m mcp_shell_server # or: python app.py / uvicorn main:app --reload, depending on the entry-point file
7. Verify the server is running
curl http://localhost:8000/health # adjust host/port to LISTEN_PORT you configured

01

shell

Execute whitelisted shell commands remotely with optional stdin, working directory and timeout, returning stdout, stderr, exit status and execution time.

License: MIT License
Updated 7/30/2025