CD

codelion/dynamic-shell-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

42 stars 7 forks 品質 62 トレンド 12Apache-2.0

codelion/dynamic-shell-server は、 [https://github.com/codelion/dynamic-shell-server. からインポートされた MCP サーバーの候補です

概要

codelion/dynamic-shell-server は、 [https://github.com/codelion/dynamic-shell-server. からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

動的承認システムでシェルコマンドの安全な実行を可能にするモデルコンテキストプロトコル(MCP)サーバー。 このサーバーは、ユーザの承認と監査ログを通じてセキュリティを維持しながら任意のコマンドを実行できます。

##特徴

  • 動的コマンド承認システム
  • 承認されたコマンドの永続保存
  • 包括的な監査ログ
  • コマンドアウト保護
  • 負債の取消機能

インストール

  1. このリポジトリをクローンする:

  2. 仮想環境を作成し、それをアクティブにします。

  3. 依存関係を取付けて下さい:

使用法

##独立モード

サーバを直接実行する:

##Claudeデスクトップの統合

1。 Claudeデスクトップの設定を開きます。

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • ウィンドウ: %APPDATA%\Claude\claude_desktop_config.json
  1. サーバー構成を追加します。

  2. クロードデスクトップを再起動する

コマンド承認プロセス

コマンドを初めて実行するときは、次のコマンドを実行します。

利用可能なツール

  1. [execute_command:シェルコマンドを実行する
  • 変数:

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

Dynamic Shell Command MCP Server

A Model Context Protocol (MCP) server that enables secure execution of shell commands with a dynamic approval system. This server allows running arbitrary commands while maintaining security through user approval and audit logging.

Features

  • 🔐 Dynamic command approval system
  • 📝 Persistent storage of approved commands
  • 📊 Comprehensive audit logging
  • ⏱️ Command timeout protection
  • 🔄 Command revocation capability

Installation

  1. Clone this repository:
git clone 
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

Usage

Standalone Mode

Run the server directly:

python dynamic_shell_server.py

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
  2. 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

Command Approval Process

When running a command for the first time, you’ll be prompted with:

Command Approval Required

Command: 
Arguments: 

This command has not been previously approved. Do you want to:
1. Allow this command once
2. Allow this command and remember for future use
3. Deny execution

Please choose an option (1-3):

Available Tools

  1. execute_command: Execute a shell command

    • Parameters:
      • command: The command to execute
      • args: Optional list of command arguments
  2. revoke_command_approval: Revoke approval for a previously approved command

    • Parameters:
      • command: The command to revoke approval for

Available Resources

  1. commands://approved: Lists all approved commands with their approval dates

Data Storage

The server stores its data in ~/.config/mcp-shell-server/:

  • approved_commands.json: List of approved commands and their approval dates
  • audit.log: Detailed execution history of all commands

Security Features

  • User approval required for first-time command execution
  • Persistent storage of approved commands
  • Comprehensive audit logging
  • 5-minute command timeout
  • No shell execution (prevents injection attacks)
  • Command revocation capability

Example Usage

Through Claude Desktop:

Human: Run 'npm install' in my project directory
Assistant: I'll help you run that command. Since this is the first time running 'npm install', you'll need to approve it.
[Command approval prompt appears]
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "shell": { "command": "/absolute/path/to/.venv/bin/python", "args": ["/absolute/path/to/dynamic_shell_server.py"] } } }