Laravel Artisan MCP Server

A Model Context Protocol (MCP) server that enables secure execution of Laravel Artisan commands through Claude and other MCP clients.

Local serverstdioPython

What is the Laravel Artisan MCP Server?

A Model Context Protocol (MCP) server that enables secure execution of Laravel Artisan commands through Claude and other MCP clients.

The short version

  • Access a single directory containing a Laravel project
  • Automatically locate PHP on your system
  • Execute only whitelisted Artisan commands
  • View all available Artisan commands
  • Secure by design with robust input validation

What it needs from you

  • Python 3.10 or higher - Laravel project with Artisan CLI - PHP installed and accessible in your PATH - MCP-compatible client (such as Claude Desktop)

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
run_artisan
list_available_artisan_commandsDisplays all available whitelisted Artisan commands in the Laravel application.

How to install the Laravel Artisan MCP Server

{
     "mcpServers": {
       "laravel-artisan": {
         "command": "uv",
         "args": [
           "--directory", 
           "/absolute/path/to/laravel-artisan-mcp",
           "run", 
           "artisan_mcp_server.py"
         ],
         "env": {
           "ARTISAN_DIRECTORY": "/absolute/path/to/your/laravel/project",
           "WHITELISTED_COMMANDS": "route:list,cache:clear,make:controller"
         }
       }
     }
   }

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

Configuration

  • Python 3.10 or higher - Laravel project with Artisan CLI - PHP installed and accessible in your PATH - MCP-compatible client (such as Claude Desktop)
VariableDescriptionRequired
ARTISAN_DIRECTORYFilesystem location the server is allowed to use.Optional
WHITELISTED_COMMANDSConfiguration value read at startup.Optional

Example prompts to try

  • “Use Laravel Artisan to run artisan.”
  • “Use Laravel Artisan to list available artisan commands.”

Frequently asked questions

The server will error with “ARTISAN_DIRECTORY must be provided in configuration”. Ensure the environment variable is set and the directory exists.