Skip to content

rasuvaeff/yii3-mcp

The core package: MCP server integration for Yii3 over the official mcp/sdk — a PSR-15 Streamable HTTP endpoint, a stdio transport, and a DI-resolved tool registry.

bash
composer require rasuvaeff/yii3-mcp
NamespaceRasuvaeff\Yii3Mcp
Repositorygithub.com/rasuvaeff/yii3-mcp
RequirementsPHP 8.3 – 8.5, mcp/sdk ~0.7.0, ext-fileinfo

Where to start

Key classes

ClassRole
McpServerFactoryList of tool FQCNs → configured SDK Server.
McpActionPSR-15 handler running the Streamable HTTP transport; enforces session ownership.
SharedSecretMiddlewareFail-closed shared-secret guard; resolves client identity.
McpServeCommandmcp:serve — stdio transport.
McpListCommandmcp:list — introspection.
McpDoctorCommandmcp:doctor — configuration health check.
Testing\McpTesterIn-process test client.
Testing\SchemaSnapshotCommitted-snapshot contract-drift guard.

See the full API reference for every @api class.

Bridges

Three companion packages extend this core without any special-casing — see Bridges: overview: audit log, RBAC, telemetry.

Roadmap

See Roadmap for planned work beyond v1.0/v2.0, in dependency order.