guava / filament-mcp
Give your Filament panels MCP capabilities. Expose resources, records and actions to AI agents - configurable and secure.
Fund package maintenance!
Requires
- php: ^8.2
- filament/filament: ^5.0
- illuminate/contracts: ^12.0|^13.0
- laravel/mcp: ^0.8|^0.9.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^3.8|^4.4
- pestphp/pest-plugin: ^3.0|^4.0
- pestphp/pest-plugin-arch: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.2|^4.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
README
Give your Filament panels MCP capabilities.
This package turns your filament panel into a Model Context Protocol server, so AI agents (Claude Code, Claude Desktop, Cursor, ...) can list, read, create and update records and call your filament actions, with the same authorization a human has in the panel.
Tools are generated from your existing resources: the input schemas come straight from your form schema, and your model policies, tenant scoping and field visibility rules all still apply. It's built on top of the official laravel/mcp package.
Documentation
The full documentation is available at guava.cz.
Version compatibility
| Filament version | Plugin version | Min. PHP version |
|---|---|---|
| 5.x | 1.x | 8.2 |
Support us
Your support is key to the continual advancement of our plugin. We appreciate every user who has contributed to our journey so far.
While our plugin is available for all to use, if you are utilizing it for commercial purposes and believe it adds significant value to your business, we kindly ask you to consider supporting us through GitHub Sponsors. This sponsorship will assist us in continuous development and maintenance to keep our plugin robust and up-to-date. Any amount you contribute will greatly help towards reaching our goals. Join us in making this plugin even better and driving further innovation.
Installation
You can install the package via composer:
composer require guava/filament-mcp
Then publish and run the migrations, which create the tables used for authentication and for staging file uploads:
php artisan vendor:publish --tag="filament-mcp-migrations"
php artisan migrate
Publishing the config file is optional, see the installation docs for the remaining setup steps.
Usage
Register the plugin on your panel and list the resources you want to expose:
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() );
Create a token:
php artisan mcp:token you@example.com --name="Claude"
And point an MCP client at the panel's endpoint:
claude mcp add --transport http acme https://your-app.test/mcp/admin \
--header "Authorization: Bearer gmcp_..."
That's it, the agent now sees list_posts, get_post, create_post, update_post, delete_post, list_categories and get_category.
For everything else, including field types and file uploads, exposing your filament actions as tools, self-service tokens, multi-tenancy and the security model, see the full documentation at guava.cz.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Lukas Frey
- All Contributors
- laravel/mcp - the MCP server this package builds on
- Spatie - Our package skeleton is a modified version of Spatie's Package Skeleton
License
The MIT License (MIT). Please see License File for more information.