Skip to main content
Glama

mcp-sandbox-server

원격 MCP(Model Context Protocol) 서버로, AI 에이전트에게 샌드박스 호스트에 대한 인증된 셸 및 파일 접근을 제공합니다 — 또한 에이전트가 완전한 접근 권한을 가져서는 안 되는 별도의 프로덕션 호스트에 배포를 트리거할 수 있는 안전하고 제한된 경로도 제공합니다.

기능

  • 핵심 MCP 도구(run_command, read_file, write_file, list_directory)가 Streamable HTTP로 노출되므로, 에이전트가 샌드박스에서 직접 코드를 빌드하고 테스트할 수 있습니다.

  • 최소한의 OAuth 2.1 인증 서버를 처음부터 직접 구현했습니다. 동적 클라이언트 등록(RFC 7591), 단일 관리자 자격 증명으로 보호되는 authorize 엔드포인트, PKCE가 적용된 토큰 엔드포인트로 구성됩니다. 이는 MCP 클라이언트(예: claude.ai의 커넥터 UI)가 붙여넣은 bearer 토큰이 아닌 전체 OAuth 흐름을 기대하기 때문에 필요합니다 — 즉, 단일 관리자 설정에서도 서버가 이 흐름을 지원해야 합니다.

  • 더 민감한 두 번째 호스트로의 제한된 게이트웨이(biscuit_status, biscuit_logs, biscuit_deploy 등). 에이전트를 경계 안에 가두기 위해 도구 코드만 신뢰하는 대신, 실제 경계는 한 단계 아래에 있습니다. 전용 SSH 키가 대상 호스트의 authorized_keys에서 command="..."로 제한되므로, 클라이언트가 해당 키를 통해 무엇을 보내든 하나의 고정된 화이트리스트 스크립트만 실행될 수 있습니다. 여기서 도구 코드는 단순히 리터럴 액션 문자열을 구성할 뿐입니다 — 보안 경계는 도구 코드가 아니라 강제 명령입니다.

Related MCP server: ssh-mcp

이렇게 설계된 이유

흥미로운 제약은 동일한 에이전트에게 두 가지 매우 다른 신뢰 수준이 필요했다는 점입니다. 일회용 샌드박스에서는 완전하고 제한 없는 셸이 필요했지만, 라이브 서비스를 실행하는 호스트에서는 사전 승인된 소수의 읽기 위주 작업만 허용되어야 했습니다. 에이전트의 행동(프롬프트, 도구 설명 등)을 샌드박싱하려는 대신, 이 설계는 실제 경계를 에이전트가 무엇을 보내든 OS가 강제하는 수준으로 내립니다 — 강제 SSH 명령과 경로 탐색을 검사하는 화이트리스트 스크립트입니다.

스택

Node.js, Express, @modelcontextprotocol/sdk, Zod. 데이터베이스는 없습니다 — 인증 상태는 서버 옆에 있는 작은 JSON 파일에 저장됩니다.

참고

이것은 실제 프로덕션에서 실행 중인 서버의 식별 정보를 제거하고 축약한 사본입니다. 실제 호스트 이름, IP, 내부 프로젝트 이름은 자리 표시자(your-production-server-ip, project-a/project-b/project-c 등)로 대체되었습니다.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to securely execute commands on remote hosts via SSH and SFTP, with persistent shells, file transfers, screenshots, and an audit log.
    5
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to execute SSH commands and transfer files via SFTP through a centralized HTTP gateway with per-client authorization, layered command policies, audit logging, rate limiting, circuit breakers, and connection pooling.
    8
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to remotely execute shell commands and transfer files on SSH hosts, including jump-host tunneling, background tasks, resumable transfers, and optional approval of destructive commands, while SSH credentials remain in the local process. It runs over stdio or a streamable HTTP daemon and supports auditing, allow/deny lists, and multiple authentication methods.
    ISC
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to inspect and manage remote hosts over SSH with tiered blast-radius containment that classifies and blocks destructive commands, plus forensic post-flight assertions that verify ports, processes, files, and HTTP health. It also provides long-running background task envelopes and atomic SFTP file editing with automatic backups, unified diffs, and one-click rollback.
    12
    MIT