LMAD - Laravel MCP API Discovery

by 0xmergen

Not rated
GitHub

About

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

Details

Author
0xmergen
Categories
Developer Tools, API, Other

Setup

Install LMAD - Laravel MCP API Discovery in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/0xmergen/lmad

Follow the installation instructions in the repository README, then restart your MCP client.

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

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.

- 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

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

The package will automatically register its service provider.

If you want to customize the MCP server registration:

php artisan vendor:publish --tag=lmad-routes

This publishes the MCP routes toroutes/lmad.php.

The LMAD MCP server is automatically registered in your application via the package'sroutes/ai.phpfile:

use Laravel\Mcp\Facades\Mcp; use Lmad\Mcp\LmadServer; Mcp::local('lmad', LmadServer::class);

Create or edit your Claude Code MCP configuration file to connect to the LMAD server.

Add to your Claude Desktop config (~/.claude_desktop_config.jsonon macOS/Linux):

{ "mcpServers": { "lmad": { "command": "php", "args": [ "/path/to/your/lmad/project/artisan", "mcp:serve", "--server=lmad" ], "env": { "APP_ENV": "local" } } } }
{ "mcpServers": { "lmad": { "url": "http://localhost:8000/mcp/lmad" } } }

Restart Claude Desktop or reload your IDE extension to activate the MCP server.

List all available MCP tools and resources.

You should see LMAD tools likelist_api_routes,get_route_details, etc.

Get all CRM API routes: Use list_api_routes with path filter "api/crm" Analyze the companies endpoint: Use analyze_endpoint for URI "api/crm/companies" with method "GET" Get validation rules for company creation: Use get_request_rules for "App\Http\Requests\Crm\Company\StoreRequest"

Install theCline extensionfrom the VS Code Marketplace.
- Open VS Code Settings
- Search for "Cline: MCP Servers"
- Add the LMAD server configuration:

{ "lmad": { "command": "php", "args": [ "/absolute/path/to/your/lmad/project/artisan", "mcp:serve", "--server=lmad" ], "env": { "APP_ENV": "local", "LARAVEL_ROOT": "/absolute/path/to/your/lmad/project" } } }
{ "lmad": { "url": "http://localhost:8000/mcp/lmad", "headers": { "Accept": "application/json" } } }
cd /path/to/your/lmad/project composer run dev

Reload the VS Code window to activate the MCP server connection.

I need to understand the CRM API. Can you: 1. List all routes under "api/crm" 2. Get details for the companies store endpoint 3. Show me the validation rules for creating a company

Cline will use the LMAD MCP tools to gather this information.

Laravel MCP provides an inspector tool for testing MCP servers:

MIT License (MIT). Please seeLICENSEfor more information.

For issues, questions, or contributions, please visit theGitHub repository.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.

The MCP server for Bitrix24 provides AI assistants with structured access to the Bitrix24 API. It delivers up-to-date method descriptions, parameters, and valid values, allowing assistants to work with precise data instead of guesswork. This reduces code errors and accelerates Bitrix24 integration development.

Tool platform by IBM to build, test and deploy tools for any data source

One remote MCP server for 500+ production APIs — Stripe, HubSpot, Postgres, Gmail, and more. OAuth and API key auth, credential management, and a CLI.

An MCP server for interacting with the Postman API, requiring an API key.

Arbitrary code execution and tool-use platform for LLMs by Riza

A command-line tool for interacting with Shopify's Admin GraphQL API, Functions, and Polaris Web Components.

Single tool to control all 100+ API integrations, and UI components

Agent-native developer Q&A API with MCP + A2A endpoints for citations, job pickup, and answer submission.

An MCP server for ABP.IO that enables AI models to interact with your ABP applications and framework.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.