Labsco
0xmergen logo

LMAD - Laravel MCP API Discovery

โ˜… 2

from 0xmergen

Laravel MCP server that exposes API routes, controllers, FormRequest validation rules, and response schemas to AI agents

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup
LMAD - Laravel MCP API Discovery

LMAD - Laravel MCP API Discovery

A Laravel 12 MCP (Model Context Protocol) package that provides AI agents with comprehensive API discovery and analysis capabilities. LMAD enables AI coding assistants to understand your Laravel application's API structure, validation rules, and response schemas.

Features

  • Route Discovery: List and filter API routes by path, HTTP method, domain, and vendor exclusion
  • Controller Inspection: Get detailed controller method information including file paths and line numbers
  • Request Validation Analysis: Parse FormRequest validation rules, custom error messages, and authorization logic
  • Response Schema Analysis: Analyze controller return types, JsonResource structures, and Model attributes
  • Complete Endpoint Analysis: Get comprehensive information about any endpoint in a single call
  • Dynamic Resources: Access controller and route information via MCP URI templates

Available MCP Tools

ToolDescription
list_api_routesList all API routes with optional filters for path, method, domain, and vendor routes
get_route_detailsGet detailed information about a specific route including controller, middleware, and file locations
get_request_rulesParse FormRequest validation rules, custom error messages, and authorization logic
get_response_schemaAnalyze what an endpoint returns (JsonResource, Model, array, JsonResponse)
analyze_endpointComplete endpoint analysis combining route, controller, request, and response information

Available MCP Resources

ResourceURI TemplateDescription
api_routesroute://{uri}Dynamic access to API routes
controllercontroller://{class}/{method?}Controller and method information

Development

Running Tests

composer test

Code Formatting

composer pint

MCP Inspector

Laravel MCP provides an inspector tool for testing MCP servers:

php artisan mcp:inspector lmad

Author

0xmergen

Support

For issues, questions, or contributions, please visit the GitHub repository.