MCP.so
登录

Laravel Artisan MCP Server

@entanglr

关于 Laravel Artisan MCP Server

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

基本信息

分类

其他

许可证

MIT

运行时

python

传输方式

stdio

发布者

entanglr

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

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

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

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).

评论

其他 分类下的更多 MCP 服务器