laravel/mcp
Build MCP servers in Laravel so AI clients can securely interact with your app via the Model Context Protocol. Quick setup, Laravel-native conventions, and official Laravel documentation support for exposing tools, resources, and prompts to MCP-compatible clients.
GET /resources/users/{id}).assertStructuredContent() for schema enforcement).Adopt if:
structuredContent assertions) for AI tool outputs.mcp:inspect command, localhost OAuth redirects).Look elsewhere if:
*"Laravel MCP lets us turn our Laravel backend into AI-compatible tools—enabling our systems to work natively with AI agents, copilots, and orchestration platforms like Model Context Protocol. This is a strategic move to:
Risk: Minimal—MIT-licensed, maintained by Laravel, and battle-tested in early adopter projects. ROI: Enables new revenue streams (e.g., AI partnerships) and operational efficiency (e.g., automated data workflows)."*
*"Laravel MCP is a drop-in solution to expose Laravel as an MCP-compliant server, giving AI clients (e.g., LLMs, agents) a standardized way to interact with our app. Here’s why it’s a no-brainer:
assertStructuredContent() for schema enforcement).mcp:install, mcp:inspect for local debugging.@McpResource for metadata (e.g., icons, roles).Migration path:
composer require laravel/mcp.php artisan mcp:install to scaffold OAuth/tool endpoints.#[McpResource(name: 'users')]) and define schemas.php artisan mcp:inspect or AI clients.Alternatives considered:
Next steps:
users resource to an AI agent).How can I help you explore Laravel packages today?