MCP.so
登录

Laravel Artisan MCP Server

@diggy

基本信息

分类

其他

许可证

MIT license

传输方式

stdio

作者

diggy

关于 Laravel Artisan MCP Server

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

Laravel Artisan MCP Server 配置

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

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

Laravel Artisan MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

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

概览

What is Laravel Artisan MCP Server?

Laravel Artisan MCP Server is 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 local Laravel applications, allowing controlled management of Laravel projects via natural language conversations.

How to use Laravel Artisan MCP Server?

Clone the repository, create a Python virtual environment, install dependencies with uv add "mcp[cli]", then set the ARTISAN_DIRECTORY and WHITELISTED_COMMANDS environment variables. Configure the server in your MCP-compatible client (e.g., Claude Desktop) by adding a JSON entry pointing to artisan_mcp_server.py. Two tools are available: run_artisan to execute a whitelisted command and list_all_artisan_commands to display all available commands.

Key features of Laravel Artisan MCP Server

  • Executes only whitelisted Artisan commands
  • Automatically locates PHP on your system
  • Accesses a single configured Laravel project directory
  • Lists all available Artisan commands in the project
  • Provides robust input validation and error handling

Use cases of Laravel Artisan MCP Server

  • Clear the application cache by asking Claude to run cache:clear
  • List all registered routes in a Laravel project via route:list
  • View all available Artisan commands without leaving your AI assistant
  • Generate controllers, models, or other classes using make:* commands when whitelisted

常见问题

1

How is the server secured?

The server implements directory isolation (only accesses the configured Laravel folder), command whitelisting (only allows explicitly permitted commands), input validation, and error handling to prevent sensitive information leakage.

2

What are the runtime requirements?

Python 3.10 or higher, a Laravel project with the Artisan CLI, PHP installed and accessible in your system PATH, and an MCP-compatible client such as Claude Desktop.

3

Where does my project data live?

All commands execute on your local machine within the specified Laravel directory. The server never sends your project code or data to external services.

4

What commands can I run?

Only the commands listed in the `WHITELISTED_COMMANDS` environment variable (e.g., `route:list,cache:clear,make:controller`). You can see the full whitelist by asking the assistant.

5

How do I debug connection issues?

Verify that `ARTISAN_DIRECTORY` points to a valid Laravel project containing the Artisan executable, that PHP is in your PATH, and that all environment variables are correctly set in your MCP client configuration.

评论

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