Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 3 min read

How to Connect Cursor & Claude Code to Your Local Laravel Database, Logs & MailCatcher on macOS (Zero Docker)

Disclosure: I am the creator of Stratos (stratosapp.dev), mentioned below alongside standalone open-source bash helpers you can run independently without installing Stratos. If you use Cursor, Claude Code, Claude Deskto

Disclosure: I am the creator of Stratos (stratosapp.dev), mentioned below alongside standalone open-source bash helpers you can run independently without installing Stratos.

If you use Cursor, Claude Code, Claude Desktop, or Windsurf on a Laravel or PHP project on macOS, the hardest bottleneck is rarely code generation speedβ€”it is context switching:

  1. The model invents column names or foreign keys that don't match your local migrations.
  2. You copy-paste stack traces out of storage/logs/laravel.log or Nginx error logs.
  3. To verify password reset or verification flows, you open another app just to copy a link out of Mailpit/Mailtrap.
  4. Meanwhile, Docker Desktop or Laravel Sail spins a Linux VM over VirtioFS and drains your MacBook battery.

Here is how to fix both the local runtime overhead and the AI editor context loop cleanly on macOS.

Step 1: Audit Your Local .test Stack or Docker Overhead (Open-Source CLI Helpers)

Before changing your workflow, I open-sourced three tiny, read-only shell scripts you can inspect line-by-line on GitHub:

Step 2: Connect Cursor or Claude Code via Loopback MCP (No Manual Wrappers)

In Stratos v1.7.1 (native Swift & SwiftUI for macOS 13.0+), a local Model Context Protocol (MCP) server bridge lives at http://127.0.0.1:9921/mcp.

How it stays locked down:

  • Off by default until you click Start bridge inside Tools β†’ Local AI & MCP.
  • Loopback Bearer token authentication: rotated whenever you restart the bridge.
  • 1-click client setup: writes or updates .cursor/mcp.json, .mcp.json (Claude Code), claude_desktop_config.json (Claude Desktop), or ~/.codeium/windsurf/mcp_config.json (Windsurf) while backing up existing config.

Clear Free vs. Pro Capability Boundary

  • Free Forever (no account required):
    • 1-click MCP client config writer
    • get_sites / stratos://sites: domains, PHP versions (8.1–8.5), Nginx paths, and service status
    • get_schema: read-only SQLite, MySQL, and PostgreSQL column names, types, primary keys, nullability, and foreign keys (no table row dumps or secrets)
    • Plus daily previews in the UI: 3 Visual Tinker queries/day, 1 ER Diagram/day, 15m/day Cloudflare Tunnel, and a 7-day in-app Pro trial
  • Pro ($39/yr), Founder Lifetime ($89 once for 3 Macs), or Team ($129/yr):
    • Live telemetry tools (Nginx/PHP logs, dump streams, request traces, and opt-in mail inspection)
    • Human-approved PHP, SQL, and Laravel Artisan execution directly from your AI editorβ€”every state-changing call pauses for an explicit macOS confirmation dialog before running

Step 3: Architecture Links & Full Docs

P.S. Through November 30, 2026, Stratos Black Friday / Cyber Monday pricing is active automatically at checkout ($149 β†’ $89 for Founder Lifetime across 3 Macs, and $59/yr β†’ $39/yr for Pro Annual β€” see https://stratosapp.dev/buy/).

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.