Shell MCP 서버
안전한 셸 명령 실행 기능을 제공하는 모델 컨텍스트 프로토콜(MCP)의 Node.js 구현입니다. 이 서버를 통해 AI 모델은 보안 기능이 내장된 제어된 환경에서 셸 명령을 실행할 수 있습니다. Claude Desktop 과 쉽게 통합되어 Claude를 셸에 연결할 수 있습니다.
특징
MCP 호환 서버 구현
블랙리스트 보호를 통한 안전한 명령 실행
명령 존재 검증
표준 I/O 기반 전송
오류 처리 및 정상적인 종료
설치
npx mcp-shell 실행합니다.
Claude Desktop에 추가하려면 npx mcp-shell config 실행하세요. 또는 설정 파일에 npx -y mcp-shell 직접 추가하세요.
Claude Desktop을 시작(또는 재시작)하면 랜딩 페이지에 MCP 도구가 나열되어 있어야 합니다.
보안 기능
서버는 여러 가지 보안 조치를 구현합니다.
명령 블랙리스트
위험한 시스템 명령 실행을 방지합니다.
중요 시스템 수정에 대한 액세스를 차단합니다.
파일 시스템 파괴로부터 보호합니다
권한 상승을 방지합니다
명령 검증
실행 전에 명령의 존재 여부를 확인합니다.
블랙리스트에 대해 검증합니다
잘못된 명령에 대한 명확한 오류 메시지를 반환합니다.
사용 가능한 도구
서버는 하나의 도구를 제공합니다.
실행 명령
쉘 명령을 실행하고 출력을 반환합니다.
입력 스키마:
지엑스피1
응답:
성공: 명령 출력을 일반 텍스트로 표시
오류: 일반 텍스트로 된 오류 메시지
블랙리스트에 등록된 명령
보안을 위해 다음 명령 범주는 차단되었습니다.
파일 시스템 파괴 명령(rm, rmdir, del)
디스크/파일 시스템 명령(format, mkfs, dd)
권한/소유권 명령(chmod, chown)
권한 상승 명령(sudo, su)
코드 실행 명령(exec, eval)
시스템 통신 명령(쓰기, wall)
시스템 제어 명령(종료, 재부팅, 초기화)
오류 처리
서버에는 포괄적인 오류 처리 기능이 포함되어 있습니다.
명령을 찾을 수 없음 오류
블랙리스트에 등록된 명령 오류
실행 오류
MCP 프로토콜 오류
SIGINT에 대한 정상적인 종료
구현 세부 사항
서버는 다음을 사용하여 구축되었습니다.
모델 컨텍스트 프로토콜 SDK
통신을 위한 StdioServerTransport
명령 실행을 위한 execa
명령 검증을 위한 command-exists
개발
보안 설정을 수정하려면 다음을 수행하세요.
차단된 명령을 조정하려면
BLACKLISTED_COMMANDS세트를 편집하세요.validateCommand함수를 수정하여 추가 검증 규칙을 추가합니다.CallToolRequestSchema핸들러에서 명령 구문 분석 논리를 향상시킵니다.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server implementation that enables secure remote command execution via SSH, with features for managing and using SSH credentials.Last updated -539
- -security-license-qualityA TypeScript application that allows Claude to safely execute bash commands with security safeguards, providing a secure interface through the Model Context Protocol.
- AsecurityAlicenseAqualityA secure Model Context Protocol server that allows AI models to safely interact with Windows command-line functionality, enabling controlled execution of system commands, project creation, and system information retrieval.Last updated -87MIT License
- -securityFlicense-qualityA secure interface that enables language models to execute shell commands on the host operating system through the Model Context Protocol.Last updated -1
Appeared in Searches
- Bash shell scripting and command line resources
- Security testing and vulnerability assessment of MCP Server execution functions
- Security vulnerabilities and risks in MCP Server execution methods
- Security vulnerabilities in MCP Server related to subprocess execution
- NestJS framework information and resources