SA

sunwood-ai-labs/command-executor-mcp-server

Developer tools

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

22 stars 4 forks 품질 55 트렌드 10

안전한 실행을 위한 모형 Context 의정서 서버 Pre-approved 명령

개요

Pre-approved 명령을 실행하기위한 Model Context Protocol 서버. https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51] [T0]] [T0]] [T0]] [T0]] [T0]] [T0]] [T0]] [T0] [T0] [T0]] [T0] [T0] [T0]] [T0]] [T0] [T0] [T0] [T0] [T0]] [T0] [T0]] [T0] [T0] [T0]] [T0]] [T0] [T0] [T0]] https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51] https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51]]] https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51]]]]]] [[https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51]]]]]]] [[[[[[https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51]]]]]]]]]]]]]] [[[[[[[https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51]]]]]]]]]]]]]]]]]] [[[[[[[[[[[[[[[[[[[[[[ - 사전 승인 된 명령 목록과 보안 명령 실행 - 환경 변수를 통해 허용 가능한 명령 - TypeScript 및 MCP SDK 내장 - 원활한 통합을위한 stdio를 통해 통신 - 오류 처리 및 보안 검증 - 실시간 명령 출력 스트리밍 기본적으로 다음 명령이 허용됩니다. - git - ls - mkdir - cd - npm - npx - python ALLOWED COMMANDS 환경 변수를 설정하여 허용된 명령을 사용자 지정할 수 있습니다. Claude Desktop을 사용하려면 서버 구성을 추가하십시오. command-executor 서버는 여러 보안 조치를 실행합니다. 1. Pre-approved Command List - 명시적으로 허용된 명령만 실행할 수 있습니다. - 기본 목록은 제한적이고 보안 중심입니다 - 명령은 주입을 방지하기 위해 prefix에 의해 검증됩니다

개요(AI 번역)

Pre-approved 명령을 실행하기위한 Model Context Protocol 서버.

데모

https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51] [T0]] [T0]] [T0]] [T0]] [T0]] [T0]] [T0]] [T0] [T0] [T0]] [T0] [T0] [T0]] [T0]] [T0] [T0] [T0] [T0] [T0]] [T0] [T0]] [T0] [T0] [T0]] [T0]] [T0] [T0] [T0]] https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51] https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51]]] https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51]]]]]] [[https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51]]]]]]] [[[[[[https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51]]]]]]]]]]]]]] [[[[[[[https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51]]]]]]]]]]]]]]]]]] [[[[[[[[[[[[[[[[[[[[[[

✨ 특징

  • 사전 승인된 명령 목록과 보안 명령 실행
  • 환경변수를 통한 설정 가능한 명령
  • TypeScript 및 MCP SDK 내장
  • 원활한 통합을 위한 stdio를 통한 통신
  • 오류 처리 및 보안 검증
  • 실시간 명령 출력 스트리밍

♨ 설치

의존성 설치:

서버 구축:

auto-rebuild를 가진 발달을 위해:

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

# # # 허용된 명령

기본적으로 다음 명령은 허용됩니다.

  • git의
  • ls의
  • 미디
  • CD를
  • 시간
  • npx,
  • python의

ALLOWED_COMMANDS 환경변수를 설정하여 허용된 명령을 사용자 정의할 수 있습니다.

은 Claude 데스크탑 통합

Claude Desktop을 사용하려면 서버 구성을 추가하십시오.

MacOS에서:

Windows에서:

구성 예:

️ 보안 고려

command-executor 서버는 여러 보안 조치를 실행합니다.

  1. 사전 승인 명령 목록
  • 명시적으로 허용된 명령만 실행할 수 있습니다.
  • 기본 목록은 제한 및 보안 중심입니다

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

README

원문 README의 일부입니다. 원문 보기.

A Model Context Protocol server for executing pre-approved commands securely.

🎥 Demo

https://github.com/user-attachments/assets/ed763a12-b685-4e0b-b9a5-bc948a590f51

✨ Features

  • Secure command execution with pre-approved command list
  • Configurable allowed commands through environment variables
  • Built with TypeScript and MCP SDK
  • Communication via stdio for seamless integration
  • Error handling and security validations
  • Real-time command output streaming

🚀 Installation

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

⚙️ Configuration

🔒 Allowed Commands

By default, the following commands are allowed:

  • git
  • ls
  • mkdir
  • cd
  • npm
  • npx
  • python

You can customize the allowed commands by setting the ALLOWED_COMMANDS environment variable:

export ALLOWED_COMMANDS=git,ls,mkdir,python

🔌 Claude Desktop Integration

To use with Claude Desktop, add the server config:

On MacOS:

~/Library/Application Support/Claude/claude_desktop_config.json

On Windows:

%APPDATA%/Claude/claude_desktop_config.json

Configuration example:

{
  "mcpServers": {
    "command-executor": {
      "command": "/path/to/command-executor/build/index.js"
    }
  }
}

🛡️ Security Considerations

The command-executor server implements several security measures:

  1. Pre-approved Command List

    • Only explicitly allowed commands can be executed
    • Default list is restrictive and security-focused
    • Commands are validated by prefix to prevent injection
  2. Command Validation

    • Command prefix validation prevents command injection
    • No shell execution for improved security
    • Environment variables are properly sanitized
  3. Error Handling

    • Comprehensive error handling for unauthorized commands
    • Clear error messages for debugging
    • Failed commands don’t crash the server
  4. Environment Isolation

    • Server runs in its own environment
    • Environment variables can be controlled
    • Limited system access

💻 Development

📁 Project Structure

command-executor/
├─ src/
│  └─ index.ts      # Main server implementation
├─ build/
│  └─ index.js      # Compiled JavaScript
├─ assets/
│  └─ header.svg    # Project header image
└─ package.json     # Project configuration

🐛 Debugging

GitHub에서 전체 README 보기

설치

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

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "command-executor": { "command": "/path/to/command-executor/build/index.js" } } }