Laravel MCP Client
@scriptoshi
About Laravel MCP Client
Overview
What is Laravel MCP Client?
Laravel MCP Client is a PHP package that integrates Anthropic's Claude AI model with custom tool servers within a Laravel application. It is designed for Laravel developers (Laravel 11+, PHP 8.3+) who want to extend Claude’s capabilities with their own tools and services.
How to use Laravel MCP Client?
Install via Composer, publish the configuration, add your Anthropic API key to .env, and run migrations. Use the McpClient facade to start a chat, and register custom tool servers by implementing the McpServerInterface and calling McpClient::registerServer() in a service provider.
Key features of Laravel MCP Client
- Seamless integration with Anthropic’s Claude API
- Tool server management and execution
- Built-in queuing support for long-running tools
- Event-driven architecture with dispatchable events
- Automatic chat title generation
- Complete chat history management with database persistence
Use cases of Laravel MCP Client
- Extend Claude AI with custom tool servers (e.g., weather, data lookups)
- Build conversational chatbots with persistent chat history in Laravel
- Automate long-running tasks by queuing tool executions
- Create AI-powered assistants that use your existing Laravel services
FAQ from Laravel MCP Client
What are the requirements for Laravel MCP Client?
PHP 8.3 or higher, Laravel 11.0 or higher, and an Anthropic API key.
How do I register a custom tool server?
Implement the McpServerInterface (with initialize, listTools, toolShouldQueue, executeTool methods) and register it in your service provider using McpClient::registerServer('name', $serverInstance).
Which Claude models are supported?
The package supports any Claude model; you configure the model name in your .env file (e.g., claude-3-sonnet-20240229).
What is the license for Laravel MCP Client?
It is open-sourced under the MIT License.
How are errors handled?
The package provides comprehensive logging with different log levels (error, info, warning, success) on the runner object, and dispatches MessageErrorEvent for global error handling.
Basic information
More Agent Frameworks MCP clients
MCP CLI client
adhikaspA simple CLI to run LLM prompt and implement MCP client.
Where On-Device and Cloud LLMs Meet
hazyresearchBig & Small LLMs working together
Unified MCP Client Library
pietrozullomcp-use is the easiest way to interact with mcp servers with custom agents
GenAIScript
microsoftAutomatable GenAI Scripting
Systemprompt Multimodal MCP Client
ejb503A Multi-modal MCP client for voice powered agentic workflows
Comments