Capsule Bash Server
OfficialCapsule Bash MCP
AI 에이전트가 안전하고 지속적인 샌드박스 환경에서 bash 명령을 실행할 수 있도록 하는 MCP 서버입니다.
작동 방식
각 세션은 WebAssembly 샌드박스 내부에서 실행됩니다. 샌드박스는 다음을 제공합니다:
지속적인 상태: 세션 내의 명령 간에 cwd, 환경 변수 및 파일 시스템 변경 사항이 유지됩니다.
파일 시스템 차이(diff): 모든
run응답에는 디스크에서 변경된 내용의 차이가 포함됩니다.격리된 메모리: 각 세션은 고유한 주소 공간을 가지며 세션 간 데이터 유출이 없습니다.
호스트 접근 불가: 샌드박스는 호스트 파일 시스템이나 네트워크에 접근할 수 없습니다.
Capsule Bash에 대해 더 알아보세요.
Related MCP server: execkit-mcp
도구
도구 | 설명 |
| 샌드박스 세션에서 bash 명령을 실행합니다. stdout, stderr, 종료 코드, 파일 시스템 차이 및 현재 상태(cwd + env)를 반환합니다. |
| 세션의 파일 시스템 및 상태(cwd, 환경 변수)를 초기 값으로 재설정합니다. |
| 모든 활성 세션을 나열합니다. |
세션
동일한 session_id 내의 명령은 호출 간에 cwd, 환경 변수 및 파일 시스템 상태를 공유합니다.
예시
AI 에이전트에게 다음과 같이 요청하세요:
"숫자 목록의 평균을 구하는 Python 스크립트를 작성해 줘."
에이전트는 순차적으로 run을 호출합니다:
{ "command": "mkdir -p /data && cd /data", "session_id": "custom_session" }
{ "command": "echo 'nums = [x for x in [1, 2, 3, []] if isinstance(x, int)]\nprint(sum(nums) / len(nums))' > avg.py", "session_id": "custom_session" }
{ "command": "python3 avg.py", "session_id": "custom_session" }각 호출은 stdout, stderr, exitCode, 파일 시스템 diff 및 업데이트된 state를 반환하여 컨텍스트를 풍부하게 하고 대화 기록을 추적합니다.
설정
MCP 클라이언트 구성(예: Claude Desktop, Cursor)에 추가하세요:
{
"mcpServers": {
"bash": {
"command": "npx",
"args": ["-y", "@capsule-run/bash-mcp"]
}
}
}제한 사항
모든 bash 명령 및 옵션이 구현된 것은 아닙니다. 명령이 누락되었거나 예상치 않게 작동하는 경우 이슈를 열어 알려주세요.
Available Tools
3 toolsresetA
Reset a session's filesystem and shell state (cwd, env vars) to their initial values. Useful to start fresh without creating a new session.
Inputs: session_id.
runB
Execute a Bash command in the sandboxed environment
Inputs: command (required), session_id.
sessionsA
List all active session IDs and their current state.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a unique, clear purpose: reset reverts state, run executes commands, and sessions lists active sessions. No ambiguity or overlap exists.
All tool names are single, imperative verbs (reset, run, sessions) following a consistent, simple pattern.
Three tools is well-scoped for a bash sandbox server, covering essential operations without superfluous or missing tools.
The set covers core actions (run, reset, list sessions) but lacks explicit session creation; likely sessions are created implicitly, leaving a minor gap.
Maintenance
Related MCP Connectors
Secure Linux sandboxes for AI agents, as MCP tools.
Cloud Linux VMs for your agent: run code, Docker, files and HTTPS previews in a Sandboxer microVM.
Linux machines for AI agents: create, run commands, snapshot, fork, sandbox. Alpha.
Autonomous agent guardrails, bash sandboxing, MCP rugpull diffing & prompt firewalls.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA throwaway Docker sandbox for agents to run code and shell commands safely.8 npmMIT
- AlicenseAqualityBmaintenanceStateful, structured, safe shell sessions for AI agents, on real infrastructure.713Apache 2.0
- AlicenseAqualityBmaintenanceExposes persistent, stateful remote Bash sessions to AI agents via SSH, enabling command execution with preserved working directory and environment.772 npm1MIT
- AlicenseAqualityCmaintenanceSandboxed bash execution MCP server for AI agents, using an in-memory virtual filesystem overlay to prevent real filesystem damage, with configurable network access, timeouts, and optional Python/JS runtimes.984 npmApache 2.0