Answer in 50 Words
Next.js 16 Devtools MCP connects AI agents directly to your app's runtime — routing, cache semantics, render behavior — no framework lectures needed. Laravel Boost brings the same AI-native context to PHP. I wire both in ten minutes from Junagadh: config, MCP JSON, verification commands, and the traps to skip.

The old debugging loop wasted hours: paste stack trace, explain App Router, re-explain use cache tags, clarify server vs client, repeat. Devtools MCP collapses it — the agent reads runtime context itself. Strapi's Jun 2026 roundup lists it among the eight defining Next 16 features for good reason. Laravel answers through Boost: project-aware AI context for the PHP half. I run both daily. Setup below is timed at ten minutes because I timed it twice.
War Story 1: The Cache-Tag Ghost I Stopped Explaining
August, price fragment stale (Dispatch 5's ghost). Before Devtools MCP: twenty minutes narrating tag layout to the assistant, three wrong guesses. After: agent pulled the route's cache tags itself, spotted the missing campaign suffix in forty seconds, proposed the exact diff. I approved in two taps. The fix was identical. The narration bill went to zero. Multiply by five tag incidents a month and the MCP pays a salary in saved evenings.
Ten-Minute Setup (Both Stacks)
| Minute | Next.js side | Laravel side |
|---|---|---|
| 0–2 | Upgrade to Next 16, confirm next dev green |
Update to Boost-compatible Laravel 12, php artisan about green |
| 2–5 | Enable Devtools MCP endpoint, scope to project | Install Boost, generate project context file |
| 5–7 | Point agent at MCP URL, verify tools list | Point agent at Boost context, verify schema read |
| 7–10 | Ask "list my cache tags for /catalog" — confirm real answer | Ask "list quote routes + gates" — confirm real answer |
Verification questions must return project-specific truth, not generic docs. Generic answer means scope is wrong — fix before trusting anything.
Code: MCP JSON + Boost Context Check (Runnable)
// .mcp.json — project Devtools MCP wiring (scoped, local-first)
{
"servers": {
"next-devtools": { "url": "http://localhost:3000/__devtools/mcp", "scope": "project" }
}
}
# verify what the agent can actually see (run before trusting)
curl -s http://localhost:3000/__devtools/mcp/tools | head -c 600
php artisan boost:context --check
// routes/console.php — nightly context freshness check (keeps AI answers honest)
use Illuminate\Support\Facades\Schedule;
Schedule::call(function () {
$ctx = json_decode(file_get_contents(base_path('.ai/context.json')), true);
if (($ctx['routes'] ?? 0) < 10) {
logger()->warning('Boost context stale: route count low');
}
})->daily();
Don't do this: exposing Devtools MCP beyond localhost without auth. Runtime context includes route internals and data shapes — localhost + token, never public. My firewall drops external MCP probes daily. Yours will too.
What Each Side Sees (And Still Misses)
Devtools MCP reads routing trees, cache tag maps, render boundaries, build timing per step. It does not read your business rules — the OPA gate file stays human-owned, referenced but never auto-edited. Boost reads routes, models, jobs, and queue topology. It does not read supplier quirks — the Surat 18:00 bottleneck memo lives in my head and the runbook, linked from context, never hallucinated.
I keep a DECISIONS.md both agents can read: why pgvector over Milvus at this scale, why five-minute JWTs, why Gujarati cache keys. Agents with context files decide better. Agents without them improvise. Improvisation near payments is how staging burns nights.
When NOT to Wire AI Context
Skip when the repo is a weekend prototype with three routes — reading files is faster than MCP setup. Skip when contractors rotate weekly without secret hygiene — runtime context plus loose keys equals mapped treasure for attackers. Skip auto-applying agent diffs to gates, ledgers, or payment code — propose mode only, human merges. Ten-minute setup, ten-second approvals, zero auto-merges near money.
War Story 2: The Auto-Merge That Almost Shipped a Wildcard
Early test, agent proposed widening an MCP scope to catalog.* "for simplicity" with auto-apply on. Caught at the diff — the only reason auto-apply died that day across all my repos. The agent was helpful, fast, and wrong about blast radius. Now scope files are CODEOWNERS-locked to me, and every scope diff needs my explicit tap. Helpful plus wrong is the most expensive combination in AI tooling. Gates convert it to merely useful.
Build Logs That Teach: Reading the 615ms Breakdown
Next 16 build output now timestamps each phase — my SaaS template prints compiled successfully in 615ms, TypeScript in 1114ms, page-data collection after. I read these like vital signs: compile climbing while pages stay flat means a heavy client import slipped in (last month: a chart library pulled into the shared shell, caught by the 400ms jump). TypeScript climbing means type debt accruing — I run tsc --noEmit in CI with a 90-second budget and fail loud beyond it. Page-data climbing means fetches fan out too wide — the fix is use cache scoping plus revalidateTag discipline, not bigger iron.
Commands I keep taped to the monitor: next build --turbopack for the timed baseline, next dev --webpack only when bisecting a bundler-specific ghost, ANALYZE=true next build monthly to catch weight creep, php artisan octane:status plus php artisan queue:monitor on the Laravel side before every sale event. Numbers beat narratives: compile 615ms, cold 1.4s, HMR under 100ms felt, day RAM under 1GB, TTFB 60ms cached, API P95 42ms. When any of the six drifts fifteen percent without a traffic reason, I investigate the same day. Twice this year the drift caught a supplier rename before customers did.
I built this observability in one Friday: OTel JSONL sink, five Grafana-free text dashboards grepped from the log, Friday ledger review with the team. Total cost was an afternoon and one argument about tag naming. The argument was worth more than the dashboards.
Frequently Asked Questions
What is Next.js Devtools MCP?
A Model Context Protocol integration in Next.js 16 connecting AI assistants to live runtime context — routing, caching semantics, rendering behavior — so debugging starts from truth instead of twenty minutes of framework explanation.
What does Laravel Boost do for AI coding?
It makes the PHP project AI-readable: routes, models, jobs, and conventions exposed as structured context the agent queries before proposing diffs. Same philosophy as Devtools MCP, Laravel flavor, verified with boost:context --check.
Is exposing runtime context to AI safe?
Scoped to localhost with tokens, yes — and it stays inside the project. Never publish MCP endpoints publicly, never auto-merge scope or payment diffs, and keep OPA gates human-owned. My firewall logs daily external probes; scope accordingly.
How long does setup really take?
Ten minutes timed: two to confirm green baselines, three to enable endpoints, two to point agents, three to verify with project-specific questions. The eleventh minute — asking for cache tags and route gates and getting true answers — is the actual test.
Bottom Line
Agents that read runtime stop guessing framework and start fixing project. Ten minutes of wiring, scoped localhost, human merges near money. The evenings return immediately, every single week.
From Junagadh — AI development, automation, web development, work, contact. Related: /journal/nextjs-16-3-turbopack-memory-eviction-2026, /journal/mcp-auto-credential-risk-sep-2026-secure.