PHP code example of sourcecodeguy1 / laravel-mcp-server

1. Go to this page and download the library: Download sourcecodeguy1/laravel-mcp-server library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sourcecodeguy1 / laravel-mcp-server example snippets


// config/laravel-mcp.php
return [
    'tools' => [
        \Sourcecodeguy1\LaravelMcp\Tools\ListRoutesTool::class,
        \Sourcecodeguy1\LaravelMcp\Tools\GetSchemaTool::class,
        \Sourcecodeguy1\LaravelMcp\Tools\ListModelsTool::class,
        \Sourcecodeguy1\LaravelMcp\Tools\GetMigrationsTool::class,
        \Sourcecodeguy1\LaravelMcp\Tools\GetEnvKeysTool::class,
        \Sourcecodeguy1\LaravelMcp\Tools\ListMiddlewareTool::class,
    ],
];
bash
php artisan vendor:publish --tag=laravel-mcp-config
bash
php artisan mcp:serve