How I replaced my staging environment with MCP

Published: (December 14, 2025 at 04:37 AM EST)
3 min read
Source: Dev.to

Source: Dev.to

Overview

At a certain point in 2025, I wound up being overemployed with five jobs. I was pretty open about this with my bosses, and they reacted with curiosity, amusement, or non‑plussed indifference. I kept the gigs for a few months and didn’t get fired from any of them.

Stacks I Was Working With

  • GKE for the backend + Cloud Run
  • ECS + Fargate + SQS + Lambda + CDKTF + Cloud Build
  • Argo‑based Kubernetes
  • Next.js + Prisma + PostgreSQL
  • React + Lambda + CDK + Modal

Regardless of the stack, the same problem always came up: demoing work and sharing it for review was hard. Building software is messy, people make choices that don’t fit neatly into a single coherent stack, and even projects that tried to have per‑PR ephemeral environments hit rough corners that made these previews tough to use and maintain.

I basically just wanted to give people a link to my localhost. For a while I used ngrok, but that eventually stopped working, so I started building tools to help me. Those tools grew into Autodock – an MCP server that gives your AI coding tool a full staging environment with one prompt. The docs are a great resource if you need more info.

Setup

I use Claude Code as my workhorse, but the instructions are the same for any coding agent that supports MCP.

claude mcp add --transport http autodock https://autodock.io/api/mcp/streamable-http

Within the agent, run /mcp and select autodock. Press Enter to log in or sign up if it’s your first time, and you’re in.

Launch

The Autodock Dev Box comes pre‑installed with a suite of developer tools:

  • Languages via mise: node, python, go, rust
  • Infrastructure: docker, terraform, kubectl, localstack
  • AI tools: claude-code, aider, ollama
  • Browsers via playwright
  • Utilities: ripgrep, libfaketime, httpie, jq

I often demo Autodock with the project InboxPilot, but any repo works.

In Claude, type:

> Please launch an autodock dev box for this project

The assistant responds:

● autodock - env.launch (MCP)(name: "inboxpilot")
  ⎿  Your Autodock box is ready. Please offer to execute these steps for the user:
     1) Download and save the SSH key (link expires in 10 minutes):
        mkdir -p ~/.autodock/ssh && chmod 700 ~/.autodock/ssh
     … +37 lines
● Your Autodock dev box is ready.

Environment Details:
- Name: inboxpilot
- Slug: chilly-mollusk
- Status: ready
- URL: https://chilly-mollusk.autodock.io
- Auto‑stop: 30 minutes

To SSH directly:
ssh root@chilly-mollusk.autodock.io -i ~/.autodock/ssh/chilly-mollusk.pem

The assistant then offers next steps (sync code, run commands, expose ports). I chose to sync the project.

Sync

Autodock assumes localhost is the single source of truth. Your agent codes locally, but syncs regularly so updates are instantly available (e.g., via HMR).

> Could you please sync inboxpilot to the dev box?

Assistant output (truncated for brevity):

● autodock - env.sync (MCP)(projectName: "inboxpilot")
  ⎿  Environment: inboxpilot (push: local→remote)
     Project: inboxpilot → /workspace/inboxpilot
     SSH: root@chilly-mollusk.autodock.io:22
● Bash(rsync -avz --delete -e "ssh -i ~/.autodock/ssh/chilly-mollusk.pem -p 22 -o StrictHostKeyChecking=accept-new" ./ \
      root@chilly-mollusk.autodock.io:/workspace/inboxpilot)
  ⎿  sending incremental file list
     created directory /workspace/inboxpilot
     … +113 lines
● Synced successfully.

● Bash(find . -name '.env*' -type f 2>/dev/null | head -20)
  ⎿  ./backend/.env
     ./backend/.env.example
     ./frontend/.env.local
● Bash(grep -h "localhost" ./backend/.env ./frontend/.env.local 2>/dev/null || echo "No localhost references found")
  ⎿  DATABASE_URL=postgresql://postgres:postgres@localhost:5432/inboxpilot
     CLERK_AUTHORIZED_PARTIES=["http://localhost:3000","https://3000--sparkling-vulture.autodock.io"]
     CORS_ORIGINS=["http://localhost:3000","https://3000--sparkling-vulture.autodock.io"]
     SMTP_HOST=localhost

● I see the .env files have references to a previous dev box (sparkling‑vulture). Let me patch them for the new chilly‑mollusk environment and sync.

● Bash(ssh -i ~/.autodock/ssh/chilly-mollusk.pem root@chilly-mollusk.autodock.io \
      "cat > /workspace/inboxpilot/backend/.env  /workspace/inboxpilot/frontend/.env.local << 'EOF'
NEXT_PUBLIC_API_URL=https://8000--chilly-mollusk.autodock.io
EOF")
● Sync complete.

Summary:
- Synced all project files to /workspace/inboxpilot on the dev box
- Patched .env files with updated URLs for chilly‑mollusk
- Next steps:
  * Install dependencies (`npm install` for frontend, `poetry install` for backend)
  * Start services (PostgreSQL, backend API on port 8000, frontend on port 3000)

From here you can continue developing, testing, and sharing live URLs (e.g., https://8000--chilly-mollusk.autodock.io) with reviewers—all without leaving your local editor.

Back to Blog

Related posts

Read more »