DEV Community

William Meier
William Meier

Posted on

How to Use Laravel Boost with Gemini CLI

Laravel Boost is an MCP server equipped with over 15 tools to help your AI assistant generate high-quality Laravel code.

By default, your installation doesn’t include an option to run with Gemini CLI, — but there’s an easy way to set it up.


1. Install Gemini CLI

If you haven’t installed it yet, run this command to install Gemini CLI globally:

npm install -g @google/gemini-cli
Enter fullscreen mode Exit fullscreen mode

2. Install Laravel Boost

Navigate to your Laravel project and install the package:

composer require laravel/boost --dev
Enter fullscreen mode Exit fullscreen mode

Then install the MCP server and the coding guidelines:

php artisan boost:install
Enter fullscreen mode Exit fullscreen mode

3. Configure Gemini CLI

Once installation is complete, create a JSON file for your Gemini CLI settings at:

.gemini/settings.json

Paste the following content inside:

{
  "mcpServers": {
    "laravel-boost": {
      "command": "php",
      "args": ["artisan", "boost:mcp"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

That’s it!
Now start Gemini CLI in your terminal — it will automatically load Laravel Boost.


4. Verify the MCP Integration

To confirm that the MCP servers and tools are properly integrated, start the Gemini CLI and run:

/mcp list
Enter fullscreen mode Exit fullscreen mode

You should see a list of all available tools.

Laravel Boost tools

Bonus: Integrate with Laravel Herd

Laravel Boost also includes some tools for Herd.
If you have Herd installed and want to use it with Gemini CLI, just copy the "herd" object from your editor’s MCP configuration file (for example, .vscode/mcp.json) and paste it into your .gemini/settings.json file, right after the "laravel-boost" object.

{
    "mcpServers": {
        "laravel-boost": {
            "command": "php",
            "args": ["artisan", "boost:mcp"]
        },
        "herd": {
            "command": "php",
            "args": ["C:/Users/user/.config/herd/bin/herd-mcp.phar"],
            "env": {
                "SITE_PATH": "C:\\OurPath\\project-name"
            }
        }
    }
}
Enter fullscreen mode Exit fullscreen mode

That’s it! 🎉
I hope this helps you get Laravel Boost running smoothly with Gemini CLI.

Top comments (0)