Laravel MCP Server
This server provides an MCP-powered autonomous development toolkit for Laravel projects, enabling AI agents to understand, generate, and debug Laravel applications. Key capabilities include:
Project Understanding: Analyze Laravel project structure, including models, routes, migrations, packages, frontend, environment, and configuration.
Code Generation: Generate complete features, CRUD operations, and REST APIs, including migrations, models, controllers, requests, routes, Blade views, and tests.
Database Interaction: Inspect database schema, list tables, view column definitions, and parse migration files to extract schema details.
Debugging & Error Analysis: Locate files, diagnose common Laravel errors, suggest fixes from error messages or stack traces, and tail log files.
Artisan Command Execution: Safely run a whitelisted set of php artisan commands.
Testing: Run PHPUnit tests with optional filters.
Dependency Management: List project dependencies from composer.json.
Caching: Manage Laravel application caches (clear or cache config, routes, views).
Intent Planning: Parse natural language development requests into executable plans.
Workflow Management: List, inspect, resume, or rollback generated workflow runs.
Provides tools for running Artisan commands, checking migration status, inspecting environment and config, clearing cache, viewing database schema, scanning Eloquent models, and tailing logs in a Laravel project.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Laravel MCP ServerCheck migration status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Laravel AI Development Agent
An MCP-powered autonomous development toolkit for Laravel projects.
Give Claude / OpenCode / Cursor a Laravel engineering brain.
A Model Context Protocol (MCP) server that makes your AI coding agent understand, generate and debug Laravel applications. Works with any MCP-compatible client: Claude Desktop, Cursor, Codex, OpenCode, and more.
Features
✅ Understand Laravel project structure — models, routes, migrations, packages, frontend — injected automatically
✅ Generate complete features — from a natural-language request to working CRUD, Blade views, and REST APIs
✅ Debug exceptions — locate the file, diagnose common Laravel errors, suggest fixes
✅ Generate REST APIs — migration, model, API controller, Sanctum-protected routes, tests
✅ Analyze database — schema, tables, columns, migrations, relationships
✅ Safe Artisan execution — command whitelist, dangerous commands blocked, sensitive data redacted
Related MCP server: laravel-herd-mcp
Demo
Once connected, ask your AI agent in any MCP-compatible client:
> Add a comment feature to the blog
→ intentPlanner: parsed as create_feature/Comment
→ createFeature: migration → model → controller → request → views → test
→ workflowStatus: run persisted to .mcp/runs/
> List the routes
→ routeList: 47 routes, filterable by name
> SQLSTATE[42P01] Table not found — how to fix?
→ debugWorkflow: locate + diagnose + suggest fixesTools
Tool | Description |
| Run any |
| Check migration status |
| Display APP_ENV, APP_DEBUG, DB connection |
| Clear/cache config, routes, views |
| Inspect config values by key |
| List database tables, view column definitions |
| Scan Eloquent models in |
| Tail the Laravel log file |
| List routes with optional name/URI/method filter |
| Run PHPUnit tests with optional filter |
| Read .env filtering out sensitive values |
| Scan resources/views, js, css structure |
| Create a new Eloquent model with optional migration/factory |
| Create a controller with optional resource/api/model binding |
| Create a new migration file |
| Parse migrations and extract schema (columns, types, FKs) |
| List project dependencies with version info |
| Get comprehensive project context (version, models, routes, packages) |
| Generate full CRUD: migration, model, controller, request, route, test |
| Generate full feature: CRUD + Blade views |
| Generate REST API: migration, model, API controller, routes, tests |
| Analyze an error: locate, diagnose, suggest fixes |
| Parse a natural-language dev request into an executable plan |
| List/inspect/resume/rollback workflow runs |
Usage
Installation
# From npm (demo version)
npm install laravel-ai-agent@beta
# From GitHub (demo version)
npm install github:dok4everak47/laravel-ai-agentWith OpenCode
Add to ~/.config/opencode/opencode.jsonc:
{
"mcpServers": {
"laravel": {
"type": "local",
"command": ["node", "/path/to/laravel-ai-agent/dist/index.js"]
}
}
}With Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"laravel": {
"command": "node",
"args": ["/path/to/laravel-ai-agent/dist/index.js"]
}
}
}Environment Variables
Variable | Default | Description |
|
| Path to Laravel project |
|
| PHP executable path |
| (empty) | Enables the LLM semantic layer for |
|
| OpenAI-compatible API base URL |
|
| LLM model used for intent analysis |
Requirements
Node.js 18+
PHP 8.1+ (for Laravel project interaction)
A Laravel project with
artisanin its root
Development
npm install
npm run typecheck # tsc --noEmit (type-check only)
npm test # run all tests
npm run build # compile to dist/
npm start # node dist/index.js
npm run dev # npx tsx src/index.ts (hot reload)Security Model
✓ Local only — runs entirely on your machine, no server component
✓ No telemetry — sends zero usage data
✓ No external API by default — works fully offline; the LLM semantic layer only makes network calls when LLM_API_KEY is set
✓ Command whitelist — artisan restricted to safe commands
✓ Dangerous commands blocked — db:wipe, migrate:fresh, tinker, shell
✓ Sensitive data redaction — .env values filtered before returning
See SECURITY.md for details.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityBmaintenanceA unified MCP server with composable tools for GitHub operations, file management, shell execution, kanban boards, Discord messaging, and package management. Features role-based security, HTTP/stdio transports, and a web-based development UI.Last updated
- Alicense-qualityCmaintenanceConnects Claude or any MCP client to Laravel Herd, providing 218 tools to manage PHP development environments, Laravel projects, sites, services, database, and more through natural language.Last updated1MIT
- Flicense-qualityDmaintenanceProvides various developer utilities such as UUID generation, timestamp conversion, Base64 encoding, color conversion, password generation, hash generation, and JSON formatting via MCP.Last updated181
- Flicense-qualityDmaintenanceExposes app-registered tools as an MCP server for OpenClaw, forwarding actual tool execution back to the app over a WebSocket bridge.Last updated
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
A basic MCP server to operate on the Postman API.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dok4everak47/laravel-ai-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server