Replies: 1 comment
-
This is a JSON-RPC parse error, which usually means that the server (Laravel Boost MCP server in this case) is outputting something that is not valid JSON. Since MCP expects strict JSON-RPC 2.0 messages, any PHP error, warning, or stray output (like whitespace, logging, HTML, etc.) will break it. Let’s debug systematically:
Make sure you typed the command correctly: php artisan mcp:start laravel-boost (you wrote php aritsan in your message, which might just be a typo, but double-check it’s not that in your real terminal).
Run: php artisan mcp:start laravel-boost -vvv The -vvv flag increases verbosity and should reveal if PHP is outputting warnings/notices before JSON. Also check your Laravel log (storage/logs/laravel.log) right after running the command.
Sometimes Xdebug, deprecation warnings, or logging middleware can dump text into stdout. MCP requires only JSON on stdout. To confirm: php artisan mcp:start laravel-boost 2>error.log Then inspect error.log. If you see PHP notices, they’re polluting the JSON stream.
Inside your Docker container, is php pointing to the correct binary? Try: php -v Make sure the Laravel Boost MCP package is installed inside the same container where you’re running Artisan.
If you’re using laravel-boost/mcp composer show laravel-boost/mcp If not, install: composer require laravel-boost/mcp --dev Likely Causes PHP warnings/notices (most common). Wrong PHP command/environment (outside of Docker). Package not installed or autoload broken. JSON is being corrupted by extra output. 👉 Can you run this for me inside your container and paste the output? php artisan mcp:start laravel-boost -vvv 2>&1 | head -n 20 That will show the first 20 lines, which should reveal whether JSON is coming out or if PHP is dumping errors. Would you like me to also show you how to wrap the command so it forces only JSON output (ignoring warnings)? That way, even if you have noisy PHP output, it won’t break the MCP handshake. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
For context, I'm using Neovim with the MCP extension. In addition, I have docker-compose setup for my Laravel development.
For some reason, I cannot start the Laravel Boost MCP server and the error isn't very descriptive.
From the MCP Plugin I get an error that the parsed JSON has an error.
And with the command
php aritsan mcp:start laravel-boost
I get:Anyone tried this and been through this?
Beta Was this translation helpful? Give feedback.
All reactions