tadhgboyle/laravel-mcp-server
If you are the rightful owner of laravel-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This package provides a Model Context Protocol (MCP) server for Laravel applications, enabling the creation and registration of tools and prompts for interaction with language models.
laravel-mcp-server
This package provides a Model Context Protocol (MCP) server for Laravel applications. It allows you to create and register tools and prompts that can be used in conjunction with the MCP protocol.
The MCP protocol is a standard for building tools that can interact with language models, enabling developers to create powerful applications that leverage the capabilities of these models.
Read more about the MCP protocol https://modelcontextprotocol.io.
Installation
You can install the package via composer:
composer require aberdeener/laravel-mcp-server
Usage
// Within your AppServiceProvider.php
use Aberdeener\LaravelMcpServer\Protocol\Tools\ToolRegistry;
use Aberdeener\LaravelMcpServer\Protocol\Prompts\PromptRegistry;
public function boot(): void
{
// ...
app(ToolRegistry::class)->registerTool(new GetWeatherTool);
app(PromptRegistry::class)->registerPrompt(new ReviewPhpCode);
}
Experiment with the official MCP inspector:
npx @modelcontextprotocol/inspector php /path/to/your/laravel/app/artisan mcp:stdio
Testing
composer test
Changelog
Please see for more information on what has changed recently.
Contributing
Please see for details.
Credits
License
The MIT License (MIT). Please see for more information.