bash-command MCP server
✓ 인증됨AI 에이전트를 위해 고급 백그라운드 프로세스 오케스트레이션 및 관측성을 갖춘 쉘 명령 실행 기능을 제공합니다.
다른 이름 mrorigo/bash-command-mcp
- 스타
- 3
- Tools
- 6
- 다운로드, 30일
- —
- 최신 버전
- 1.0.0
- 마지막 커밋
- 2026년 5월 21일
- 라이선스
- MIT
bash-command MCP란?
bash-command은(는) MCP server입니다. AI 에이전트를 위해 고급 백그라운드 프로세스 오케스트레이션 및 관측성을 갖춘 쉘 명령 실행 기능을 제공합니다. 6개 도구를 제공합니다. 예: run, run_background, list_background.
프로젝트 README에서 생성된 요약
bash-command MCP server 정보
이 서버는 AI 에이전트가 백그라운드 프로세스 관리와 함께 쉘 명령을 실행할 수 있도록 지원합니다. 명령어를 포그라운드에서 실행하거나, 특정 라이프사이클 제어를 통해 장시간 실행되는 작업을 관리할 수 있는 구조화된 방법을 제공합니다. 개발자는 stdio를 통해 로컬에서 사용하거나, 특정 host 및 port 환경 변수를 설정하여 streamable HTTP를 통해 원격으로 사용할 수 있습니다.
사용자는 run_background, list_background, kill_background와 같은 도구를 사용하여 복잡한 워크플로우를 관리할 수 있습니다. 서버에는 OpenTelemetry를 통한 관측성이 내장되어 있어 OTLP HTTP를 통해 트레이스와 메트릭을 내보낼 수 있습니다. 또한 모니터링을 위해 프로세스별 stdout 및 stderr 로그 파일을 유지합니다. 보안을 위해 문서에서는 명령 실행을 호스트 머신으로부터 격리할 수 있도록 Docker 내에서 서버를 실행할 것을 권장합니다.
모든 명령어에 대해 cwd 및 env 오버라이드를 제공할 수 있어 정밀한 실행 컨텍스트를 유지합니다. 서버는 포그라운드 및 백그라운드 작업에 대해 타임아웃을 처리하며 기본값은 60초입니다. 명확한 종료 코드 의미론과 에이전트 작업에 대한 프로덕션급 가시성을 갖춘 고정밀 쉘 실행이 필요한 개발자를 위해 설계되었습니다.
활용 사례
- 1장시간 실행되는 백그라운드 작업 관리프로세스를 백그라운드에서 시작하고 로그 파일을 통해 진행 상황을 모니터링합니다.
- 2에이전트 성능 관측OpenTelemetry 인스트루멘테이션을 사용하여 도구 호출 시간과 실패를 추적합니다.
- 3명령 실행 격리쉘 명령이 호스트 시스템에 영향을 미치지 않도록 컨테이너 내부에서 실행합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
bash-command MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 bash-command MCP 설치
$ claude mcp add bash-command-mcp -- npx -y bash-command-mcpCursor에 bash-command MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"bash-command-mcp": {
"command": "npx",
"args": [
"-y",
"bash-command-mcp"
]
}
}
}VS Code에 bash-command MCP 설치
.vscode/mcp.json
{
"servers": {
"bash-command-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"bash-command-mcp"
]
}
}
}VS Code CLI에 bash-command MCP 설치
$ code --add-mcp '{"name":"bash-command-mcp","type":"stdio","command":"npx","args":["-y","bash-command-mcp"]}'Claude Desktop에 bash-command MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"bash-command-mcp": {
"command": "npx",
"args": [
"-y",
"bash-command-mcp"
]
}
}
}Codex에 bash-command MCP 설치
$ codex mcp add bash-command-mcp -- npx -y bash-command-mcpCodex config.toml에 bash-command MCP 설치
~/.codex/config.toml
[mcp_servers.bash-command-mcp] command = "npx" args = ["-y", "bash-command-mcp"]
Gemini CLI에 bash-command MCP 설치
$ gemini mcp add -s user bash-command-mcp npx -- -y bash-command-mcpGemini settings.json에 bash-command MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"bash-command-mcp": {
"command": "npx",
"args": [
"-y",
"bash-command-mcp"
]
}
}
}bash-command MCP 도구 6
README에서 감지됨runrun_backgroundlist_backgroundkill_backgroundtail_backgroundwait_background
| run | — | |
| run_background | — | |
| list_background | — | |
| kill_background | — | |
| tail_background | — | |
| wait_background | — |
구성
BASH_COMMAND_MCP_HOSTBASH_COMMAND_MCP_LOG_DIRDirectory used to store background process stdout/stderr log files.
BASH_COMMAND_MCP_PORTBASH_COMMAND_MCP_TRANSPORTOTEL_ENABLEDEnable or disable OpenTelemetry instrumentation (`true` or `false`).
OTEL_EXPORTER_OTLP_ENDPOINTOTLP HTTP endpoint for exporting OpenTelemetry traces and metrics (for example `http://localhost:4318`).
OTEL_METRIC_EXPORT_INTERVAL_MSOpenTelemetry metrics export interval in milliseconds.
OTEL_SERVICE_NAMEOpenTelemetry service name override.
OTEL_SERVICE_VERSIONOpenTelemetry service version override.
| 이름 | 설명 | 유형 |
|---|---|---|
| BASH_COMMAND_MCP_HOST | — | |
| BASH_COMMAND_MCP_LOG_DIR | Directory used to store background process stdout/stderr log files. | |
| BASH_COMMAND_MCP_PORT | — | |
| BASH_COMMAND_MCP_TRANSPORT | — | |
| OTEL_ENABLED | Enable or disable OpenTelemetry instrumentation (`true` or `false`). | |
| OTEL_EXPORTER_OTLP_ENDPOINT | OTLP HTTP endpoint for exporting OpenTelemetry traces and metrics (for example `http://localhost:4318`). | |
| OTEL_METRIC_EXPORT_INTERVAL_MS | OpenTelemetry metrics export interval in milliseconds. | |
| OTEL_SERVICE_NAME | OpenTelemetry service name override. | |
| OTEL_SERVICE_VERSION | OpenTelemetry service version override. |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능mrorigo/bash-command-mcp is public and reachablegithub.com/mrorigo/bash-command-mcp ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-05-21github.com/mrorigo/bash-command-mcp ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from bash-command-mcp통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음the package checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음6 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기bash-command-mcp
A highly sophisticated Bash MCP server for safe, structured command execution with first-class background job orchestration.
Important Security Warning
This server executes shell commands on the machine where it is running.
If you run bun run index.ts directly on your host, commands run on your host with your user permissions.
Use Docker to isolate execution unless you fully trust the MCP client and prompts.
To install dependencies:
bun install
To run over stdio:
bun run index.ts
To run over Streamable HTTP:
BASH_COMMAND_MCP_TRANSPORT=http \
BASH_COMMAND_MCP_HOST=127.0.0.1 \
BASH_COMMAND_MCP_PORT=3000 \
bun run index.ts
To run via npm/npx (published package):
npx -y bash-command-mcp
Why This Server
- High-fidelity shell execution with clear exit-code semantics.
- Advanced background process lifecycle controls (
run_background,wait_background,kill_background). - Built-in observability via per-process stdout/stderr log files.
- OpenTelemetry traces and metrics for production visibility.
- Agent-friendly ergonomics with
cwdandenvoverrides for precise execution context.
Tool Behavior
Tools:
run: run command in foreground. Args:commandorcmd,timeoutSeconds(default60, min1; values above86400are capped with a hint), optionalcwd, optionalenv.run_background: start command in background with stdout/stderr written to log files. Args:commandorcmd, optionalcwd, optionalenv.list_background: list tracked background processes, including log file paths.kill_background: stop tracked background process bypid.tail_background: show last N lines from background process logs. Args:pid, optionallines(default200, max5000).wait_background: wait for background process completion and return final status/output. Args:pid, optionaltimeoutSeconds(default60, min1; values above86400are capped with a hint).
OpenTelemetry
This server includes built-in OpenTelemetry instrumentation for traces and metrics.
- OpenTelemetry packages are installed with the server package.
- Telemetry initializes unless
OTEL_ENABLED=false. - If
OTEL_EXPORTER_OTLP_ENDPOINTis set, traces/metrics are exported via OTLP HTTP. - If no OTLP endpoint is configured, console exporters are used.
Instrumented operations:
- Tool call spans for
run,run_background,list_background,tail_background,wait_background, andkill_background. - Background lifecycle spans/counters (
started,ended). - Metrics for tool calls, failures, timeouts, and duration histograms.
Common env vars:
OTEL_ENABLED=true|falseOTEL_SERVICE_NAME=bash-command-mcpOTEL_SERVICE_VERSION=1.0.0OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318OTEL_METRIC_EXPORT_INTERVAL_MS=10000BASH_COMMAND_MCP_LOG_DIR=/path/to/log-dir
Example (OTLP Collector on localhost):
OTEL_ENABLED=true \
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 \
OTEL_SERVICE_NAME=bash-command-mcp \
npx -y bash-command-mcp
Transports
This server supports two transports:
stdiofor local, process-spawned integrations.httpfor remote or network-accessible MCP clients using Streamable HTTP.
Default behavior remains stdio so existing desktop and CLI setups keep working.
Environment variables for HTTP mode:
BASH_COMMAND_MCP_TRANSPORT=http|stdioBASH_COMMAND_MCP_HOST=127.0.0.1BASH_COMMAND_MCP_PORT=3000BASH_COMMAND_MCP_ALLOWED_HOSTS=localhost,127.0.0.1,[::1]
HTTP mode uses host-header validation by default when bound to a loopback address. If you bind to 0.0.0.0 or ::, provide an explicit allow-list in BASH_COMMAND_MCP_ALLOWED_HOSTS.
Docker
Build the image:
docker build -t bash-command-mcp .
Run with a local folder mounted at /workspace:
docker run --rm -i -v "$(pwd):/workspace" bash-command-mcp
Run over Streamable HTTP:
docker run --rm -p 3000:3000 \
-e BASH_COMMAND_MCP_TRANSPORT=http \
-e BASH_COMMAND_MCP_HOST=0.0.0.0 \
-e BASH_COMMAND_MCP_PORT=3000 \
bash-command-mcp
/workspace mapping explained:
- Left side (
$(pwd)) is a folder on your host machine. - Right side (
/workspace) is the path inside the container. - Commands run by this MCP server should target files under
/workspace; those changes are written back to the mapped host folder.
For HTTP mode in Docker, bind to 0.0.0.0 and publish the port with -p. If you expose the container beyond localhost, set BASH_COMMAND_MCP_ALLOWED_HOSTS to the hostnames you want to permit.
Example:
- If your host has
./project/file.txtand you run the container from./project, the same file is available in the container at/workspace/file.txt.
bash-command MCP 질문
bash-command MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add bash-command-mcp -- npx -y bash-command-mcp를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
bash-command MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
bash-command MCP는 어떤 도구를 제공하나요?
6개 도구를 제공합니다. 예: run, run_background, list_background, kill_background, tail_background.
호스트 머신에서 이 서버를 실행해도 안전한가요?
이 서버는 사용자 권한으로 쉘 명령을 실행하므로, 실행 환경을 격리하기 위해 Docker를 사용하는 것을 권장합니다.
명령어를 백그라운드에서 실행할 수 있나요?
네, 이 서버는 백그라운드 프로세스를 시작, 목록 확인, 종료, tail, 대기할 수 있는 도구를 제공합니다.
서버의 성능과 트레이스를 어떻게 모니터링할 수 있나요?
서버에 OpenTelemetry 인스트루멘테이션이 내장되어 있어 트레이스와 메트릭을 확인할 수 있습니다.
지원되는 전송 방식은 무엇인가요?
로컬 통합을 위한 stdio와 원격 또는 네트워크 접속 클라이언트를 위한 streamable HTTP를 지원합니다.