Laravel MCP is a package that implements the Model Context Protocol, enabling communication between AI models and Laravel applications through standardized interfaces with features like tool registration and resource management.
Laravel MCP is a Laravel package that implements the Model Context Protocol (MCP), facilitating communication between AI models and Laravel applications through standardized interfaces. It offers multiple transport options, including HTTP, WebSocket, and Stdio, with configurable host and port settings.
The package provides server capabilities such as tool registration and execution, resource management, prompt handling, progress tracking, logging, and model preferences configuration. It features a tool system for registering custom tools with parameters, handling tool calls, and returning structured responses. Resource management allows URI-based access with templates and content type support. The prompt system uses templates with dynamic arguments and message history.
Installation is done via Composer, with configuration through environment variables. Basic usage includes starting the server with different transports and registering tools, resources, and prompts. The package also provides progress tracking, logging, model preferences, and error handling.
mohamedahmed01/laravel-mcp-sdk
March 14, 2025
March 28, 2025
PHP