mcp icon indicating copy to clipboard operation
mcp copied to clipboard

Bug: Undefined function php_binary() in McpInspectorCommand prevents MCP Inspector in Laravel MCP

Open brunogdn opened this issue 2 months ago • 1 comments

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().

brunogdn avatar Oct 28 '25 17:10 brunogdn

Why not using last version of the package ?

alankpax avatar Nov 03 '25 08:11 alankpax

I tested this with latest version and it's working as expected closing it for now.

pushpak1300 avatar Dec 04 '25 15:12 pushpak1300