Skip to content

[Bug]: Error when running php artisan mcp:test-tool — "There are no commands defined in the 'mcp' namespace" #3

@evecimar

Description

@evecimar

What happened?

Hello!

After trying to install the package, I'm encountering an issue when running the command:

php artisan mcp:test-tool
I get the following error:
{"message":"There are no commands defined in the \"mcp\" namespace.","context":{"exception":{"class":"Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException","message":"There are no commands defined in the \"mcp\" namespace.","code":0,"file":"/var/www/app/vendor/symfony/console/Application.php:669"}},"level":400,"level_name":"ERROR","channel":"local","datetime":"2025-04-26T13:40:21.173975-03:00","extra":{}}}

ERROR  There are no commands defined in the "mcp" namespace.

Additionally, when trying to run the publish command:

php artisan vendor:publish --provider="OPGG\LaravelMcpServer\LaravelMcpServerServiceProvider"


INFO  No publishable resources for tag [].

It seems like the command is not being registered properly, and the mcp namespace cannot be found.
I'd appreciate any help or advice on how to resolve this issue or if any additional configuration is needed.

How to reproduce the bug

composer require opgginc/laravel-mcp-server
php artisan vendor:publish --provider="OPGG\LaravelMcpServer\LaravelMcpServerServiceProvider
php artisan make:mcp-tool MyCustomTool

Package Version

1.0.1

PHP Version

8.2.20

Laravel Version

10.10

Which operating systems does this happen with?

Linux

Notes

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions