Lmad MCP Server

A Laravel 12 MCP (Model Context Protocol) package that provides AI agents with comprehensive API discovery and analysis capabilities. LMAD enables AI

Local serverstdio

What is the Lmad MCP server?

Connect Lmad to Claude, Cursor or any other MCP client and it stops being a tab you switch to. 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. The lmad mcp server is what makes that connection.

What the server does

  • 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 tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • list_api_routes — List all API routes with optional filters for path, method, domain, and vendor routes
  • get_route_details — Get detailed information about a specific route including controller, middleware, and file locations
  • get_request_rules — Parse FormRequest validation rules, custom error messages, and authorization logic
  • get_response_schema — Analyze what an endpoint returns (JsonResource, Model, array, JsonResponse)
  • analyze_endpoint — Complete endpoint analysis combining route, controller, request, and response information

Credentials and setup notes

Configuration is passed through the environment: APP_ENV, LARAVEL_ROOT. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • PHP: 8.2 or higher - Laravel: 12.x - laravel/mcp: 0.5.x or higher

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Where it fits

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Lmad's toolset — list_api_routes, get_route_details, get_request_rules and 2 more — is a fair guide to whether it matches your workflow. It is maintained by 0xmergen; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Lmad's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
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

How to install the Lmad MCP server

**For HTTP-based MCP server:**

```json
{
  "mcpServers": {
    "lmad": {
      "url": "http://localhost:8000/mcp/lmad"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • PHP: 8.2 or higher - Laravel: 12.x - laravel/mcp: 0.5.x or higher
VariableDescriptionRequired
APP_ENVConfiguration value read at startup.Optional
LARAVEL_ROOTConfiguration value read at startup.Optional

Example prompts to try

  • Use Lmad to list api routes.
  • Use Lmad to get route details.
  • Use Lmad to get request rules.

Frequently asked questions

It connects Lmad to MCP-compatible AI assistants such as Claude and Cursor, exposing 5 tools (list_api_routes, get_route_details, get_request_rules, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Lmad directly.