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.
The Laravel MCP Server is a package designed to integrate the Model Context Protocol (MCP) into Laravel applications. It allows developers to create and register tools and prompts that can interact with language models, thereby enhancing the capabilities of applications built on the Laravel framework. The MCP protocol is a standard that facilitates the development of tools that can communicate with language models, making it easier for developers to build applications that leverage the power of these models. This package simplifies the process of integrating MCP into Laravel, providing a seamless way to enhance application functionality with language model interactions.
Features
- Integration with Laravel: Seamlessly integrates MCP into Laravel applications.
- Tool and Prompt Registration: Allows for easy registration of tools and prompts.
- Composer Installation: Simple installation via Composer.
- MCP Inspector Compatibility: Compatible with the official MCP inspector for testing.
- MIT License: Open-source and freely available under the MIT License.
Usages
usage with composer
bash composer require aberdeener/laravel-mcp-server
usage with php
php // 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); }
usage with mcp inspector
bash npx @modelcontextprotocol/inspector php /path/to/your/laravel/app/artisan mcp:stdio
testing with composer
bash composer test