MCP PHP SDK

PassthroughMiddleware implements MiddlewareInterface

FinalYes

Hands every request to the next handler unchanged.

Pass [new PassthroughMiddleware()] as the transport's middleware when the host application already handles CORS and host validation. It replaces StreamableHttpTransport::defaultMiddleware() without the warning an empty list logs.

Table of Contents

Interfaces

MiddlewareInterface

Methods

process()  : ResponseInterface

Methods

process()

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface
$handler : RequestHandlerInterface
Return values
ResponseInterface
On this page

Search results