-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Description
Laravel Package Version
0.1.1
Laravel Version
12.11.1
PHP Version
8.3.24
Database Driver & Version
HTTP 405 Method Not Allowed Error When Connecting to Laravel MCP Server
Description
I'm encountering a persistent HTTP 405 error when trying to connect to my Laravel MCP server, even when explicitly using POST requests. The error message suggests a mismatch between the expected and actual HTTP methods.
Error Details
Error from MCP server: Error: Error POSTing to endpoint (HTTP 405): {
"message": "The GET method is not supported for route mcp/demo. Supported methods: POST.",
"exception": "Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException",
"file": "/path/to/vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php",
"line": 123,
}
Steps To Reproduce
- Set up a Laravel MCP server with a POST route defined as: Route::post('/mcp/demo', [Controller::class, 'method']);
- Attempt to connect using the MCP client
- Alternatively, test directly with Postman using an explicit POST request
- Receive the same 405 error in both cases