laravel-mcp

Expose Laravel 12 MCP servers with tools, resources, and prompts to AI clients.

40|7|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel-mcp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-mcp
Source: https://github.com/rawveg/skillsforge-marketplace/tree/main/laravel-mcp
Command: npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel-mcp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires composer require laravel/mcp, and includes references (resource) components.

What problem does it solve?

This Skill simplifies the integration of AI clients with Laravel applications using the Model Context Protocol (MCP). It automates the setup of AI-powered features, reducing complexity and development time for developers looking to expose their Laravel app's capabilities to AI.

Core Features & Use Cases

  • MCP Server Definition: Easily define central communication points for AI clients, exposing tools, resources, and prompts.
  • AI Tools for Actions: Create AI tools that perform specific actions within your Laravel application, with robust input validation and dependency injection.
  • Reusable Prompts & Resources: Define standardized prompt templates and expose application data/content to AI clients.
  • Use Case: Imagine you want an AI to manage user accounts in your Laravel app. This skill helps you quickly define an "Account Management Server" with "Create User" and "Update User" tools, allowing the AI to interact with your application's user models securely and efficiently.

Quick Start

To begin building an AI-powered Laravel application: Install Laravel MCP: composer require laravel/mcp Publish AI routes: php artisan vendor:publish --tag=ai-routes Generate a new MCP server: php artisan make:mcp-server MyServer Register your server in routes/ai.php: Mcp::web('/mcp/my-server', MyServer::class);

Frequently Asked Questions about laravel-mcp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose Laravel application capabilities to AI clients using the Model Context Protocol?

The Model Context Protocol enables Laravel apps to expose tools, resources, and prompts to AI clients. Install laravel/mcp via Composer, publish AI routes with php artisan vendor:publish --tag=ai-routes, generate an MCP server using php artisan make:mcp-server, and register it in routes/ai.php to enable structured AI interactions with your application.

Can I use Laravel MCP with OAuth 2.1 or Sanctum for authentication?

Yes, Laravel MCP supports both OAuth 2.1 and Sanctum authentication methods. This allows you to secure AI client access to your MCP servers and tools while maintaining Laravel's standard authentication patterns and token management.

What validation and input handling does Laravel MCP provide for AI tools?

Laravel MCP tools use JSON Schema for input validation and support dependency injection for argument resolution. This ensures type-safe tool parameters, automatic validation, and seamless access to Laravel services within your AI-powered tools.

How do I create reusable prompts and resources in Laravel for AI clients?

Define standardized prompt templates and expose application data as resources within your MCP server definition. Resources and prompts are registered alongside tools, allowing AI clients to access consistent instructions and data structures for reliable interactions with your Laravel application.

Does Laravel MCP support streaming responses and progress notifications?

Yes, Laravel MCP supports streaming responses and progress notifications for long-running operations. Annotations like IsReadOnly and IsIdempotent help AI clients understand tool behavior, while streaming enables real-time feedback during complex tasks executed through web or local routes.

What metadata does an MCP server expose to AI clients?

MCP servers publish name, version, instructions, and a complete catalog of available tools, resources, and prompts. This metadata enables AI clients to discover capabilities and understand how to interact with your Laravel application securely and effectively.