MCP.so
Sign In

Laravel Artisan MCP Server

@entanglr

About Laravel Artisan MCP Server

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

Basic information

Category

Other

License

MIT

Runtime

python

Transports

stdio

Publisher

entanglr

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "laravel-artisan-mcp": {
      "command": "uv",
      "args": [
        "init"
      ]
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Laravel Artisan MCP Server?

A Model Context Protocol (MCP) server that enables secure execution of Laravel Artisan commands through Claude and other MCP clients. It acts as a bridge between AI assistants and your local Laravel applications, allowing controlled management of Laravel projects through natural language conversations.

How to use Laravel Artisan MCP Server?

Clone the repository, set up a Python virtual environment (3.10+), and install dependencies with uv add "mcp[cli]". Configure environment variables ARTISAN_DIRECTORY (absolute path to a Laravel project) and WHITELISTED_COMMANDS (comma‑separated list of allowed Artisan commands). Run the server directly, via a .env file, or integrate it into Claude Desktop’s claude_desktop_config.json.

Key features of Laravel Artisan MCP Server

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

Use cases of Laravel Artisan MCP Server

  • Ask Claude to list all routes (route:list) in your Laravel app
  • Clear the application cache (cache:clear) via natural language
  • Create a new controller (make:controller) without leaving the chat
  • Show all available Artisan commands that are whitelisted

FAQ from Laravel Artisan MCP Server

What happens if ARTISAN_DIRECTORY is not provided?

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

What if Artisan is not found at the specified path?

You will see “Artisan not found at: /path/to/artisan”. Verify the path points to a valid Laravel project directory and that the Artisan file exists with executable permissions.

What if PHP is not found?

The error “PHP executable not found” appears. Make sure PHP is installed and accessible in your system PATH.

What security measures does the server implement?

Directory isolation (only the configured Laravel directory is accessed), command whitelisting (only allowed commands can run), input validation on all inputs, and error handling to prevent sensitive information leakage.

Can I use this server with production Laravel applications?

The authors recommend using this tool only in development or testing environments. Production use is at your own risk, with full understanding of security implications and appropriate safeguards (backups, careful whitelisting).

Comments

More Other MCP servers