laravel-artisan-mcp
2
Laravel Artisan MCP Server allows secure execution of Laravel Artisan commands via AI clients, offering a bridge between AI assistants and Laravel applications. It focuses on security through command whitelisting, input validation, and robust error handling.
Laravel Artisan MCP Server
Overview
A Model Context Protocol (MCP) server designed to securely execute Laravel Artisan commands via Claude and other MCP clients. It bridges AI assistants with local Laravel applications, enabling project management through natural language.
Features
- Access a single directory with a Laravel project
- Automatically locate PHP on systems
- Execute only whitelisted Artisan commands
- View all available Artisan commands
- Built-in security with robust input validation
Requirements
- Python 3.10 or higher
- Laravel project with Artisan CLI
- PHP executable accessible in system PATH
- MCP-compatible client like Claude Desktop
Installation
- Clone the repository and navigate to the directory.
- Create a virtual environment and activate it.
- Install dependencies using the provided commands.
Configuration
Configure with environment variables or use a .env
file.
Available Tools
run_artisan
: Executes a specific whitelisted Artisan command.list_available_artisan_commands
: Lists all available whitelisted Artisan commands.
Security Considerations
Includes directory isolation, command whitelisting, input validation, and error handling.
Disclaimer
Use in development and testing environments. Ensure all proper backups and safeguards.