About Purgatory (p7y)
Purgatory (p7y) is a self-hosted Docker sandbox service for teams and their AI agents to deploy apps with Docker Compose. Each sandbox has its own Docker daemon and app URL, and idle sandboxes can sleep and wake on requests.
Key features
- 01Dedicated Docker daemon per sandbox
- 02Deploy with Docker Compose
- 03Public app URLs and TLS endpoints
- 04Idle sleep and request-based wake
- 05Sandbox-scoped agent tokens
Use cases
- 01Give agents isolated environments for app deployments
- 02Publish team apps at individual URLs
- 03Pause idle sandboxes while retaining their data
MCP support
The MCP server lets agents operate Purgatory sandboxes. The README also describes calling its tools through JSON-RPC over HTTP.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://{purgatory_host}/mcpclaude mcp add --transport http csakaszamok-p7y https://{purgatory_host}/mcp{"mcpServers":{"csakaszamok-p7y":{"type":"http","url":"https://{purgatory_host}/mcp"}}}Open in Cursor{"servers":{"csakaszamok-p7y":{"type":"http","url":"https://{purgatory_host}/mcp"}}}Open in VS Code{"mcpServers":{"csakaszamok-p7y":{"type":"http","url":"https://{purgatory_host}/mcp"}}}{"mcpServers":{"csakaszamok-p7y":{"serverUrl":"https://{purgatory_host}/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
https://{purgatory_host}/mcpAuth requiredTools
Details
From the project README
Purgatory (p7y)
Note
Early, before 1.0. It works and is tested (CI on every change, releases with a changelog), but expect rough edges, and breaking changes between minor versions.
Self-hosted sandboxes for your team and their AI agents: everyone gets their own Docker, every app gets a URL, idle sandboxes sleep.
Think of it as a self-hosted Vercel for the apps your team and its agents spin up. Today you deploy with docker compose; git-based builds are on the roadmap.
About 10 seconds from New sandbox to your own Docker and a public URL for your app; a sleeping sandbox is back in under 10. (Measured with the images already pulled: the first sandbox on a new server also downloads them.)
- Its own Docker daemon for every sandbox (with a Portainer UI if you want one)
- A public URL for every app, and TLS addresses for Postgres, Redis and SSH
- Sleeps when idle, wakes on the next request; a delete archives, nothing is lost
- Made for agents: tokens limited to one sandbox, an agent guide, an MCP server and a Claude Code plugin (
/plugin marketplace add p7y-dev/p7y, then/p7y:initconnects each project: Purgatory shows the line under Let your agent deploy…)
Hide the complexity. Keep it simple. Focus on what matters.
Purgatory abstracts away infrastructure complexity and operational overhead, providing an intuitive user experience that lets users focus on their work and business goals rather than managing the underlying technology.
Why Purgatory, and how it compares with a laptop, a cloud PaaS, a shared Docker host, Coolify and a VM for everyone · How it works: the components (Docker-in-Docker, frp, Traefik, Sablier), a sandbox's lifecycle and the path of a request
The same from a script or an agent
All real runs, in real time; press one to watch it.
With curl through the API, by an agent over the MCP server, and the MCP server by hand (JSON-RPC over HTTP, so even curl can call its tools).
Try it on your laptop
With Docker Desktop, or Docker Engine and the compose plugin on Linux, and ports 80 and 443 free (on Windows, in Git Bash or WSL):
mkdir p7y && cd p7y
curl -fsSLO https://github.com/p7y-dev/p7y/releases/latest/download/docker-compose.yml
curl -fsSL https://github.com/p7y-dev/p7y/releases/latest/download/setup.sh | bash # prints the admin password
docker compose up -d
Open http://p7y.lvh.me (lvh.me and all its subdomains point to 127.0.0.1, so no DNS to set up), sign in as administrator with the password setup.sh printed, and press New sandbox. The first one takes a minute or two while the images are pulled; after that about 10 seconds. Its app opens at its own http://<name>-….lvh.me address.
An app takes seconds to open the first time? In Chrome, Settings → Privacy and security → Security → Use secure DNS: with "your current service provider" each new
*.lvh.mename can wait for a slow or filtering resolver. Turn it off, or pick a provider such as Cloudflare (1.1.1.1).
To remove it: delete the sandboxes in the UI first (each is a compose project of its own, so the next step would leave them running), then docker compose down -v in the p7y directory, and delete the directory.
Install
On a Linux host with Docker Engine and the compose plugin, no clone needed (check the host first):
mkdir p7y && cd p7y
curl -fsSLO https://github.com/p7y-dev/p7y/releases/latest/download/docker-compose.yml
curl -fsSL https://github.com/p7y-dev/p7y/releases/latest/download/setup.sh | bash -s -- dev.example.com # .env with your domain and random secrets
docker compose up -d
Then sign in at http://p7y.<HOST_DOMAIN> (by default http://p7y.lvh.me).
When to use something else
Purgatory is for a team's apps and agents' deployments that should be up at a URL, cheaply, on your own server. For other jobs other tools fit better:
- Production that must scale and stay up → a cloud PaaS, or Coolify / Dokploy on your own servers
- Untrusted code from strangers → a microVM sandbox such as E2B or Docker Sandboxes (until Purgatory has a Kata runtime)
- Writing code in a cloud IDE → Coder or GitHub Codespaces
- An agent running short scripts from an SDK → E2B or Daytona
More in how it compares.
Documentation
p7y-dev.github.io/p7y: tutorials, install, configuration, let your agent deploy, MCP, API, and llms-full.txt for agents.
Security: where sysbox is installed, sandboxes run without a privileged container; without it they fall back to the privileged
dind, which suits a team that trusts each other, not hostile code. On a shared server install sysbox and setALLOWED_RUNTIMES=sysbox(details).
Contributing · Security issues · AGPL-3.0
Free to use, also commercially, on your own servers or for your customers. Changed it and people use it over the network? Then they get your changed source too, under the same license (AGPL-3.0). Every product built on Purgatory says so: Based on Purgatory (p7y), in its About page and its docs, is marked as changed, and does not take the names "Purgatory" or "p7y" (NOTICE). Versions up to 0.10.3 were released under Apache-2.0.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.