laravel-mcp-client

MCP.Pizza Chef: scriptoshi

Laravel MCP Client is a powerful Laravel package that connects Anthropic's Claude AI model with custom MCP tool servers, allowing developers to extend AI capabilities with their own services. It supports tool server management, execution, and queuing for long-running tasks, all within an event-driven architecture. The client offers automatic chat title generation, full chat history management, and database persistence including soft deletes. Comprehensive logging ensures traceability of conversations and tool executions. Designed for Laravel 11+ and PHP 8.3+, it requires an Anthropic API key and simplifies building AI-enhanced workflows in Laravel applications.

Unmaintained · No commits in 20 months.

Use This MCP client To

Integrate Claude AI with Laravel applications Manage and execute custom AI tool servers Queue and handle long-running AI tasks Persist chat histories and tool execution data Generate automatic chat titles for conversations Log AI interactions and tool usage comprehensively Build event-driven AI workflows in Laravel

README

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:

composer require scriptoshi/laravel-mcp-client

Configuration

  1. Publish the configuration file:
php artisan vendor:publish --provider="Scriptoshi\McpClient\McpClientServiceProvider"
  1. 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
  1. Run the migrations:
php artisan migrate

Usage

laravel-mcp-client FAQ

How do I install the Laravel MCP Client?
Install via composer with 'composer require scriptoshi/laravel-mcp-client'.
What are the Laravel and PHP version requirements?
Requires Laravel 11.0 or higher and PHP 8.3 or higher.
Do I need an API key to use this client?
Yes, an Anthropic API key is required to connect to Claude AI.
Can the client handle long-running tool executions?
Yes, it includes built-in queuing support for long-running tools.
Does the client support chat history persistence?
Yes, it supports full chat history management with database persistence and soft deletes.
Is there logging available for AI interactions?
Yes, it provides a comprehensive logging system for conversations and tool executions.
Can I extend Claude AI with my own tools?
Yes, the client allows integration with custom MCP tool servers to extend AI capabilities.
What architecture does the client use?
It uses an event-driven architecture for managing AI workflows and tool executions.