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.3.0.tar.gz (38.3 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.3.0-py3-none-any.whl (40.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: strix_sandbox-0.3.0.tar.gz
  • Upload date:
  • Size: 38.3 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.3.0.tar.gz
Algorithm Hash digest
SHA256 f18e0b3b694145e6c280e5a26bee34d92a4972ee32312481cf693ff59719b919
MD5 6e0b5b2eaee4155387e2a61190af4af9
BLAKE2b-256 ac57d3542f27dd081e4ffb13181923a23e558e23e883c77988612286bb6c7891

See more details on using hashes here.

File details

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

File metadata

  • Download URL: strix_sandbox-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 40.0 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3e5633585076432f8059cefd9073a3ef3849c90c89c6b49b61e9243835800c
MD5 e3be68152eacb991d98b687216967026
BLAKE2b-256 d891c3ef129968106394ed79f4e5a9dde871ee0a6aff373fb80fc21a9ba661ad

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