Bug: Undefined function php_binary() in McpInspectorCommand prevents MCP Inspector in Laravel MCP
Laravel Package Version
0.1.1
Laravel Version
10
PHP Version
8.3
Database Driver & Version
No response
Description
When running the command below in a Laravel 10 application with MCP package:
php artisan mcp:inspector payap
I get the following error:
Error
Call to undefined function Illuminate\Support\php_binary()
at vendor/laravel/mcp/src/Console/Commands/McpInspectorCommand.php:54 ... After checking the code, I noticed that php_binary() is used, but this function does not exist in PHP, Laravel, or the MCP package. The proper approach is to use the PHP global constant PHP_BINARY instead.
How to fix: In vendor/laravel/mcp/src/Console/Commands/McpInspectorCommand.php, replace:
php php_binary() with
php PHP_BINARY After making this change, the command works properly.
Steps To Reproduce
Install the laravel/mcp package version 0.1.1 in a Laravel 10 project.
Run php artisan mcp:inspector payap.
Observe the error regarding the undefined function php_binary().
Why not using last version of the package ?
I tested this with latest version and it's working as expected closing it for now.