Skip to main content

Sandboxed security testing MCP server for Claude Code

Project description

Strix Sandbox MCP Server

Sandboxed security testing tools for Claude Code via MCP (Model Context Protocol).

Overview

This MCP server provides 35 tools for security testing in isolated Docker containers:

  • Browser Automation - Playwright-powered web interaction (12 tools)
  • HTTP Proxy - mitmproxy-based traffic interception (7 tools)
  • Terminal Execution - tmux-based command execution (2 tools)
  • Python Execution - IPython-based code execution (2 tools)
  • Findings Tracking - SQLite-backed vulnerability documentation (5 tools)
  • File Operations - Workspace file management (3 tools)
  • Sandbox Management - Container lifecycle control (3 tools)

Quick Start

1. Build the Docker Image

cd strix-sandbox-mcp
docker compose build

2. Start the Container

docker compose up -d

3. Configure Claude Code

Add the MCP server to your Claude Code configuration:

claude mcp add strix-sandbox -- python -m strix_sandbox.server

Or add to your MCP settings file:

{
  "mcpServers": {
    "strix-sandbox": {
      "command": "python",
      "args": ["-m", "strix_sandbox.server"]
    }
  }
}

Tools Reference

Sandbox Management

Tool Description
sandbox_create Create an isolated sandbox environment
sandbox_destroy Destroy a sandbox and cleanup resources
sandbox_status Get status and resource usage of a sandbox

Browser Tools

Tool Description
browser_launch Launch a Chromium browser
browser_goto Navigate to a URL
browser_click Click at coordinates
browser_type Type text into focused element
browser_scroll Scroll page up/down
browser_screenshot Take a screenshot
browser_execute_js Execute JavaScript
browser_new_tab Open a new tab
browser_switch_tab Switch to a different tab
browser_close_tab Close a tab
browser_get_source Get page HTML source
browser_close Close the browser

Proxy Tools (mitmproxy)

Tool Description
proxy_start Start/restart the proxy
proxy_list_requests List captured HTTP requests
proxy_view_request View request/response details
proxy_send_request Send an HTTP request
proxy_repeat_request Replay a captured request with modifications
proxy_set_scope Configure interception scope
proxy_get_sitemap Get discovered sitemap

Terminal Tools

Tool Description
terminal_execute Execute a shell command
terminal_send_input Send input to running process

Python Tools

Tool Description
python_execute Execute Python code
python_session Manage Python sessions

Findings Tools

Tool Description
finding_create Record a security finding
finding_list List recorded findings
finding_update Update an existing finding
finding_delete Delete a finding
finding_export Export findings as report

File Tools

Tool Description
file_read Read a file from workspace
file_write Write content to a file
file_search Search files using ripgrep

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Claude Code (Client)                      │
└─────────────────────────────────────────────────────────────┘
                              │
                              │ MCP Protocol (stdio)
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                 strix-sandbox MCP Server                     │
│                    (Python + FastMCP)                        │
│                                                             │
│  src/strix_sandbox/                                         │
│  ├── server.py          # MCP tool definitions              │
│  ├── tools/             # Tool implementations              │
│  └── runtime/           # Docker container management       │
└─────────────────────────────────────────────────────────────┘
                              │
                              │ HTTP (port 9999)
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                   Docker Container (Sandbox)                 │
│                                                             │
│  ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐  │
│  │ Playwright│ │   tmux    │ │  IPython  │ │ mitmproxy │  │
│  │ (Browser) │ │ (Terminal)│ │ (Python)  │ │  (Proxy)  │  │
│  └───────────┘ └───────────┘ └───────────┘ └───────────┘  │
│                                                             │
│  container/                                                 │
│  ├── tool_server.py    # FastAPI tool execution server      │
│  ├── browser_instance.py                                    │
│  ├── terminal_session.py                                    │
│  └── python_instance.py                                     │
└─────────────────────────────────────────────────────────────┘

Development

Prerequisites

  • Python 3.12+
  • Docker
  • Poetry (optional, for local development)

Local Setup

# Install dependencies
pip install -e ".[dev]"

# Run the MCP server locally
python -m strix_sandbox.server

# Run tests
pytest tests/

Building Docker Image

# Build image
docker build -t strix/sandbox-mcp:latest ./container

# Run container
docker run -d --name strix-sandbox \
    -p 9999:9999 -p 8080:8080 \
    -e TOOL_SERVER_TOKEN=your-token \
    --cap-add SYS_ADMIN \
    strix/sandbox-mcp:latest

Security Considerations

  • The sandbox container runs with SYS_ADMIN capability (required for Playwright)
  • All tool execution is isolated within Docker containers
  • Authentication is required for the tool server (token-based)
  • File operations are restricted to the /workspace directory
  • Only use for authorized security testing

License

MIT License - See LICENSE for details.

Related Projects

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strix_sandbox-0.2.0.tar.gz (37.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strix_sandbox-0.2.0-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file strix_sandbox-0.2.0.tar.gz.

File metadata

  • Download URL: strix_sandbox-0.2.0.tar.gz
  • Upload date:
  • Size: 37.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for strix_sandbox-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c059b65adf1b8220aa7b0092a8fbcedafa18ab27a8aa01ed9ba8829ee45e6c58
MD5 89de08d42c113e35c0c0959c25f32294
BLAKE2b-256 99878ff665d486937ae0bfb8ded6d3435414f7240cbb2a65e80a1645c2994597

See more details on using hashes here.

File details

Details for the file strix_sandbox-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: strix_sandbox-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for strix_sandbox-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5afb845539fd48cab88630d362ddcb6fa9d74dd3bda32b4a3f8c18cd44080de
MD5 dcf1c63096fa7e15694be18d9b39dde4
BLAKE2b-256 1ee01aced1b8566ec4ea0e830fd86e18649bced32aa4726008889d6687d3ec8a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page