
mcp-sandbox-setup
Updated 1mo agoby 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
| File | Purpose |
|---|---|
docker-compose.yml | Declares both containers, the network between them, and the mounts |
Dockerfile | Builds the MCP server image (Ubuntu base + pipx install) |
nginx/mcp-tls.conf | nginx config, proxies host port 443 to the server container |
nginx/gen-cert.sh | bash shell script to generate TLS certificate |
config/config.toml | Server 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 OS | Install Docker |
|---|---|
| Linux | sudo curl -fsSL https://get.docker.com | sh |
| macOS | Docker Desktop for Mac |
| Windows | Docker 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
| Command | What it does |
|---|---|
sudo docker compose up -d --build | Build images and start both containers |
sudo docker compose logs -f mcp-server-remote | Tail the MCP server logs |
sudo docker compose exec mcp-server-remote bash | Shell into the server container (no SSH needed) |
sudo docker compose down | Stop and remove the stack |
Related servers

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

mcp-server-fetch
OfficialUpdated 14d agoA Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

@modelcontextprotocol/server-everything
OfficialUpdated 14d agoMCP server that exercises all the features of the MCP protocol