MCP Catalogs
Home

dynamic-shell-server

by codelion·41·Score 36

A Python MCP server for secure shell command execution with dynamic approval and audit logging.

developer-toolssecurityops-infra
7
Forks
2
Open issues
15 mo ago
Last commit
2d ago
Indexed

Overview

The dynamic-shell-server is a Model Context Protocol implementation that provides secure execution of shell commands. Its core feature is a dynamic approval system requiring user confirmation before running commands, with options to allow once or permanently remember approvals. The server maintains comprehensive audit logs and stores approved commands persistently. It includes security features like command timeout protection and revocation capabilities, making it suitable for environments where shell access is needed but security is paramount.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Securely executing shell commands through AI assistants while maintaining user control
you:Creating an audit trail for all system administration tasks performed via AI interfaces
you:Providing developers with a controlled way to execute build and deployment commands
you:How does the approval system work?
you:What happens if a command times out?

When to choose this

Choose this when you need to safely execute shell commands through an AI assistant but want granular control over what commands can run and maintain an audit trail.

When NOT to choose this

Not for production environments requiring high-performance command execution or complex permission models, as it's designed for interactive approval in AI assistant contexts.

Tools this server exposes

2 tools extracted from the README
  • execute_command

    Execute a shell command with optional arguments

  • revoke_command_approval

    Revoke approval for a previously approved command

Comparable tools

shell-mcpsafe-executorcommand-runner-server

Installation

Installation

  1. Clone this repository:
git clone <repository-url>
cd dynamic-shell-server
  1. Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate  # On Windows use: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Claude Desktop Integration

  1. Open your Claude Desktop configuration:

- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - Windows: %APPDATA%\Claude\claude_desktop_config.json

  1. Add the server configuration:
{
    "mcpServers": {
        "shell": {
            "command": "/absolute/path/to/.venv/bin/python",
            "args": ["/absolute/path/to/dynamic_shell_server.py"]
        }
    }
}
  1. Restart Claude Desktop

FAQ

How does the approval system work?
When running a command for the first time, users are prompted with options to allow once, allow and remember for future use, or deny execution. Approved commands are stored in ~/.config/mcp-shell-server/approved_commands.json.
What happens if a command times out?
The server implements a 5-minute timeout for all commands. If a command doesn't complete within this timeframe, it's automatically terminated and recorded in the audit log.

Compare dynamic-shell-server with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.