Skip to content

Latest commit

 

History

143 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-dev Proxy (AKA mdp)

Run multiple dev servers from different branches and even repos behind a single port.

The problem

If you use git worktrees (or just multiple clones) to work on several branches at once, every dev server ends up on a different port. This creates two headaches:

  1. OAuth breaks. Providers like Google, GitHub, and Auth0 require you to allowlist exact redirect URLs (e.g. http://localhost:3000/callback). A different port means a different origin, which means your OAuth flow fails unless you register every port with every provider and those ports change every time you restart.
  2. Port juggling. You have main on :5173, your feature branch on :5174, and a backend in another worktree on :9091. Remembering which port is which, updating .env files, and wiring frontend→backend URLs correctly becomes a constant distraction.

mdp solves both by putting all your dev servers behind stable, fixed ports. One allowlisted OAuth redirect URL works for every branch. Switch between branches is instant either in the browser via a floating widget or from the terminal without restarting anything or touching a single config file.

How it works

mdp runs an orchestrator that manages multiple reverse proxies, one per port you want to expose. Each proxy routes requests to registered dev servers using a cookie. A small widget is injected into every HTML response giving you a floating switcher at the top of the page. A TUI shows all proxies and services and lets you switch between them from the terminal.

browser → :3000 (frontend proxy) → :42301 (main branch)
                                  → :38847 (feature/auth branch)
        → :4000 (api proxy)      → :20234 (api/main)
                                  → :20235 (api/feature-auth)

See docs/concepts.md for service groups, switching resolution order, and multi-repo naming.

Quick start

# Terminal 1 — start the orchestrator (opens TUI)
mdp

# Terminal 2 — run your frontend dev server
mdp run -P 3000 -- npm run dev

# Terminal 3 — run your backend
mdp run -P 4000 -- go run ./cmd/server

# Open http://localhost:3000 — use the widget to switch branches

Install

brew install drgould/mdp/mdp

Other methods (curl, Scoop): see docs/installation.md.

Documentation

License

GPL-3.0. See LICENSE.

About

Run multiple dev servers from different branches and repos behind a single localhost port.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages