Skip to content

McpPlugin

Opt-in entry point for the MCP server capability.

Adding this class to the plugins config key publishes the mcp.* setting defaults (all opt-in-safe: mcp.enabled defaults to false) and registers mcp:serve. When the adapters are extracted into a standalone composer package this plugin (and Quiote\Mcp\*) move to quioteframework/quiote-mcp unchanged, mirroring the ORM adapter plugins.

final class McpPlugin implements PluginInterface

ImplementsPluginInterface
SourceMcpPlugin.php
MethodDescription
register(PluginRegistrar $registrar): voidPublishes the mcp.* config defaults and wires the MCP capability.

public function register(PluginRegistrar $registrar): void

Publishes the mcp.* config defaults and wires the MCP capability.

Registers the mcp:serve and mcp:warmup commands and the singleton McpAuthenticatorInterface binding backed by StaticTokenAuthenticator. When mcp.transports includes http, also splices McpEndpointMiddleware into the pipeline before SecurityMiddleware, followed by McpAuthMiddleware before it — the latter only when mcp.auth is neither none (no auth) nor oauth2 (enforced inside the SDK’s own transport middleware instead).

ParameterTypeDescription
$registrarPluginRegistrar