Releases: php-mcp/server
v3.3.0
What's Changed
- Feat: Add stateless mode for StreamableHttpServerTransport by @CodeWithKyrian in #48
- Fix: Make PCNTL extension optional for StdioServerTransport by @CodeWithKyrian in #49
Full Changelog: 3.2.2...3.3.0
v3.2.2
What's Changed
- Fix Architecture graph by @szepeviktor in #42
- Fix: Correctly handle invokable class tool handlers by @CodeWithKyrian in #47
New Contributors
- @szepeviktor made their first contribution in #42
Full Changelog: 3.2.1...3.2.2
v3.2.1
What's Changed
- feat: use callable instead of Closure|array|string for handler type by @CodeWithKyrian in #41
Full Changelog: 3.2.0...3.2.1
v3.2.0
What's Changed
- fix: resolve cache session handler index inconsistencies by @CodeWithKyrian in #36
- feat: Add comprehensive callable handler support for closures, static methods, and invokable classes by @CodeWithKyrian in #38
- feat: Enhanced Completion Providers with Values and Enum Support by @CodeWithKyrian in #40
Upgrade Guide
If you're using the CompletionProvider
attribute with the named providerClass
parameter, consider updating to the new provider
parameter for consistency:
// Before (still works)
#[CompletionProvider(providerClass: UserProvider::class)]
// After (recommended)
#[CompletionProvider(provider: UserProvider::class)]
The old providerClass
parameter continues to work for backward compatibility, but may be dropped in a future major version release.
Full Changelog: 3.1.1...3.2.0
v3.1.1
What's Changed
- Fix: implement proper MCP protocol version negotiation by @CodeWithKyrian in #35
Full Changelog: 3.1.0...3.1.1
v3.1.0
What's Changed
- Refactor: expose session garbage collection method for integration by @CodeWithKyrian in #31
- feat: add instructions in server initialization result by @CodeWithKyrian in #32
- fix(cache): handle missing session in index for CacheSessionHandler by @CodeWithKyrian in #33
Full Changelog: 3.0.2...3.1.0
v3.0.2
What's Changed
- fix: Registry cache clearing bug preventing effective caching by @CodeWithKyrian in #29
- Fix ServerBuilder error handling for manual element registration by @CodeWithKyrian in #30
Full Changelog: 3.0.1...3.0.2
v3.0.1
What's Changed
- Fix validation failure for MCP tools without parameters by @CodeWithKyrian in #28
Full Changelog: 3.0.0...3.0.1
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/schema
package for all DTOs, requests, responses, and content types - Session Management:
ClientStateManager
replaced withSessionManager
andSession
classes - Component Reorganization:
Support\*
classes moved toUtils\*
namespace - Request Processing:
RequestHandler
renamed 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
SystemClock
implementation - 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
v2.3.1
What's Changed
- Streamline Registry Notifications and Add Discovery Suppression Support by @CodeWithKyrian in #22
- Disable registry notifications during manual registrations to prevent unwanted triggers
Full Changelog: 2.3.0...2.3.1