Laravel Codebase Introspection

by capevace

301 downloads
Not rated
GitHub

About

Introspects Laravel codebases to provide structured information about views, routes, classes, and models using the mateffy/laravel-introspect package.

Details

Author
capevace
Downloads
301
Categories
Developer Tools, Database, Knowledge Base, Other

- Query views, routes, classes, and models with structured filters
- Supports wildcard (*) matching for names, paths, etc.
- Can introspect code from Laravel packages
- Provides overviews of datamodel and model relationships
- Works with any AI agent implementing the MCP protocol

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Laravel Codebase Introspection
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via Composer as a dev dependency: composer require mateffy/laravel-codebase-mcp --dev. Then add it to your AI agent’s MCP configuration using the artisan command introspect:mcp (see config example in README). The server is currently in beta.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

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

Introspects Laravel codebases to provide structured information about views, routes, classes, and models using the mateffy/laravel-introspect package.

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 aModel Context Protocol(MCP) server for themateffy/laravel-introspectpackage, 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

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

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.

- 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-mcpvs.laravel-introspect

The MCP server uses thelaravel-introspectpackage 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 justuse the package directly.

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

At the moment, there is a dependency issue withphp-mcp/server(#23) and ReactPHP (#542). You may temporarily need to use these patched forks if you run into issues when installinglaravel-codebase-mcpby adding the following to yourcomposer.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!

If you want to see all available queries, please check thelaravel-introspectpackage documentation.

The MCP server uses thephp-mcp/serverpackage to implement the MCP protocol.

The MIT License (MIT). Please seeLicense Filefor more information.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

uild plug-and-play MCP servers for code search, docs, databases, and more. Integrates with Claude Code, Cursor, and Windsurf.

Retrieves relevant code snippets and documents to assist in generating PyMilvus code, requiring a running Milvus instance.

MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent

MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.

One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.

Local stdio MCP server that lets AI coding agents read and maintain structured architecture, rules, and decisions directly from your repository.

The official developer experience MCP Server for Amazon DynamoDB. This server provides DynamoDB expert design guidance and data modeling assistance.

The MCP server for Bitrix24 provides AI assistants with structured access to the Bitrix24 API. It delivers up-to-date method descriptions, parameters, and valid values, allowing assistants to work with precise data instead of guesswork. This reduces code errors and accelerates Bitrix24 integration development.

Official Context7 MCP server that brings up-to-date, version-specific library documentation and code examples into AI coding prompts.

Remote, no-auth MCP server providing AI-powered codebase context and answers

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.