MCP PHP SDK

Middleware

Table of Contents

Classes

AuthorizationMiddleware
Enforces MCP HTTP authorization requirements.
ClientRegistrationMiddleware
OAuth 2.0 Dynamic Client Registration (RFC 7591) middleware.
CorsMiddleware
Applies CORS headers to responses produced by the inner pipeline.
DnsRebindingProtectionMiddleware
Protects local MCP servers against DNS rebinding attacks.
OAuthProxyMiddleware
Proxies OAuth authorization requests to an upstream authorization server.
OAuthRequestMetaMiddleware
Copies OAuth request attributes to JSON-RPC request meta.
ProtectedResourceMetadataMiddleware
Serves OAuth 2.0 Protected Resource Metadata (RFC 9728) at well-known endpoints.
ProtocolVersionMiddleware
Validates the `MCP-Protocol-Version` header against the SDK's supported set.
On this page

Search results