armandsar/laravel-mcp-documentation-generator
Composer 安装命令:
composer require armandsar/laravel-mcp-documentation-generator
包简介
Generate rich HTML documentation for Laravel MCP web servers.
README 文档
README
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.
统计信息
- 总下载量: 79
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-28