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:
- The model invents column names or foreign keys that don't match your local migrations.
- You copy-paste stack traces out of
storage/logs/laravel.logor Nginx error logs. - To verify password reset or verification flows, you open another app just to copy a link out of Mailpit/Mailtrap.
- 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:
-
Troubleshoot
.testDNS & Keychain SSL warnings (macos-local-ssl-doctor): Checks/etc/resolver/<tld>,dscacheutil, ports80/443vialsof, and Keychain Root CA trust. Repo: https://github.com/khorshedobs/macos-local-ssl-doctor -
Benchmark native PHP/Nginx vs Docker Desktop on your own Mac (
macos-laravel-stack-benchmark): Compares actual RSS memory (ps -axo rss,comm) alongside 20-iteration cold PHP CLI and 10-iterationphp artisan --versiontiming on your own hardware. Repo: https://github.com/khorshedobs/macos-laravel-stack-benchmark -
Prepare a non-destructive Sail-to-native transition (
laravel-docker-to-native-migrator): Readsdocker-compose.ymland.envto create.env.native(127.0.0.1+MAIL_PORT=1025) without overwriting your Docker.env. Repo: https://github.com/khorshedobs/laravel-docker-to-native-migrator
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 ($89once 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
- Full MCP Guide for Cursor & Claude Code: https://stratosapp.dev/docs/laravel-mcp-server-cursor-claude-code/
- MCP Security & Tool Reference: https://stratosapp.dev/docs/local-ai-mcp/
- Apple Silicon VirtioFS vs. Native APFS Notes: https://stratosapp.dev/docs/apple-silicon-docker-desktop-vs-native-swift-php-laravel/
- Download Stratos Universal DMG (Free Core Edition): https://stratosapp.dev/download/
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/).
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.