Command Palette

Search for a command to run...

Home / Servers

mcp-sandbox-setup

Updated 1mo ago

by geomux

mcp-sandbox-setup

Docker Compose stack that builds two containers on a remote host: an nginx reverse proxy (open to internet traffic) and a remote MCP server (only nginx can reach it). Ideal for blast radius containment when testing LLMs and sketchy code.

Intended for use as a disposable sandbox for Cybersecurity purposes. Prompt injection only impacts contents inside the container, not on the host.

System:  {user} <--> mcp-client-console <--> internet <--> {host:443} <--> nginx <--> mcp-server-remote <--> tools
Stack:   docker-compose.yml <--> Dockerfile <--> config/config.toml + nginx/mcp-tls.conf

Repo Layout

FilePurpose
docker-compose.ymlDeclares both containers, the network between them, and the mounts
DockerfileBuilds the MCP server image (Ubuntu base + pipx install)
nginx/mcp-tls.confnginx config, proxies host port 443 to the server container
nginx/gen-cert.shbash shell script to generate TLS certificate
config/config.tomlServer config, mounted into the container (edit this before first run)

User Guide | Installation

Requires Docker Engine and the Docker Compose plugin on the host.

MUST FOLLOW DIRECTIONS BELOW TO PROPERLY SETUP THE SANDBOX

[!NOTE] This repo stack allows HTTPS only, and you will need the .crt generated in installation below unless you reach the sandbox containers through a tunnel.

git clone https://github.com/geomux/mcp-sandbox-setup.git
cd mcp-sandbox-setup/config && cp config.toml.example config.toml && openssl rand -hex 32

COPY FRESHLY GENERATED TOKEN TO CLIPBOARD, PASTE INTO [auth] BELOW Populate config file as desired while inside the file during next step

nano config.toml && cd ..
./nginx/gen-cert.sh
sudo docker compose up -d --build

User Guide | Prerequisites (any OS)

Works on Linux, macOS, and Windows... the actual sandbox containers are Linux.

Host OSInstall Docker
Linuxsudo curl -fsSL https://get.docker.com | sh
macOSDocker Desktop for Mac
WindowsDocker Desktop for Windows
On Windows, Install Docker commands to be run through WSL

User Guide | Configuration

The server config lives in this repo at config/config.toml and is bind mounted into the container. Edit it on the host, no need to enter the container:

[server]
name = "Sandbox_1"  # Label for this sandbox
host = "0.0.0.0"    # Bind all container interfaces so nginx can reach it. Do NOT use 127.0.0.1 here.

Generate a token with openssl rand -hex 32 and paste it into [auth], same drill as the server repo. Restart the stack after any config change:

sudo docker compose restart mcp-server-remote

User Guide | Operation

CommandWhat it does
sudo docker compose up -d --buildBuild images and start both containers
sudo docker compose logs -f mcp-server-remoteTail the MCP server logs
sudo docker compose exec mcp-server-remote bashShell into the server container (no SSH needed)
sudo docker compose downStop and remove the stack

Related servers

n8n

Updated today

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

204,501

mcp-server-fetch

OfficialUpdated 14d ago

by modelcontextprotocol

A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

90,371

@modelcontextprotocol/server-everything

OfficialUpdated 14d ago

by modelcontextprotocol

MCP server that exercises all the features of the MCP protocol

90,371

mcp-server-git

OfficialUpdated 14d ago

by modelcontextprotocol

A Model Context Protocol server providing tools to read, search, and manipulate Git repositories programmatically via LLMs

90,371