
laravel-mcp-server
by Falzz1010
π Laravel MCP Server
<div align="center"> </div>AI-Powered Laravel Development Assistant β Secure bridge between AI Clients (Claude Desktop, Cursor, VS Code) and your local Laravel projects.
π Table of Contents
- What is Laravel MCP Server?
- Features
- Security Architecture
- Installation
- Quick Start
- Configuration
- Usage Examples
- Tools Reference
- Security Details
- Troubleshooting
- Contributing
- License
π― What is Laravel MCP Server?
Laravel MCP Server adalah MCP (Model Context Protocol) Server berbasis TypeScript/Node.js yang memungkinkan AI Assistant seperti Claude untuk:
- β
Menjalankan perintah
php artisandengan aman - β Membaca dan menganalisis Laravel logs
- β Melihat routes, config, dan structure proyek
- β Membaca dan menulis source code (dengan proteksi ketat)
- β Menjalankan kode PHP via Tinker (dalam sandbox mode)
Mengapa dibuat? AI modern sangat powerful untuk development, tapi memberikan akses terminal langsung ke AI sangat berbahaya. Server ini memberikan controlled access dengan 10 lapis security layer yang dirancang khusus untuk mencegah kerusakan pada proyek Laravel kamu.
β¨ Features
π§ 7 Powerful Tools
| Tool | Fungsi | Access Level |
|---|---|---|
run_artisan | Jalankan perintah artisan yang aman | π’ Always Active |
read_logs | Baca Laravel logs dengan filter | π’ Always Active |
list_routes | Lihat semua routes dengan filter | π’ Always Active |
read_env | Lihat .env dengan credential masking | π‘ Masked by Default |
read_file | Baca source code proyek | π’ Always Active |
write_file | Tulis/edit file proyek | π΄ Requires --allow-write |
run_tinker | Jalankan PHP code via Tinker | π΄ Requires --allow-tinker |
π 3 Laravel Resources
laravel://envβ Static view of.envdengan credential maskinglaravel://routesβ JSON view lengkap semua routeslaravel://config/{key}β Dynamic config reader (contoh:laravel://config/app.name)
π¬ 3 Smart Prompts
debug-errorβ Otomatis baca logs dan minta AI menganalisis errorcreate-crudβ Template untuk generate CRUD lengkap (Model, Migration, Controller, Routes)review-codeβ Code review dengan fokus Laravel best practices
π‘οΈ 10-Layer Security System
- Environment Gate β Menolak start jika
APP_ENV=production - Rate Limiter β Max 30 perintah/menit, 500 perintah/jam
- Command Classifier β 3-tier risk classification (READ_ONLY, CAUTIOUS, DANGEROUS)
- Input Sanitizer β Blokir shell injection (
;,&&,$(), backticks, dll) - Flag Validator β Blokir
--force,--seed,--drop-*,--wipe - Path Protector β Blokir path traversal (
../, syml
Related servers

n8n
by n8n-io
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

@modelcontextprotocol/server-everything
OfficialMCP server that exercises all the features of the MCP protocol

@modelcontextprotocol/server-filesystem
OfficialMCP server for filesystem access