Looking to hire Laravel developers? Try LaraJobs

laravel-mcp-documentation-generator maintained by armandsar

Description
Generate rich HTML documentation for Laravel MCP web servers.
Last update
2026/05/28 18:31 (dev-main)
License
Downloads
23

Comments
comments powered by Disqus

Laravel MCP Documentation Generator (BETA)

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status

Generate HTML documentation for Laravel MCP servers.

Installation

You can install the package via composer:

composer require armandsar/laravel-mcp-documentation-generator

You can publish the config file with:

php artisan vendor:publish --tag="mcp-documentation-generator-config"

Contents of the published config file:

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

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

    'middleware' => [],

    'servers' => [],
];

Usage

Register one or more Laravel MCP web servers in your application:

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);

Enable the route and open /docs/mcp:

MCP_DOCS_ENABLED=true

The readable schema tables cover the common top-level fields, required flags, enums, arrays, and simple union types. The full raw JSON schemas are always available beside the readable tables for nested or advanced schema shapes.

To restrict the docs page to specific servers, configure servers with server classes. Leave it empty to include every discovered web MCP server:

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

Keep the route disabled in environments where it should not be public, or add middleware to protect it:

'middleware' => ['auth'],

Testing

composer test

Credits

License

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