MC

mladensu/cli-mcp-server

Developer tools

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

179 stars 38 forks 품질 68 트렌드 17MIT

mladensu/cli-mcp-server는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요

mladensu/cli-mcp-server는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요(AI 번역)


제어된 명령줄 작업을 실행하기 위한 안전한 모델 컨텍스트 프로토콜(MCP) 서버 구현 포괄적인 보안 기능.


목차

  1. 개요
  2. 특징
  3. 구성
  4. 사용 가능한 도구
  • run_command
  • show_security_rules
  1. 클로드 데스크톱에서의 사용
  • 개발/미공개 서버 구성
  • 공개된 서버 구성
  1. 보안 기능
  2. 오류 처리
  3. 개발
  • 선수 조건
  • 건축 및 출판
  • 디버깅
  1. 면허

개요

이 MCP 서버는 명령어 화이트리스트, 경로 등 강력한 보안 조치와 함께 안전한 명령줄 실행을 가능하게 합니다 검증 및 실행 제어. 보안을 유지하면서 LLM 애플리케이션에 대한 통제된 CLI 접근 제공에 완벽합니다.

특징

  • 🔒 엄격한 검증을 통한 명령 실행 보안
  • ⚙️ ‘all’ 옵션을 포함한 명령 및 플래그 화이트리스트 설정 가능
  • 🛡️ 경로 탐색 방지 및 검증
  • 🚫 포탄 조작자 주입 보호
  • ⏱️ 실행 타임아웃 및 길이 제한
  • 📝 상세한 오류 보고
  • 🔄 비동기 연산 지원
  • 🎯 작업 디렉터리 제한 및 검증

구성

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

README

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

CLI MCP Server


A secure Model Context Protocol (MCP) server implementation for executing controlled command-line operations with comprehensive security features.


Table of Contents

  1. Overview
  2. Features
  3. Configuration
  4. Available Tools
  5. Usage with Claude Desktop
  6. Security Features
  7. Error Handling
  8. Development
  9. License

Overview

This MCP server enables secure command-line execution with robust security measures including command whitelisting, path validation, and execution controls. Perfect for providing controlled CLI access to LLM applications while maintaining security.

Features

  • 🔒 Secure command execution with strict validation
  • ⚙️ Configurable command and flag whitelisting with ‘all’ option
  • 🛡️ Path traversal prevention and validation
  • 🚫 Shell operator injection protection
  • ⏱️ Execution timeouts and length limits
  • 📝 Detailed error reporting
  • 🔄 Async operation support
  • 🎯 Working directory restriction and validation

Configuration

Configure the server using environment variables:

Variable Description Default
ALLOWED_DIR Base directory for command execution (Required) None (Required)
ALLOWED_COMMANDS Comma-separated list of allowed commands or ‘all’ ls,cat,pwd
ALLOWED_FLAGS Comma-separated list of allowed flags or ‘all’ -l,-a,--help
MAX_COMMAND_LENGTH Maximum command string length 1024
COMMAND_TIMEOUT Command execution timeout (seconds) 30
GitHub에서 전체 README 보기

설치

uvx cli-mcp-server
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "cli-mcp-server": { "command": "uv", "args": [ "--directory", "<path/to/the/repo>/cli-mcp-server", "run", "cli-mcp-server" ], "env": { "ALLOWED_DIR": "</your/desired/dir>", "ALLOWED_COMMANDS": "ls,cat,pwd,echo", "ALLOWED_FLAGS": "-l,-a,--help,--version", "MAX_COMMAND_LENGTH": "1024", "COMMAND_TIMEOUT": "30", "ALLOW_SHELL_OPERATORS": "false" } } } }