ClaudeCodeMod

All shelves / MCP servers

Laravel Codebase Introspection and Analysis

Capevace/laravel-codebase-mcp · 24 stars · PHP · MIT

MCP server MCP Server for Laravel Codebase Intelligence and Introspection

Install

The repo has no one-line install. Follow its README.

Open the repo

Files

README.md

Development Tests Status Latest Version GitHub Release Date

MCP Server for Laravel Codebase Intelligence and Introspection

For AIs to make sense of your codebase, they need to be able to know what's in it. While vector search is a powerful tool for searching through code, it uses a lot of tokens and doesn't even give you the full picture of your codebase for things like views or routes. This package implements a Model Context Protocol (MCP) server for the mateffy/laravel-introspect package, which allows you to introspect your codebase and get structured information about it.

  • 🔍 Let AI query views, routes, classes and models without needing to read through all of the code
  • 🔍 Can even use wildcards (*) to match multiple views, routes, classes and models
  • 🔍 Supports querying for things from Laravel packages, which most file searchers can't do
  • 🪄 Gives your AI quick overviews of your datamodel and its relationships
  • 🤖 Supports any AI agent implementing the MCP protocol

Query Available Filters
Views name, path, used by view, uses view, extends
Routes name, URI, controller + fn, methods, middleware
Classes name / namespace, extends parent, implements interfaces, uses traits
⤷ Models ... relationships, properties, casts, fillable, hidden, read/writeable
⤷ Commands ... signature, description (coming soon)

Name and a few other queries even support wildcard queries (e.g. components.*.paragraph)


Who is this for?

If you use AI tools like Aider, Cursor, Windsurf or Claude Code to help you build your app, this package is for you. Simply configure the MCP server in your agent and it can automatically query your codebase for views, routes, classes and models.

This is especially useful for large codebases where just searching through the code is less practical.

Example tasks

  • Give your AI an overview of your datamodel and its relationships
  • Refactoring views and making sure it's not used anywhere else
  • Finding all routes that use a specific controller
  • Finding models that use a specific trait or interface
  • Making sure all routes are using the correct middleware

laravel-codebase-mcp vs. laravel-introspect

The MCP server uses the laravel-introspect package to introspect your codebase and get structured information about it. If you want to write tests or run the same queries multiple times, you can also just use the package directly.


Installation

Install the package via composer:

composer require mateffy/laravel-codebase-mcp --dev

Note

At the moment, there is a dependency issue with php-mcp/server (#23) and ReactPHP (#542). You may temporarily need to use these patched forks if you run into issues when installing laravel-codebase-mcp by adding the following to your composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/leantime/php-mcp-server.git"
    },
    {
      "type": "vcs",
      "url": "https://github.com/Leantime/reactphp-http.git"
    }
  ]
}

And then add it to your AI agent's MCP configuration:

{
  "mcpServers": {
    "laravel-introspect": {
      "command": "php",
      "args": [
        "/path/to/your/codebase/artisan",
        "introspect:mcp"
      ]
    }
  }
}

Important

The MCP server is still in beta, there will probably be bugs!


Available queries

If you want to see all available queries, please check the laravel-introspect package documentation.


Acknowledgements

The MCP server uses the php-mcp/server package to implement the MCP protocol.


License

The MIT License (MIT). Please see License File for more information.

Facts

Kind
MCP server
Repo
Capevace/laravel-codebase-mcp
Group
Uncategorized
Stars
24
License
MIT
Language
PHP
Last push
2026-04-20
Forks
2

More on this shelf

  1. 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
  2. 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
  3. 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
  4. 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
  5. 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
  6. 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k