Download the PHP package scriptoshi/laravel-mcp-client without Composer
On this page you can find all versions of the php package scriptoshi/laravel-mcp-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download scriptoshi/laravel-mcp-client
More information about scriptoshi/laravel-mcp-client
Files in scriptoshi/laravel-mcp-client
Package laravel-mcp-client
Short Description Laravel MCP Client for managing tool servers and Claude integration
License MIT
Informations about the package laravel-mcp-client
Laravel MCP Client
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.
Features
- 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
Requirements
- PHP 8.3 or higher
- Laravel 11.0 or higher
- Anthropic API key
Installation
You can install the package via composer:
Configuration
-
Publish the configuration file:
-
Add your Anthropic API key to your .env file:
- Run the migrations:
Usage
Basic Usage
Implementing a Custom Tool Server
Create a new server class that implements McpServerInterface
:
Registering a Tool Server
You can register tool servers in your AppServiceProvider
or create a dedicated service provider:
Using the Queue
For long-running tools, implement queueing:
Working with Chat History
Error Handling
The package includes comprehensive error handling and logging:
Events
The package dispatches several events you can listen for:
MessageCreatedEvent
MessageProcessedEvent
MessageErrorEvent
Testing
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- Scriptoshi
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-mcp-client with dependencies
illuminate/support Version ^11.0
illuminate/database Version ^11.0
mozex/anthropic-php Version ^1.1
symfony/http-client Version ^7.2
nyholm/psr7 Version ^1.8