v0.3.0
What's Changed
Added
Client::getServerCapabilities()returns theServerCapabilitiesnegotiated during the handshake, ornullbefore it completes.- The client now gates typed requests on the server's advertised capabilities: calling a method whose capability the server did not advertise (e.g.
tools/listwithout atoolscapability) throwsServerCapabilityNotSupportedExceptionbefore the request reaches the transport.pingis never gated.
Fixed
- Closing a
StdioClientTransportwhose subprocess is still running no longer fatals on PHP builds without thepcntlextension (such as Windows). The transport now terminates the subprocess viaProcess::kill()instead of theSIGKILLconstant.
Changed
StdioClientTransportnow prunes the spawned subprocess environment by default instead of inheriting the full parent environment. Theenvconstructor argument changed fromarray $env = []to?array $env = null:null(default) passes a safe allowlist (PATH,HOME,TERM, …) drawn from the parent and skips exported shell-function values. An empty array still inherits the full parent environment. A non-empty array is passed verbatim.
Full Changelog: https://github.com/NexusPHP/mcp-sdk/compare/v0.2.0...v0.3.0