PHP MCP Server for Laravel

PHP MCP Server for Laravel is an MCP server that exposes Laravel application functionality as standardized Model Context Protocol tools, resources, resource templates, and prompts. It connects Laravel applications to AI clients such as Anthropic Claude, Cursor IDE, and OpenAI ChatGPT. Backend developers and Laravel engineers use this SDK to bridge existing PHP business logic, database queries, and internal services directly into AI interfaces without writing external glue code. The package provides native integration with Laravel service containers, database configurations, caching layers, sessions, and Artisan console utilities. Developers can define server capabilities either manually using a fluent Facade in dedicated route files or declaratively using PHP 8 attributes. The SDK supports multiple transport mechanisms including STDIO for local execution, integrated HTTP routes, and standalone ReactPHP servers, enabling secure agentic workflows across local developer environments and production Laravel infrastructure.

Category: AI & LLM Tooling

Tags: backend, framework, laravel, php

Visit PHP MCP Server for Laravel

How to install and configure PHP MCP Server for Laravel

  1. Install the package in your Laravel project using Composer: bash composer require php-mcp/laravel:^3.0 -W 2. Publish the configuration file: bash php artisan vendor:publish --provider="PhpMcp\Laravel\McpServiceProvider" --tag="mcp-config" 3. If using database sessions, publish migrations and run them: bash php artisan vendor:publish --provider="PhpMcp\Laravel\McpServiceProvider" --tag="mcp-migrations" php artisan migrate 4. Discover your tools and prompts: bash php artisan mcp:discover 5. Configure your MCP client (such as Cursor IDE) using the STDIO transport: json { "mcpServers": { "my-laravel-app": { "command": "php", "args": ["artisan", "mcp:serve", "--transport=stdio"] } } }

What you can do with PHP MCP Server for Laravel

  • Expose existing Laravel service methods and database actions as callable tools for AI coding assistants like Cursor. * Serve application settings, documentation, or dynamic Eloquent user models as structured MCP resources via URI patterns. * Provide templated conversation prompts directly from Laravel controllers or service classes to streamline multi-turn agent chats. * Run a standalone ReactPHP or route-integrated HTTP MCP endpoint to connect remote AI agents to enterprise applications.

Key facts

  • Open Source
  • https://github.com/php-mcp/laravel
  • AI & LLM Tooling, Developer Tools & Code Intelligence
  • backend, framework, laravel, php

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON — MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP LSP Go — MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls,…
  • MCP Memory Dashboard — MCP Memory Dashboard is an MCP server desktop interface that connects to the MCP Memory Service to provide visual semantic…
  • MCP Manager — MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…

How do I install PHP MCP Server for Laravel?

You install the package using Composer by executing composer require php-mcp/laravel:^3.0 -W. Afterwards, publish the configuration file with the vendor:publish Artisan command, optionally publish and run session migrations, and use php artisan mcp:discover to register your elements.

What can PHP MCP Server for Laravel do?

It wraps your Laravel application logic into standard Model Context Protocol components. It allows AI clients to run PHP functions as tools, inspect dynamic application data via resource URIs, and utilize predefined prompt templates, integrating deeply with Laravel sessions, logging, and caching.

Which MCP clients work with PHP MCP Server for Laravel?

It works with any client that implements the Model Context Protocol, including Cursor IDE, Anthropic Claude Desktop, and OpenAI ChatGPT. It supports local execution through the STDIO transport as well as integrated and dedicated HTTP network transports.

What are the system requirements for this package?

The package requires PHP 8.1 or higher, Laravel 10.0 or higher, and the standard PHP json, mbstring, and pcre extensions. It is designed to work with both manual route definitions and PHP 8 attribute discovery.

Is PHP MCP Server for Laravel open source?

Yes, it is open source and distributed under an open-source license available on GitHub via the php-mcp organization repository.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories