- What is php-mcp/laravel used for?
- It is the Laravel integration layer for the Model Context Protocol, letting a Laravel application expose tools, resources, and prompts to MCP-speaking clients such as AI IDEs, desktop assistants, and agent runtimes. It reuses Laravel routing, middleware, the container, events, and authorization so an MCP surface becomes another delivery channel over existing domain services.
- How do I install and configure php-mcp/laravel?
- Install with Composer, publish the package configuration, and register the MCP routes. Tool, resource, and prompt definitions are ordinary PHP classes resolved from the Laravel container. The package is designed to reuse Laravel routing, middleware, configuration, and authorization, so integration should follow normal Laravel package setup.
- Does php-mcp/laravel support Laravel 13?
- Yes. The 4.0.0 release adds Laravel 13 support via PR #48, keeping the package on the supported Laravel track. The tested PHP and Laravel version floors for 4.0.0 are not listed in the provided notes, so confirm them in the repository before upgrading. Whether Laravel 12 remains supported on the 4.x line is also something to verify.
- What is stateless mode in php-mcp/laravel 4.0.0?
- Stateless mode for HTTP transports removes the need for server-side session state per MCP connection. That widens deployment options to multi-replica, autoscaled, and potentially serverless or FaaS HTTP runtimes without sticky sessions or a shared session store. The 4.0.0 notes do not say whether it is opt-in or the default, so verify configuration behavior.
- What breaks when upgrading php-mcp/laravel from 3.1.0 to 4.0.0?
- Treat 4.0.0 as a breaking release. The changelog lists stateless mode and Laravel 13 support, but it does not enumerate migration notes or breaking changes. Potential changes include transport or session contracts, config keys, default transport behavior, and published route definitions. Audit the 3.1.0 to 4.0.0 diff and any upgrade guide before committing.
- Is stateless mode enabled by default in php-mcp/laravel 4.0.0?
- The provided release notes do not state whether stateless mode is opt-in via configuration or a changed default. Treat this as unknown until you check the 4.0.0 config and diff. If it is the default, validate every session-bound tool handler because stateless HTTP cannot provide connection-scoped behavior.
- Which MCP features are unavailable in stateless mode?
- Stateless HTTP generally cannot support server-initiated or connection-scoped behavior: server-to-client notifications, progress reporting, resource subscriptions, sampling or elicitation round-trips, and multi-turn session context. If tool handlers rely on session continuity or push updates, stateless mode can degrade them. Validate this per tool and confirm whether the package fails loudly or silently when unsupported capabilities are used.
- How should I secure MCP tools exposed by a Laravel app?
- Tool invocation is model-directed, so the main risks are prompt injection via tool output, over-broad tool scopes, missing per-tool authorization, and unbounded or expensive tool calls. Use Laravel authentication and middleware, add explicit per-tool authorization and scopes, and enforce application-level limits. The package provides the MCP plumbing; security policy remains your responsibility.
- How do I deploy php-mcp/laravel behind a load balancer or with PHP-FPM?
- The package supports HTTP transports, and 4.0.0 adds stateless mode for HTTP transports, which helps with multi-replica and autoscaled deployments by avoiding per-connection session state. SSE and streamable HTTP can still conflict with load balancer idle timeouts, buffering proxies, and PHP-FPM request time limits. Configure timeouts and proxy behavior carefully, and validate long-running tool calls.
- How actively maintained is php-mcp/laravel and should I pin it?
- MCP is a fast-moving specification, so pin the package version and track MCP spec changes separately from Laravel release cadence. The provided notes do not confirm an upgrade guide or maintenance activity level. Check the repository for release history, issues, and compatibility commitments before adopting it.