ovac / laravel-mcp-inspector
A powerful MCP server inspector and documentation UI for Laravel — tools reference, interactive playground, scope explorer, and client connect guides.
Package info
github.com/ovac/laravel-mcp-inspector
Language:Blade
pkg:composer/ovac/laravel-mcp-inspector
Requires
- php: ^8.2
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.0
This package is auto-updated.
Last update: 2026-03-29 01:54:06 UTC
README
A powerful, beautiful inspection and documentation UI for Laravel MCP servers. Think of it as Scalar or Swagger UI, but purpose-built for the Model Context Protocol.
Features
- Interactive Tool Explorer — Browse all MCP tools with descriptions, risk levels, schemas, and annotations
- Live Playground — Execute tools directly from the browser with a built-in JSON-RPC 2.0 client
- Scope Explorer — Visualize scopes and discover which tools each scope unlocks
- Client Connect — Ready-to-copy configuration for Claude Desktop, Cursor, and cURL
- Dark & Light Themes — Beautiful UI with automatic system theme detection
- Zero Config — Auto-discovers your MCP tools from your Laravel config; no manifest scraping
- Self-Contained — Single Blade view with all CSS/JS inline; no build step required
Installation
composer require ovac/laravel-mcp-inspector
The package auto-registers its service provider via Laravel's package discovery.
Quick Start
Once installed, visit:
https://your-app.test/mcp/inspector
The inspector reads your MCP tool definitions directly from your Laravel config (default key: mcp_user_public). No HTTP calls to the MCP manifest — this is what makes it fast and reliable.
Configuration
Publish the config file:
php artisan vendor:publish --tag=mcp-inspector-config
// config/mcp-inspector.php return [ 'enabled' => env('MCP_INSPECTOR_ENABLED', true), 'route_prefix' => 'mcp', 'route_middleware' => ['web'], 'config_key' => 'mcp_user_public', 'title' => 'MCP Inspector', 'theme' => 'auto', // auto|dark|light ];
Options
| Key | Default | Description |
|---|---|---|
enabled |
true |
Enable/disable the inspector. Set to false in production if needed. |
route_prefix |
mcp |
URL prefix. Inspector available at /{prefix}/inspector. |
route_middleware |
['web'] |
Middleware for the inspector route. Add auth to restrict access. |
config_key |
mcp_user_public |
The Laravel config key containing your MCP server definition. |
title |
MCP Inspector |
Title shown in the inspector UI header. |
theme |
auto |
Default theme: auto, dark, or light. |
Customizing the View
php artisan vendor:publish --tag=mcp-inspector-views
The published view will be in resources/views/vendor/mcp-inspector/.
MCP Config Format
The inspector expects your MCP config to follow this structure:
// config/mcp_user_public.php return [ 'name' => 'My MCP Server', 'version' => '1.0.0', 'description' => 'API tools for my application.', 'tokens_url' => '/api/mcp/tokens', 'mcp_endpoint' => '/mcp', 'tools' => [ [ 'name' => 'get_user', 'description' => 'Retrieve a user by their ID.', 'inputSchema' => [ 'type' => 'object', 'properties' => [ 'user_id' => [ 'type' => 'integer', 'description' => 'The user ID.', ], ], 'required' => ['user_id'], ], 'annotations' => [ 'scope' => 'users:read', 'risk' => 'low', 'readOnlyHint' => true, ], ], ], 'scopes' => [ [ 'name' => 'users:read', 'description' => 'Read user data.', 'tools' => ['get_user'], ], ], ];
Security
For production, you should:
- Disable the inspector:
MCP_INSPECTOR_ENABLED=false - Or add authentication middleware:
// config/mcp-inspector.php 'route_middleware' => ['web', 'auth'],
Testing
composer test
Changelog
See CHANGELOG.md for recent changes.
License
MIT License. See LICENSE for details.
Built with care by Ariama Victor (Gidipex).