PHPackages                             fabianbartsch/mcp-docs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. fabianbartsch/mcp-docs

ActiveLibrary[API Development](/categories/api)

fabianbartsch/mcp-docs
======================

Automatic MCP server documentation generator for Laravel

v1.0.0(5mo ago)04MITBladePHP ^8.1|^8.2

Since Nov 19Pushed 5mo agoCompare

[ Source](https://github.com/fabianbartsch/mcp-docs)[ Packagist](https://packagist.org/packages/fabianbartsch/mcp-docs)[ Docs](https://github.com/fabianbartsch/mcp-docs)[ RSS](/packages/fabianbartsch-mcp-docs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (2)Used By (0)

Laravel MCP Documentation Generator
===================================

[](#laravel-mcp-documentation-generator)

[![Latest Version](https://camo.githubusercontent.com/399b014e8e38cd39b85902a1863c72cd5da30a213ddd1d0e277370f1b80b5d64/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f66616269616e626172747363682f6d63702d646f63733f7374796c653d666c61742d737175617265)](https://github.com/fabianbartsch/mcp-docs/releases)[![Packagist](https://camo.githubusercontent.com/f82fd2ceab665401b22cf48c6e9a2d168af943f0b709e25b9b6d71fbba0b63ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66616269616e626172747363682f6d63702d646f63732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fabianbartsch/mcp-docs)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)

Automatically generate beautiful documentation pages for your Laravel MCP (Model Context Protocol) servers. This package extracts metadata from your MCP server classes and generates comprehensive documentation with tools, resources, prompts, and installation instructions.

Features
--------

[](#features)

- 🚀 **Automatic Documentation**: Automatically extracts tools, resources, and prompts from your MCP server class
- 🎨 **Beautiful UI**: Modern, responsive documentation pages built with Tailwind CSS
- ⚙️ **Highly Configurable**: Customize server URLs, installation commands, and messages
- 📦 **Easy Integration**: Works out of the box with Laravel MCP servers
- 🔧 **Extensible**: Publish and customize views to match your brand

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require fabianbartsch/mcp-docs
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=mcp-docs-config
```

This will create `config/mcp-docs.php`. Configure your MCP server class:

```
'server_class' => env('MCP_DOCS_SERVER_CLASS', App\Mcp\Servers\YourServer::class),
'server_name' => env('MCP_DOCS_SERVER_NAME', 'your-server'),
'server_url_pattern' => env('MCP_DOCS_SERVER_URL', '{base_url}/mcp/{server}'),
```

Or set it in your `.env` file:

```
MCP_DOCS_SERVER_CLASS=App\Mcp\Servers\YourServer
MCP_DOCS_SERVER_NAME=your-server
MCP_DOCS_SERVER_URL=https://yourdomain.com/mcp/{server}
```

Usage
-----

[](#usage)

### Automatic Route Registration

[](#automatic-route-registration)

By default, the package registers a route at `/docs/mcp`. You can customize this in the config file or disable it:

```
'route' => [
    'enabled' => true,
    'path' => '/docs/mcp',
    'name' => 'mcp.docs',
    'middleware' => 'web',
],
```

### Manual Route Registration

[](#manual-route-registration)

If you prefer to register the route manually, disable automatic registration and add it to your `routes/web.php`:

```
use FabianBartsch\McpDocs\Controllers\McpDocumentationController;

Route::get('/docs/mcp', [McpDocumentationController::class, 'index'])
    ->name('mcp.docs');
```

### Customizing Views

[](#customizing-views)

Publish the views to customize them:

```
php artisan vendor:publish --tag=mcp-docs-views
```

Views will be published to `resources/views/vendor/mcp-docs/`. You can now customize:

- `index.blade.php` - Main documentation page
- `mcp-docs.blade.php` - Layout template
- `partials/` - Reusable components

### Customizing Messages

[](#customizing-messages)

You can customize authentication and support messages in the config file:

```
'auth_message' => 'This MCP server requires authentication. Include your Sanctum token in the Authorization header:',
'support_message' => 'For questions or issues, please contact support@example.com.',
```

Set to `null` to hide a section entirely.

### Custom Installation Commands

[](#custom-installation-commands)

Customize installation commands for different platforms:

```
'installation_commands' => [
    'cursor' => 'cursor://install-mcp?url={url}',
    'vscode' => 'vscode://install-mcp?url={url}',
    'claude code' => 'claude mcp add {url}',
    'custom' => 'your-custom-command {url}',
],
```

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Laravel &gt;= 10.0 (supports Laravel 10, 11, and 12)
- [laravel/mcp](https://github.com/laravel/mcp) &gt;= 0.1.0

> **Note:** This package matches the same Laravel and PHP version requirements as `laravel/mcp` for maximum compatibility.

MCP Server Structure
--------------------

[](#mcp-server-structure)

Your MCP server class should extend `Laravel\Mcp\Server` and define:

```
