</>MCP Agents Market
MCP Server

laravel-brain

by laramint902PHPUpdated 2026-09-07

Visualize your Laravel request lifecycle as an interactive graph

Claude CodeCursor

Laravel Brain MCP server provides AI assistants with programmatic access to Laravel application architecture analysis and codebase insights. It exposes tools that allow Claude Code, Cursor, and other MCP clients to query route structures, trace call chains, analyze complexity hotspots, inspect database operations, and retrieve contextual code snapshots. Developers use it to give AI coding assistants deep understanding of their Laravel projects without manually copying code, enabling more accurate refactoring suggestions, architecture reviews, and debugging assistance.

Key Features

Nine MCP tools exposing manifest, context, subgraphs, route security, file history, usage tracking, and riskiest files
Deterministic AI context export with BFS call-chain tracing, complexity hotspots, and DB/cache operations
Full Laravel lifecycle analysis: routes, controllers, services, models, jobs, events, commands, Filament panels
AI assistant rules generation for Claude Code, Cursor, Windsurf, Copilot, and five other tools
Database-backed or file-based storage drivers for multi-node and containerized deployments
Auto-rescan capability via brain_rescan tool to refresh graph data after code changes
Integration with laravel/mcp package (Laravel 11+) for automatic MCP protocol wiring
Read-only query interface—all tools read last persisted scan without filesystem access

Use Cases

  • 01Ask Claude Code 'which routes are public?' to audit application security surface
  • 02Query 'show me every caller of UserService::updateProfile' to assess refactoring impact
  • 03Request AI context for a specific route to get LLM-ready architecture snapshot for debugging
  • 04Generate project-specific AI rules files to keep Cursor and Copilot synchronized with current architecture
  • 05Identify riskiest files by commit churn × complexity to prioritize code review efforts
  • 06Trace event listener cascades and job chains to understand async workflow dependencies

Related MCP Servers

View more

laravel-brain — FAQ

What is laravel-brain MCP server?+

It's an MCP server that exposes Laravel application architecture analysis to AI assistants. It provides tools for querying routes, tracing code dependencies, analyzing complexity, and exporting structured context snapshots.

How do I install and connect laravel-brain to Claude Code?+

Install laravel/mcp with 'composer require --dev laravel/mcp', then register the server: 'claude mcp add brain -- php artisan mcp:start brain'. Run 'php artisan brain:scan' first to generate the graph data that MCP tools will query.

Which AI clients work with this MCP server?+

Any Model Context Protocol client works, including Claude Code, Cursor, and other MCP-compatible tools. It requires Laravel 11+ because laravel/mcp depends on Symfony Process 7.4.5+.

Do I need API keys or external services?+

No. The MCP server queries local scan data stored in your Laravel project (file or database storage). No external APIs or credentials are required.

Is laravel-brain free to use?+

Yes, it's MIT-licensed and installed as a Composer dev dependency. All features, including the MCP server and AI context export, are free.

What are the prerequisites?+

PHP 8.0+, Laravel 9-13, and Composer. The MCP server specifically requires Laravel 11+ and laravel/mcp package. Run 'php artisan brain:scan' to generate graph data before querying via MCP tools.

How do I install laravel-brain?+

Open the source repository on GitHub and follow its README. laravel-brain is a mcp server — MCP Agents Market links you directly to the official repo.

Is laravel-brain free?+

laravel-brain is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches