armandsar/laravel-mcp-documentation-generator

Generate rich HTML documentation for Laravel MCP web servers.

Maintainers

Package info

github.com/armandsar/laravel-mcp-documentation-generator

pkg:composer/armandsar/laravel-mcp-documentation-generator

Fund package maintenance!

armandsar

Statistics

Installs: 23

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.3 2026-05-28 16:31 UTC

This package is auto-updated.

Last update: 2026-05-28 16:31:57 UTC


README

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.