Skip to main content
Glama
blazickjp

Shell MCP Server

by blazickjp

🖥️ 셸 MCP 서버

PyPI 버전 라이센스: MIT 파이썬 코드 스타일: 검정색

🚀 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"
)

⚙️ 구성

명령줄 인수를 사용하여 동작을 구성합니다.

논쟁

설명

directories

📁 허용된 디렉토리 목록

--shell name path

🐚 셸 사양(이름 및 경로)

환경 변수:

  • 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 커뮤니티에서 ❤️로 제작

Install Server
A
license - permissive license
B
quality
F
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    A secure server for executing terminal commands within predefined paths, allowing safe interaction by Large Language Models with operating system environments.
    1
    33
    16
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Enables 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.
  • F
    license
    -
    quality
    D
    maintenance
    A Model Context Protocol server that enables users to execute arbitrary shell commands through a terminal tool. It supports custom working directories, configurable execution timeouts, and safe command parsing using shlex.
  • A
    license
    A
    quality
    F
    maintenance
    Enables 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.
    6
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

  • Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.

  • Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/blazickjp/shell-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server