Mapin: A Laravel Code Graph Exposed via MCP So AI Agents Know What Depends on What
Brandon-Vergara · reddit · 2026-11-13
The author found generic language-agnostic code graph tools fail on Laravel: they only capture static calls, while real Laravel wiring is routes-to-methods, view(), Eloquent relations, container bindings, and event listeners. So he built Mapin.
Key design
- First-class graph of routes, controllers, views, Eloquent relations, container bindings, tasks, listeners, the scheduler, and JS calls to routes
- Exposed via MCP (built on laravel/mcp) and Artisan over the same underlying graph
- Returns found: false with suggestions instead of nearest-match guesses
- Every response reports graph freshness (base commit + files changed since)
- Incremental rebuilds by content hash; mapin:install-hooks updates after each commit/merge
Real-world scale
Runs on their multi-tenant ERP (4,700 PHP/Blade files): 25,000 nodes, 74,000 edges. Complements Laravel Boost (what the app contains vs. what depends on what). Of 58 logged found: false misses, 13 were naming variants now fixed in v0.2.5. MIT licensed, PHP 8.2+, Laravel 11.45–13.
More from coding & agent
- Student's AI agent defended his school's network from a cyberattack after he left for college — heyneighbor · 2026-11-13
- SGLang Summit agenda: LinkedIn serves ads model at 10K+ QPS under 80ms — DavidBennett__ · 2026-11-13
- Dev builds an OP-1-inspired skill for agentic coding, posted on GitHub Next — narphorium · 2026-11-13
- vork: open-source headless 3D/VFX engine for AI agents, renders black hole bending light in 18 min — ravisparikh · 2026-11-13
- Agent swarm spends $3M/month in tokens to build game Spawn, treats an hour without shipping as SEV-0 — dl_weekly · 2026-11-13
- GitHub Copilot CLI v1.0.110 adds masked sudo password prompts for agents and credit-aware /compact — copilot-cli-release-app[bot] · 2026-11-13