PHP MCP Server for Laravel
@php-mcp
About PHP MCP Server for Laravel
An SDK building Laravel MCP servers
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is PHP MCP Server for Laravel?
It is a comprehensive Laravel SDK for building Model Context Protocol (MCP) servers with enterprise-grade features and Laravel-native integrations. It lets you expose your Laravel application’s functionality as standardized MCP Tools, Resources, Prompts, and Resource Templates for AI assistants like Claude, Cursor IDE, and ChatGPT.
How to use PHP MCP Server for Laravel?
Install via Composer (composer require php-mcp/laravel:^3.0 -W), publish the configuration (php artisan vendor:publish --provider="PhpMcp\Laravel\McpServiceProvider" --tag="mcp-config"), then define MCP elements in routes/mcp.php using the Mcp facade or via PHP 8 attributes. Run the server with php artisan mcp:serve --transport=stdio, or use the integrated HTTP or dedicated HTTP transports. All settings are managed through config/mcp.php.
Key features of PHP MCP Server for Laravel
- Laravel-native integration with service container, caching, logging, and Artisan
- Fluent element definition using the
Mcpfacade - Attribute-based discovery with automatic caching (e.g.,
#[McpTool]) - Advanced session management with multiple storage backends
- Flexible transport options: STDIO, integrated HTTP, dedicated HTTP server
- Artisan commands for serving, discovery, and element management
Use cases of PHP MCP Server for Laravel
- Expose Laravel business logic (e.g., user creation, email sending) as MCP tools for AI assistants
- Provide dynamic resources and resource templates (e.g., user profiles, file contents) via URI patterns
- Integrate with Cursor IDE or command-line tools using STDIO transport
- Build enterprise-grade MCP servers with session persistence and caching
FAQ from PHP MCP Server for Laravel
What are the system requirements?
PHP >= 8.1 and Laravel >= 10.0 are required. Extensions json, mbstring, and pcre must be enabled.
Which transport options are available?
Three transports: STDIO (for direct client execution), Integrated HTTP (served through Laravel routes), and Dedicated HTTP Server (high-performance standalone ReactPHP server).
How do I define MCP elements?
You can use manual registration in routes/mcp.php with the Mcp facade, or use PHP 8 attributes (#[McpTool], #[McpResource], etc.) on classes/methods with automatic discovery.
Does it support caching?
Yes. Discovered elements are cached for performance; caches are automatically invalidated on fresh discovery runs. You can force re-discovery with php artisan mcp:discover --force.
Can I use it with Cursor IDE?
Yes. Cursor IDE can be configured to use STDIO transport with a command pointing to php artisan mcp:serve --transport=stdio.
Frequently asked questions
What are the system requirements?
PHP >= 8.1 and Laravel >= 10.0 are required. Extensions `json`, `mbstring`, and `pcre` must be enabled.
Which transport options are available?
Three transports: STDIO (for direct client execution), Integrated HTTP (served through Laravel routes), and Dedicated HTTP Server (high-performance standalone ReactPHP server).
How do I define MCP elements?
You can use manual registration in `routes/mcp.php` with the `Mcp` facade, or use PHP 8 attributes (`#[McpTool]`, `#[McpResource]`, etc.) on classes/methods with automatic discovery.
Does it support caching?
Yes. Discovered elements are cached for performance; caches are automatically invalidated on fresh discovery runs. You can force re-discovery with `php artisan mcp:discover --force`.
Can I use it with Cursor IDE?
Yes. Cursor IDE can be configured to use STDIO transport with a command pointing to `php artisan mcp:serve --transport=stdio`.
Basic information
More Other MCP servers
Awesome Mlops
visengerA curated list of references for MLOps
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Comments