Shell MCP Server
🖥️ 셸 MCP 서버
🚀 Shell MCP 서버를 사용하여 AI 애플리케이션에 보안 셸 명령 실행 기능을 추가하세요! 모델 컨텍스트 프로토콜(MCP)을 위해 설계되었습니다.
✨ 특징
🔒 안전한 실행 - 명령은 지정된 디렉토리에서만 실행됩니다.
🐚 다중 셸 - bash, sh, cmd, powershell 지원
⏱️ 시간 초과 제어 - 장기 실행 명령의 자동 종료
🌍 크로스 플랫폼 - Unix 및 Windows 시스템 모두에서 작동합니다.
🛡️ 기본적으로 안전함 - 내장된 디렉토리 및 셸 검증
Related MCP server: Terminal MCP Server
🚀 빠른 시작
설치
지엑스피1
🔌 Claude 데스크톱 통합
셸 명령 실행을 활성화하려면 Claude Desktop 구성에 다음을 추가하세요.
{
"mcpServers": {
"shell-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/shell-mcp-server",
"run",
"shell-mcp-server",
"/path/to/allowed/dir1",
"/path/to/allowed/dir2",
"--shell", "bash", "/bin/bash",
"--shell", "zsh", "/bin/zsh"
]
}
}
}🎮 사용 예시
기본 파일 작업
# List directory contents
result = execute_command(
command="ls -la",
shell="bash",
cwd="/path/to/project"
)
# Find files by pattern
result = execute_command(
command="find . -name '*.py'",
shell="bash",
cwd="/path/to/project"
)프로젝트 관리
# Git operations
result = execute_command(
command="git status && git diff",
shell="bash",
cwd="/path/to/repo"
)
# Package management
result = execute_command(
command="pip list --outdated",
shell="bash",
cwd="/path/to/python/project"
)시스템 정보
# Resource usage
result = execute_command(
command="df -h && free -h",
shell="bash",
cwd="/path/to/dir"
)
# Process monitoring
result = execute_command(
command="ps aux | grep python",
shell="bash",
cwd="/path/to/dir"
)파일 처리
# Search file content
result = execute_command(
command="grep -r 'TODO' .",
shell="bash",
cwd="/path/to/project"
)
# File manipulation
result = execute_command(
command="awk '{print $1}' data.csv | sort | uniq -c",
shell="bash",
cwd="/path/to/data"
)Windows 관련 예제
# List processes
result = execute_command(
command="Get-Process | Where-Object {$_.CPU -gt 10}",
shell="powershell",
cwd="C:\\path\\to\\dir"
)
# System information
result = execute_command(
command="systeminfo | findstr /B /C:'OS'",
shell="cmd",
cwd="C:\\path\\to\\dir"
)⚙️ 구성
명령줄 인수를 사용하여 동작을 구성합니다.
논쟁 | 설명 |
| 📁 허용된 디렉토리 목록 |
| 🐚 셸 사양(이름 및 경로) |
환경 변수:
COMMAND_TIMEOUT: ⏱️ 최대 실행 시간(초) (기본값: 30)
🛡️ 보안 기능
🔐 디렉토리 격리 : 명령은 지정된 디렉토리에서만 실행될 수 있습니다.
🔒 셸 제어 : 구성된 셸만 허용됩니다.
⏰ 시간 초과 보호 : 모든 명령에는 구성 가능한 시간 초과가 있습니다.
🛑 경로 검증 : 작업 디렉터리 검증은 트래버설 공격을 방지합니다.
👤 권한 격리 : 명령은 서버 프로세스와 동일한 권한으로 실행됩니다.
🛠️ 개발
개발 환경을 설정하세요.
# Create and activate virtual environment
uv venv
source .venv/bin/activate
# Install development dependencies
uv pip install -e ".[test]"
# Run tests
python -m pytest
# Run tests with coverage
python -m pytest --cov=shell_mcp_server🤝 기여하기
여러분의 참여를 환영합니다! 자유롭게 참여해 주세요:
🐛 버그 신고
💡 기능 제안
🔧 풀 리퀘스트 제출
📚 문서 개선
📜 라이센스
MIT 라이센스 - 자세한 내용은 라이센스를 참조하세요.
🌟 Secure Shell Access로 AI를 강화하세요! 🌟
모델 컨텍스트 프로토콜 용으로 제작 | MCP 커뮤니티에서 ❤️로 제작
Available Tools
1 toolexecute_commandB
Execute a shell command in a specified directory using a specified shell
Inputs: command (required), shell (required), cwd (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool has a clear and distinct purpose.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against for patterns or conventions.
A single tool is generally too few for a server's purpose, as it limits functionality and scope. For a shell server, this feels thin and may not cover common use cases effectively.
The tool surface is severely incomplete for a shell domain. It lacks operations for file management, process control, environment variables, or other common shell tasks, leading to significant gaps that will cause agent failures.
Maintenance
Related MCP Connectors
I run shell commands on your private cloud environment (bash, sh, zsh)
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Related MCP Servers
- AlicenseBqualityDmaintenanceA secure server for executing terminal commands within predefined paths, allowing safe interaction by Large Language Models with operating system environments.141 npm18MIT
- FlicenseNot gradedqualityDmaintenanceEnables safe execution of terminal commands across different shells (bash, cmd, PowerShell) with configurable timeouts, working directories, and resource limits for command-line operations through AI assistants.-
- AlicenseAqualityDmaintenanceEnables AI assistants to execute terminal commands on a host machine with configurable, granular permission controls and safety protections. It features multiple security modes, including allowlists and manual approval, to ensure safe command execution within specified directories.6Apache 2.0
- AlicenseNot gradedqualityCmaintenanceProvides a secure environment for executing shell commands with restricted directory access and timeout enforcement. It includes tools for running commands, managing execution history, and isolating environment variables.24 npmMIT