v3.0.0
This release brings support for the latest MCP protocol version along with enhanced schema generation, new transport capabilities, and streamlined APIs.
✨ New Features
- StreamableHttpServerTransport: New transport with resumability, event sourcing, and JSON response mode for production deployments
- Smart Schema Generation: Automatic JSON schema generation from method signatures with optional
#[Schema]attribute enhancements - Completion Providers:
#[CompletionProvider]attribute for auto-completion in resource templates and prompts - Batch Request Processing: Full support for JSON-RPC 2.0 batch requests
- Enhanced Session Management: Multiple session backends (array, cache, custom) with persistence and garbage collection
🔥 Breaking Changes
- Schema Package Integration: Now uses
php-mcp/schemapackage for all DTOs, requests, responses, and content types - Session Management:
ClientStateManagerreplaced withSessionManagerandSessionclasses - Component Reorganization:
Support\*classes moved toUtils\*namespace - Request Processing:
RequestHandlerrenamed toDispatcher
Note: Most of these changes are internal and won't affect your existing MCP element definitions and handlers.
🔧 Enhanced Features
- Improved Schema System: The
#[Schema]attribute can now be used at both method-level and parameter-level (previously parameter-level only) - Better Error Handling: Enhanced JSON-RPC error responses with proper status codes
- PSR-20 Clock Interface: Time management with
SystemClockimplementation - Event Store Interface: Pluggable event storage for resumable connections
📦 Dependencies
- Now requires
php-mcp/schema^1.0 - Enhanced PSR compliance (PSR-3, PSR-11, PSR-16, PSR-20)
🚧 Migration Guide
Capabilities Configuration
Before:
->withCapabilities(Capabilities::forServer(
resourcesEnabled: true,
promptsEnabled: true,
toolsEnabled: true,
resourceSubscribe: true
))After:
->withCapabilities(ServerCapabilities::make(
resources: true,
prompts: true,
tools: true,
resourcesSubscribe: true
))Transport Upgrade (Optional)
For production HTTP deployments, consider upgrading to the new StreamableHttpServerTransport:
Before:
$transport = new HttpServerTransport(host: '127.0.0.1', port: 8080);After:
$transport = new StreamableHttpServerTransport(host: '127.0.0.1', port: 8080);📚 Documentation
- Complete README rewrite with comprehensive examples and deployment guides
- New production deployment section covering VPS, Docker, and SSL setup
- Enhanced schema generation documentation
- Migration guide for v2.x users
Full Changelog: 2.3.1...3.0.0