PHP code example of guava / filament-mcp
1. Go to this page and download the library: Download guava/filament-mcp library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
guava / filament-mcp example snippets
use Guava\FilamentMcp\Mcp\McpResource;
use Guava\FilamentMcp\McpPlugin;
$panel->plugin(
McpPlugin::make()
->instructions('This server manages the Acme blog. Posts belong to categories.')
->resources([
McpResource::make(PostResource::class)->crud(),
McpResource::make(CategoryResource::class)->readOnly(),
])
->tokens()
);
bash
php artisan vendor:publish --tag="filament-mcp-migrations"
php artisan migrate
bash
php artisan mcp:token [email protected] --name="Claude"