MCP PHP SDK

Middleware

Table of Contents

Classes

AuthorizationMiddleware
Enforces MCP HTTP authorization: the MCP server as OAuth 2.1 resource server.
CorsMiddleware
Applies CORS headers to responses produced by the inner pipeline.
DnsRebindingProtectionMiddleware
Protects local MCP servers against DNS rebinding attacks.
PassthroughMiddleware
Hands every request to the next handler unchanged.
ProtectedResourceMetadataMiddleware
Serves OAuth 2.0 Protected Resource Metadata (RFC 9728) at its well-known path.
ProtocolVersionMiddleware
Validates the `MCP-Protocol-Version` header against the SDK's supported set.
On this page

Search results