Skip to content

Commit cc1f068

Browse files
committed
fix: Use real Sail path for PhpStorm MCP config
PhpStorm doesn't support symlinks in MCP configuration paths. When useAbsolutePathForMcp is true (PhpStorm), use the real Sail executable path instead of the symlink. Changes: - Detect when absolute paths are needed (PhpStorm/forceAbsolutePath) - Use 'vendor/laravel/sail/bin/sail' for PhpStorm - Keep './vendor/bin/sail' for other IDEs (Claude Code, Cursor, VS Code) This fixes the MCP server startup issue reported by @MltStephane
1 parent d894546 commit cc1f068

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Install/CodeEnvironment/CodeEnvironment.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public function useAbsolutePathForMcp(): bool
4141
public function getPhpPath(bool $forceAbsolutePath = false): string
4242
{
4343
if ($this->isSailProject()) {
44+
// PhpStorm doesn't support symlinks in MCP config, use real path
45+
if ($this->useAbsolutePathForMcp() || $forceAbsolutePath) {
46+
return base_path('vendor/laravel/sail/bin/sail');
47+
}
48+
4449
return './vendor/bin/sail';
4550
}
4651

0 commit comments

Comments
 (0)