-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Laravel Package Version
"laravel/mcp": "^0.3.4"
Laravel Version
"laravel/framework": "^12.0",
PHP Version
PHP 8.4.5 (cli) (built: Mar 12 2025 12:17:53) (NTS Visual C++ 2022 x64)
Database Driver & Version
No response
Description
I'm experiencing connection issues when trying to integrate my Laravel MCP server with Claude Desktop. The inspector UI works but Claude Desktop fails to connect using the generated configurations.
Environment
Steps To Reproduce
- Created a custom MCP server named "documents"
- Ran
php artisan mcp:inspector documents - Inspector UI spins up in browser successfully
- Attempted to connect via the inspector UI - Connection fails
- Copied the generated STDIO configuration to Claude Desktop's
claude_desktop_config.json - Claude Desktop fails to connect with repeated error messages
Configuration Attempted
STDIO Configuration (from inspector)
{
"mcpServers": {
"default-server": {
"command": "C:\\laragon\\bin\\php\\php-8.4.5-nts-Win32-vs17-x64\\php.exe",
"args": [
"D:\\coding\\bloodykheeng",
"projects\\laravel-ai\\laravel",
"with",
"ollama\\docs-injestion\\artisan",
"mcp:start",
"documents"
],
"env": {
"APPDATA": "C:\\Users\\bk\\AppData\\Roaming",
"HOMEDRIVE": "C:",
"HOMEPATH": "\\Users\\bk",
"LOCALAPPDATA": "C:\\Users\\bk\\AppData\\Local",
"PATH": "...",
"PROCESSOR_ARCHITECTURE": "AMD64",
"SYSTEMDRIVE": "C:",
"SYSTEMROOT": "C:\\WINDOWS",
"TEMP": "C:\\Users\\bk\\AppData\\Local\\Temp",
"USERNAME": "bk",
"USERPROFILE": "C:\\Users\\bk",
"PROGRAMFILES": "C:\\Program Files"
}
}
}
}
Error Messages
In the terminal, I see repeated messages:
Received POST message for sessionId c9756efb-cbf2-4aed-b314-be2484520569
New STDIO connection request
Query parameters: {"command":"C:\\laragon\\bin\\php\\php-8.4.5-nts-Win32-vs17-x64\\php.exe","args":"D:\\coding\\bloodykheeng projects\\laravel-ai\\laravel with ollama\\docs-injestion\\artisan mcp:start documents","env":"{\"APPDATA\":\"C:\\\\Users\\\\bk\\\\AppData\\\\Roaming\",\"HOMEDRIVE\":\"C:\",\"HOMEPATH\":\"\\\\Users\\\\bk\",\"LOCALAPPDATA\":\"C:\\\\Users\\\\bk\\\\AppData\\\\Local\",\"PATH\":\"C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\npm-cache\\\\_npx\\\\5a9d879542beca3a\\\\node_modules\\\\.bin;D:\\\\coding\\\\bloodykheeng projects\\\\laravel-ai\\\\laravel with ollama\\\\docs-injestion\\\\node_modules\\\\.bin;D:\\\\coding\\\\bloodykheeng projects\\\\laravel-ai\\\\laravel with ollama\\\\node_modules\\\\.bin;D:\\\\coding\\\\bloodykheeng projects\\\\laravel-ai\\\\node_modules\\\\.bin;D:\\\\coding\\\\bloodykheeng projects\\\\node_modules\\\\.bin;D:\\\\coding\\\\node_modules\\\\.bin;D:\\\\node_modules\\\\.bin;C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\nvm\\\\v22.19.0\\\\node_modules\\\\npm\\\\node_modules\\\\@npmcli\\\\run-script\\\\lib\\\\node-gyp-bin;c:\\\\Users\\\\bk\\\\AppData\\\\Roaming\\\\Code\\\\User\\\\globalStorage\\\\github.copilot-chat\\\\debugCommand;c:\\\\Users\\\\bk\\\\AppData\\\\Roaming\\\\Code\\\\User\\\\globalStorage\\\\github.copilot-chat\\\\copilotCli;C:\\\\Program Files\\\\ImageMagick-7.1.2-Q16-HDRI;C:\\\\Program Files (x86)\\\\Common Files\\\\Intel\\\\Shared Libraries\\\\redist\\\\intel64\\\\compiler;C:\\\\WINDOWS\\\\system32;C:\\\\WINDOWS;C:\\\\WINDOWS\\\\System32\\\\Wbem;C:\\\\WINDOWS\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\;C:\\\\WINDOWS\\\\System32\\\\OpenSSH\\\\;C:\\\\Program Files\\\\Git\\\\cmd;C:\\\\laragon\\\\bin\\\\php\\\\php-8.4.5-nts-Win32-vs17-x64;C:\\\\scrcpy-win64-v3.3.1;C:\\\\ProgramData\\\\ComposerSetup\\\\bin;C:\\\\Program Files (x86)\\\\Windows Kits\\\\10\\\\Windows Performance Toolkit\\\\;C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\nvm;C:\\\\nvm4w\\\\nodejs;C:\\\\Program Files\\\\dotnet\\\\;C:\\\\ProgramData\\\\chocolatey\\\\bin;C:\\\\Program Files\\\\gs\\\\gs10.06.0\\\\bin;C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python313\\\\Scripts\\\\;C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python313\\\\;C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\bin;C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\GitHubDesktop\\\\bin;C:\\\\Users\\\\bk\\\\AppData\\\\Roaming\\\\Composer\\\\vendor\\\\bin;C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\nvm;C:\\\\nvm4w\\\\nodejs;C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\PowerToys\\\\DSCModules\\\\;C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\Programs\\\\Ollama;C:\\\\Program Files\\\\Tesseract-OCR\",\"PROCESSOR_ARCHITECTURE\":\"AMD64\",\"SYSTEMDRIVE\":\"C:\",\"SYSTEMROOT\":\"C:\\\\WINDOWS\",\"TEMP\":\"C:\\\\Users\\\\bk\\\\AppData\\\\Local\\\\Temp\",\"USERNAME\":\"bk\",\"USERPROFILE\":\"C:\\\\Users\\\\bk\",\"PROGRAMFILES\":\"C:\\\\Program Files\"}","transportType":"stdio"}
STDIO transport: command=C:\laragon\bin\php\php-8.4.5-nts-Win32-vs17-x64\php.exe, args=D:codingbloodykheeng,projectslaravel-ailaravel,with,ollamadocs-injestionartisan,mcp:start,documents
Created client transport
Created server transport
The connection attempts keep repeating but never succeed.
Observation: Streamable HTTP Works Partially
When I run:
php artisan mcp:inspector mcp/documents
The inspector UI connects successfully in the browser. However, the generated configuration for Claude Desktop doesn't work:
{
"mcpServers": {
"default-server": {
"type": "streamable-http",
"url": "http://localhost:8000/mcp/documents",
"note": "For Streamable HTTP connections, add this URL directly in your MCP Client"
}
}
}
Issues Identified
-
STDIO args parsing issue: The args array appears to be splitting the path incorrectly:
- Generated:
["D:\\coding\\bloodykheeng", "projects\\laravel-ai\\laravel", "with", "ollama\\docs-injestion\\artisan", ...] - Should be:
["D:\\coding\\bloodykheeng projects\\laravel-ai\\laravel with ollama\\docs-injestion\\artisan", "mcp:start", "documents"]
- Generated:
-
Path with spaces handling: My project path contains spaces which may be causing parsing issues
-
Inspector UI connection: When using
php artisan mcp:inspector documents(without route), the inspector UI fails to connect -
Streamable HTTP configuration: While the inspector connects with the route-based command, Claude Desktop doesn't accept the streamable-http configuration
Questions
- Does the STDIO transport properly handle Windows paths with spaces?
- Is the streamable-http transport type supported by Claude Desktop?
- Should the args array contain the full artisan path as a single element or split as shown?
- Is there a recommended configuration format for Windows + Laragon setups?
Expected Behavior
- Inspector UI should connect successfully with both command variants
- Generated STDIO configuration should work with Claude Desktop
- Proper handling of Windows paths containing spaces