# Purgatory (p7y)

Connects AI agents to isolated Docker sandboxes on your server. Runs compose stacks and puts idle environments to sleep.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: p7y-dev
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/p7y-dev/p7y
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/purgatory-p7y

## What it does

This MCP server connects AI agents to self-hosted sandbox environments. Each workspace runs an independent Docker daemon, exposes HTTP routes for web apps, and provides direct TLS endpoints for databases. Inactive sandboxes pause automatically to preserve system memory, waking up whenever an incoming HTTP call arrives.

Under the hood, the system coordinates Docker-in-Docker, Traefik, frp, and Sablier. Deploying the host requires Docker Engine with the compose plugin along with available ports 80 and 443. Development is in an early stage prior to version 1.0. Breaking changes between minor releases are expected.

Running untrusted code from strangers on this setup is risky without `sysbox`. Sandboxes default to privileged `dind` containers, so hostile payloads could compromise the host.

## Requirements
- Needs: Docker
- Remote server: `https://p7y.{domain}/mcp`

## Install

### Claude Code (native platform)

1. **Template address**
- The server address is a template: replace {…} or […] with your own values

2. **Platform CLI: remote server**
```bash
claude mcp add --transport http purgatory-p7y https://p7y.{domain}/mcp
```

### Codex

1. **Template address**
- The server address is a template: replace {…} or […] with your own values

2. **Platform CLI: remote server**
```bash
codex mcp add purgatory-p7y --url https://p7y.{domain}/mcp
```

### Cursor

1. **Template address**
- The server address is a template: replace {…} or […] with your own values

2. **Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "purgatory-p7y": {
            "url": "https://p7y.{domain}/mcp"
        }
    }
}
```

### GitHub Copilot

1. **Template address**
- The server address is a template: replace {…} or […] with your own values

2. **Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "purgatory-p7y": {
            "type": "http",
            "url": "https://p7y.{domain}/mcp"
        }
    }
}
```

### Gemini CLI

1. **Template address**
- The server address is a template: replace {…} or […] with your own values

2. **Platform CLI: remote server**
```bash
gemini mcp add -t http purgatory-p7y https://p7y.{domain}/mcp
```

## When to use it
- spin up isolated Docker containers using an AI agent
- assign public web URLs and TLS endpoints to agent builds
- suspend inactive sandboxes to free up host memory
- restrict agent permissions to a single sandbox token

## Example prompts
- Create a new Purgatory sandbox and deploy the services from docker-compose.yml
- Check the sandbox status and return the public URL for the running app
- Shut down the sandbox and archive its volume data

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
