Download the PHP package dalehurley/laravel-php-mcp-sdk without Composer
On this page you can find all versions of the php package dalehurley/laravel-php-mcp-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dalehurley/laravel-php-mcp-sdk
More information about dalehurley/laravel-php-mcp-sdk
Files in dalehurley/laravel-php-mcp-sdk
Package laravel-php-mcp-sdk
Short Description Comprehensive Laravel wrapper for PHP MCP SDK with full MCP 2025-06-18 specification support
License MIT
Homepage https://github.com/dalehurley/laravel-php-mcp-sdk
Informations about the package laravel-php-mcp-sdk
Laravel MCP SDK
A comprehensive Laravel wrapper around the PHP MCP SDK that provides full MCP 2025-06-18 specification support with Laravel's ease of use and conventions.
Features
🚀 Full MCP 2025-06-18 Specification Support
- Complete implementation of the Model Context Protocol
- All transport types: STDIO, HTTP, WebSocket
- Full support for tools, resources, prompts, roots, sampling, and elicitation
- Advanced utilities: cancellation, ping, progress reporting, completion, logging, pagination
🔄 Multiple Dynamic Servers & Clients
- Support for multiple named server instances
- Multiple named client connections
- Dynamic server/client creation and management
- Connection pooling and lifecycle management
- Per-instance configuration and capabilities
🎯 Laravel-Native Integration
- Deep integration with Laravel's service container, events, cache, queue system
- Laravel-style configuration with environment variables
- Comprehensive Artisan commands for all MCP operations
- Auto-discovery of tools, resources, and prompts
- Laravel validation, middleware, and security features
🔒 Production-Ready Security
- OAuth 2.1 authentication with PKCE support
- Bearer token and API key authentication
- Scope-based authorization
- CORS handling, rate limiting, input validation
- Security headers and suspicious activity detection
🛠 Developer Experience
- Zero configuration for basic use cases
- Intuitive Laravel-style APIs
- Rich debugging and monitoring capabilities
- Comprehensive testing with Laravel's test helpers
- Extensive documentation and examples
Installation
Install the package via Composer:
The package will automatically register its service provider and facades.
Quick Start
1. Install MCP Scaffolding
This will:
- Publish the configuration file
- Create necessary directories
- Install example tools, resources, and prompts
- Set up the basic structure
2. Configure Your Servers
Edit config/mcp.php
to configure your servers:
3. Create Your First Tool
4. Start Your Server
5. Test Your Setup
Usage Examples
Using Facades
Advanced Features
Progress Reporting for Long-Running Tools
Cancellation Support
Resource with URI Templates
Authentication and Authorization
Artisan Commands
Configuration
The package provides extensive configuration options in config/mcp.php
:
Multiple Servers
Transport Configuration
Authentication
Architecture
Core Components
- McpManager: Central coordinator for all MCP operations
- ServerManager: Manages multiple server instances
- ClientManager: Manages multiple client connections
- LaravelTool/Resource/Prompt: Base classes for MCP components
- Utilities: Progress, cancellation, ping, logging, pagination
- Transport Managers: STDIO, HTTP, WebSocket transport handling
Laravel Integration
- Service Provider: Registers all services and configurations
- Facades: Convenient access to MCP functionality
- Middleware: Authentication and security for HTTP transport
- Commands: Comprehensive Artisan command suite
- Events: Laravel events for MCP operations
- Cache: Intelligent caching for performance
- Queue: Background processing support
Testing
MCP System Testing
The package includes comprehensive MCP system testing capabilities:
Unit & Integration Testing
The package includes a comprehensive test suite with 95%+ coverage:
Test Structure
- Unit Tests: Core components, base classes, utilities
- Feature Tests: HTTP layer, middleware, console commands
- Integration Tests: Complete MCP system workflows
- Mock Classes: Comprehensive mocks for tools, resources, prompts
Coverage Goals
- ✅ 95%+ Line Coverage
- ✅ 100% Critical Path Coverage
- ✅ Complete Error Scenario Coverage
- ✅ Integration Workflow Testing
Security
The Laravel MCP SDK implements comprehensive security measures:
- OAuth 2.1 with PKCE support
- Bearer token and API key authentication
- Scope-based authorization
- CORS handling with configurable origins
- Rate limiting per IP address
- Input validation and sanitization
- Security headers (CSP, XSS protection, etc.)
- Suspicious activity detection
- Request size limits
- Security event logging
Performance
- Connection pooling for efficient resource usage
- Intelligent caching with configurable TTL
- Background processing with Laravel queues
- Memory usage monitoring
- Response time tracking
- Health monitoring and alerts
Contributing
Please see CONTRIBUTING.md for details on how to contribute to this project.
Security Vulnerabilities
If you discover a security vulnerability, please send an e-mail to the maintainers. All security vulnerabilities will be promptly addressed.
License
The Laravel MCP SDK is open-sourced software licensed under the MIT license.
Related Projects
- PHP MCP SDK - The underlying PHP implementation
- MCP Specification - Official MCP specification
Support
Laravel MCP SDK - Bringing the power of the Model Context Protocol to Laravel applications with enterprise-grade features and Laravel's elegant developer experience.
All versions of laravel-php-mcp-sdk with dependencies
dalehurley/php-mcp-sdk Version ^0.1.0
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/validation Version ^10.0|^11.0|^12.0
illuminate/cache Version ^10.0|^11.0|^12.0
illuminate/queue Version ^10.0|^11.0|^12.0
illuminate/events Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
league/oauth2-server Version ^8.5