-
Notifications
You must be signed in to change notification settings - Fork 134
Enhance MCP commands for WSL compatibility #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance MCP commands for WSL compatibility #121
Conversation
ceilidhboy
commented
Aug 22, 2025
@HichemTab-tech thanks, man! Much appreciated! You saved some of my hair 🤣 I've installed Boost direct from your fork and it's now working perfectly in Junie on PhpStorm on Windows with the project under WSL2 on Ubuntu.
I can also confirm that it works flawlessly in Augment Code now as well 👏
I hope the Boost team can accept your PR soon so I can switch back to the canonical version.
@HichemTab-tech thanks, man! Much appreciated! You saved some of my hair 🤣 I've installed Boost direct from your fork and it's now working perfectly in Junie on PhpStorm on Windows with the project under WSL2 on Ubuntu.
I can also confirm that it works flawlessly in Augment Code now as well 👏
I hope the Boost team can accept your PR soon so I can switch back to the canonical version.
@ceilidhboy lol thanks, I'm glad that it helped.
spitfire64
commented
Aug 25, 2025
@ceilidhboy How do you set it up to give guidelines to Augment?
@ceilidhboy How do you set it up to give guidelines to Augment?
To use the fork with the fix, point Composer directly to it. Add this to your composer.json
.
There's no need to change the package to the fork. Just changing the arguments in mcp.json will work. In any case, the following explanation also includes the fork.
"repositories": [ { "type": "vcs", "url": "https://github.com/HichemTab-tech/forked-from-boost.git" } ], "require-dev": { "laravel/boost": "dev-fix-mcp-commands-for-wsl as 1.0.0" }
Then run:
composer update laravel/boost --with-all-dependencies
For MCP setup with Junie/Augment in PhpStorm, add a config like this to .junie/mcp/mcp.json
:
{ "mcpServers": { "laravel-boost": { "command": "wsl.exe", "args": [ "-d", "Ubuntu-24.04", "--cd", "/home/<your-wsl-path-to-project>", "--exec", "./vendor/bin/sail", "artisan", "boost:mcp" ] } } }
@ceilidhboy How do you set it up to give guidelines to Augment?
So as @marciozotelli wrote, you first need to edit your composer.json
and add the following repositories key and edit the version of laravel/boost
as shown below:
{ "require-dev": { "laravel/boost": "dev-fix-mcp-commands-for-wsl as 1.0.999" }, "repositories": [ { "type": "vcs", "url": "git@github.com:HichemTab-tech/forked-from-boost.git", "no-api": true } ] }
Then run:
composer update -W laravel/boost
Then in Augment Code, add an MCP server called Laravel Boost
with command below, using the absolute path to your PHP binary as the first parameter after wsl
and the absolute path to the artisan command in your project directory:
wsl /usr/bin/php8.4 /your/absolute/Laravel/project/directory/artisan boost:mcp
You'll have to add an MCP server entry to each project, with the absolute path to the project's artisan command.
Optional bash script to detect Laravel and use the current directory
To make this even easier, I created a small bash script in a file laravel-boost-mcp
which detects a Laravel project in the current directory and does the necessary, like this:
#!/bin/bash # Laravel Boost MCP wrapper script # Automatically detects Laravel project in current directory if [ -f "./artisan" ]; then /usr/bin/php8.4 ./artisan boost:mcp else echo "Error: No Laravel project found in current directory" >&2 echo "Please run this from a Laravel project root directory" >&2 exit 1 fi
I put it in directory ~/.local/bin/
and did a chmod +x ~/.local/bin/laravel-boost-mcp
on it to make it executable. Now I can just call the script ~/.local/bin/laravel-boost-mcp
as the command in the Augment MCP server field in every project that requires it.
Works like a charm!
Description:
This PR updates Laravel Boost’s MCP server command configuration to ensure compatibility when running inside WSL. Instead of relying on PhpStorm to directly execute the WSL PHP binary (which fails due to path and process resolution differences), the changes adjust the
mcp.json
command to invoke PHP in a way that works in both native and WSL environments.Key changes:
isRunningInWsl()
.command
to"wsl"
instead of"php"
, and pass the PHP binary path as the first argument.$forceAbsolutePath
option to ensure the PHP binary/artisan path is absolute when in WSL mode."php"
command for non-WSL environments to maintain backward compatibility.Fixes #120