php-mcp/laravel
Laravel integration for the Model Context Protocol (MCP). Build MCP servers in your Laravel app, register tools, resources, and prompts, and connect AI clients with familiar Artisan commands, routing, configuration, and authorization.
php-mcp/laravel is the Laravel integration layer for the Model Context Protocol (MCP), letting a Laravel application expose tools, resources, and prompts to MCP-speaking clients (AI IDEs, desktop assistants, agent runtimes). 4.0.0 is a major bump landing two changes: stateless mode for HTTP transports (PR #36) and Laravel 13 support (PR #48). The version number is the headline risk — a major bump on a two-PR changelog implies at least one change to public surface (transport/session contracts, config keys, or default transport behavior) that is not enumerated in the notes. Treat 4.0.0 as a breaking release until the upgrade guide and diff prove otherwise.
Architecture fit. Strong for teams already on Laravel. The package reuses the framework's routing, middleware, container, events, and auth, so an MCP surface becomes another delivery channel over existing domain services rather than a parallel app. Stateless mode is the architecturally significant addition: it removes the requirement for server-side session state per MCP connection, which is what previously forced sticky sessions or a shared session store behind a load balancer. That materially widens deployment topology options (multi-replica, autoscaled, and potentially serverless/FaaS HTTP runtimes) and is the main reason this release matters beyond version hygiene.
Integration feasibility. High. Composer install plus config publish plus route registration is the expected path; tool/resource definitions are ordinary PHP classes resolved from the container. Laravel 13 support means the package stays on the supported framework track and does not become the pin that blocks a platform upgrade. The real integration work is not mechanical — it is deciding which domain capabilities to expose, because every exposed tool is an authenticated-but-model-driven write path into the application.
Technical risk.
Key questions.
Stack fit. Native. Requires an existing Laravel app on a supported PHP/Laravel combination; Laravel 13 is now covered, which matters if the platform upgrade is on the roadmap. No new datastore is required for stateless mode — that is the point of the release. If you keep stateful transports, you retain the Redis/session-affinity requirement. Front with the same auth middleware, rate limiter, and logging pipeline as the rest of the app; do not stand up a separate edge for MCP.
Migration path (3.x → 4.x).
vendor:publish --force into a scratch dir, then compare) — never overwrite a live config blindly.Compatibility. Verify PHP floor and Laravel floor against your matrix. Third-party packages that touch the same container bindings or route groups are the usual collateral damage on a major bump. If you are mid-flight on a Laravel major upgrade, sequence framework upgrade and package major bump as separate changes — combining them makes bisecting failures materially harder.
Sequencing.
Do not invert Phase 1 and Phase 2. Stateless adoption should be a deliberate, reversible step, not a side effect of the version bump.
Maintenance. The package now tracks the Laravel release train, which reduces the risk of being stranded on an EOL framework, but it also means a recurring upgrade obligation tied to Laravel majors. The MCP spec is the faster-moving of the two dependencies; expect to pin the package and review transport/auth changes on a quarterly cadence. A two-PR major release with a new contributor is a mild signal on maintainer bandwidth — worth watching release cadence and issue response time rather than assuming enterprise-grade support.
Support. No commercial backing implied. Internal ownership must be explicit: someone owns the tool catalog, the authorization model, and the upgrade cadence. Tool definitions are effectively a public API for AI clients — treat additions and removals as versioned contract changes with deprecation windows, or client agents will break silently.
Scaling. Stateless mode is the meaningful operational win: horizontal scaling without session affinity, compatibility with autoscaling groups and scale-to-zero HTTP runtimes, and simpler failover (any replica can serve any request). Costs shift from infrastructure to compute and model-adjacent spend: each tool call is real work, and an agent can generate high call volume. Enforce per-principal rate limits and per-tool concurrency caps at the Laravel middleware layer. Watch payload sizes — tool results are fed back into model context, so oversized responses inflate latency and token cost.
Failure modes.
Ramp-up. Two distinct skill sets: Laravel developers can define tools in hours, but reasoning about transport semantics, MCP capability negotiation, and agent-driven invocation patterns takes longer. Expect roughly: half a day for a Laravel engineer to ship a read-only tool in staging; one to two weeks for a team to be genuinely confident with stateless transport behavior, authz, and failure handling. Add review capacity for a security-minded pass on the tool catalog before any external exposure, and write down the tool catalog and its scopes early — it is the artifact both engineering and security will keep coming back to.
How can I help you explore Laravel packages today?