npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@achatainga/branchbox-mcp

v1.0.1

Published

Ephemeral Copy-on-Write Database Branching & Destructive Migration Firewall for AI Coding Agents

Readme

BranchBox MCP

Ephemeral Copy-on-Write Database Branching & Destructive Migration Firewall for Autonomous Coding Agents.

MCP 2026-07-28 License: MIT

The Problem

When autonomous agents (Claude Code, Cursor, Windsurf, Devin) run database tasks, they frequently wipe shared development databases or collide on ports:

  1. Destructive DDL: An agent executes prisma db push --force-reset, artisan migrate:fresh, or DROP DATABASE, destroying mock data and credentials.
  2. Port Collisions: Multi-agent sessions or parallel branches crash with EADDRINUSE: 5432.
  3. Dirty State: Agent fails halfway through a migration, leaving tables in an unrecoverable corrupted state.

The Solution

BranchBox MCP is a hybrid moat tool that pairs a PreToolUse Firewall with Stateless CoW Database Branching:

  • Destructive DDL Interceptor: Hard-blocks commands containing migrate:fresh, --force-reset, db:wipe, or naked DROP DATABASE via exit code 2.
  • Instant CoW Sandbox: Allocates ephemeral PostgreSQL/MySQL clones on dedicated non-colliding ports (54320-54399) per git worktree.
  • Auto-Rollback on Crash: Drops ephemeral schemas when an agent aborts or the worktree is destroyed.

Architecture

[Agent Shell / MCP Client]
            |
            v  (PreToolUse Hook)
+-----------------------------------+
|  Destructive DDL Firewall (exit 2)| ---> Blocked if --force-reset or migrate:fresh
+-----------------------------------+
            | (Clean)
            v
+-----------------------------------+
|   BranchBox CoW Socket Engine     |
|   - Dynamic port 54320-54399      |
|   - Template DB CoW snapshot      |
|   - Git worktree lifecycle hooks  |
+-----------------------------------+

Tools Provided

create_branch_db

Provisions an isolated ephemeral database branch for the current git worktree with dedicated credentials and non-colliding port.

inspect_migration_safety

Scans SQL or ORM migration files for destructive operations (DROP COLUMN, RENAME TABLE without view backfill) and returns structured mitigation plans.

destroy_branch_db

Tears down the ephemeral database container or schema once the agent completes verification.

Testing & Verification

Run the verification suite:

node tests/run_live_test.mjs

License

MIT © 2026 BranchBox Systems