CD

codelion/dynamic-shell-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

42 stars 7 forks 품질 62 트렌드 12Apache-2.0

codelion/dynamic-shell-server는 MCP 서버 후보자로 https://github.com/codelion/dynamic-shell-server.에서 수입

개요

codelion/dynamic-shell-server는 MCP 서버 후보자로 https://github.com/codelion/dynamic-shell-server.에서 수입

개요(AI 번역)

쉘 명령을 동적 승인 시스템으로 안전하게 실행할 수 있는 Model Context Protocol (MCP) 서버. 이 서버는 사용자 승인 및 감사 로깅을 통해 보안을 유지하면서 임의 명령을 실행할 수 있습니다.

특징

  • 동적 명령 승인 시스템
  • 승인 된 명령의 영구 저장
  • Comprehensive 종합 감사 로깅
  • ️️ 명령 타임아웃 보호
  • 명령 재직 기능

설치

  1. Clone 이 저장소:

  2. 가상 환경을 만들고 활성화하십시오:

  3. 의존성 설치:

사용법

독립 형태

직접 서버를 실행:

Claude 데스크탑 통합

  1. Claude 데스크탑 구성을 엽니다:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 윈도우: %APPDATA%\Claude\claude_desktop_config.json
  1. 서버 구성 추가:

  2. 나머지 Claude 데스크탑

명령 승인 과정

처음 명령을 실행할 때, 당신은 다음과 같이 프롬프트됩니다.

사용 가능한 도구

  1. execute_command: 쉘 명령 실행
  • 모수:
  • command: 실행 명령
  • args: 명령의 선택 목록
  1. 명세.

이 페이지는 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"] } } }