Disclosure: This package was designed and written Entirely by claude ai. I may have guided and nuggged it in a few places, but the code was written by claude ai.
Laravel MCP (Message Context Protocol) Client is a package that integrates Anthropic's Claude AI model with custom tool servers, allowing you to extend Claude's capabilities with your own tools and services.
- Seamless integration with Anthropic's Claude API
- Tool server management and execution
- Built-in queuing support for long-running tools
- Event-driven architecture
- Automatic chat title generation
- Complete chat history management
- Database persistence for conversations and tool executions
- Soft deletes support
- Comprehensive logging system
- PHP 8.3 or higher
- Laravel 11.0 or higher
- Anthropic API key
You can install the package via composer:
composer require scriptoshi/laravel-mcp-client- Publish the configuration file:
php artisan vendor:publish --provider="Scriptoshi\McpClient\McpClientServiceProvider"- Add your Anthropic API key to your .env file:
ANTHROPIC_API_KEY=your-api-key-here
ANTHROPIC_MODEL=claude-3-sonnet-20240229
ANTHROPIC_MAX_TOKENS=1024- Run the migrations:
php artisan migrate