home / mcp / dynamic shell mcp server
Dynamic Shell MCP Server
Configuration
View docs{
"mcpServers": {
"b48f8f5xg2-blip-dynamic-shell-server": {
"command": "/absolute/path/to/.venv/bin/python",
"args": [
"/absolute/path/to/dynamic_shell_server.py"
]
}
}
}You can securely run shell commands through an MCP server that requires dynamic user approval, keeps an audit log, and enforces timeouts. This setup lets you execute potentially dangerous commands with safeguards while keeping a clear record of what was run and when approvals occurred.
Connect to the MCP server using your MCP client. On first use, you will see a command approval prompt for any command you attempt to run. After you approve, the server will execute the command, record the action in the audit log, and remember the approval for future runs. You can revoke approvals later if needed.
In standalone mode, you start the server directly to handle approvals and executions locally. In Claude Desktop integration, you configure Claude to talk to the shell MCP server so you can initiate commands from Claude with the same approval workflow.
Key features include a persistent store of approved commands, comprehensive audit logging, a 5-minute timeout to prevent runaway commands, and the ability to revoke approvals when security needs change.
Prerequisites: Python and a compatible virtual environment tool must be available on your system.
1) Clone the project into your workspace.
git clone <repository-url>
2) Change into the project directory.
cd dynamic-shell-server
3) Create and activate a virtual environment.
python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate
4) Install dependencies.
pip install -r requirements.txt
5) Run the server in standalone mode.
python dynamic_shell_server.py
6) Optional: configure Claude Desktop to talk to the server.
{
"mcpServers": {
"shell": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["/absolute/path/to/dynamic_shell_server.py"]
}
}
}When you attempt to run a command for the first time, you will see a prompt that asks you to approve or deny. You can choose to allow the command once, remember the approval for future runs, or deny execution. This ensures you review potentially risky actions before they run.
Available tools in this server include the following endpoints. Use them through your MCP client to perform actions while respecting the approval workflow.
Through Claude Desktop, you can say: Human: Run 'npm install' in my project directory. The system will prompt for approval on the first run, then execute once approved and log the event.
- User approval is required for first-time command execution. - Approvals are persisted to a local store so repeated commands donβt require repeated prompting unless revoked. - All command executions are audited and logged for traceability. - A 5-minute timeout protects against long-running or stalled commands. - No shell execution is performed directly to prevent injection risks. - You can revoke an existing approval if a security policy changes.
Approved commands and their approval dates are stored locally, and every command execution is written to an audit log for future review.
Execute a shell command with arguments under the approval system, returning the command's output and exit status.
Revoke approval for a previously approved command, removing it from the persistent approved list and requiring re-approval on next use.