PHP code example of armandsar / laravel-mcp-documentation-generator

1. Go to this page and download the library: Download armandsar/laravel-mcp-documentation-generator 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/ */

    

armandsar / laravel-mcp-documentation-generator example snippets


return [
    'enabled' => env('MCP_DOCS_ENABLED', false),

    'url' => '/docs/mcp',

    'middleware' => [],

    'servers' => [],
];

use App\Mcp\CompanyMcpServer;
use App\Mcp\OtherMcpServer;
use Laravel\Mcp\Facades\Mcp;

Mcp::web('/mcp/company', CompanyMcpServer::class);
Mcp::web('/mcp/other', OtherMcpServer::class);

'servers' => [
    CompanyMcpServer::class,
],

'middleware' => ['auth'],
bash
php artisan vendor:publish --tag="mcp-documentation-generator-config"