Skip to content

MCP Inspector Connection Issues with Claude Desktop #123

@bloodykheeng

Description

@bloodykheeng

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

  1. Created a custom MCP server named "documents"
  2. Ran php artisan mcp:inspector documents
  3. Inspector UI spins up in browser successfully
  4. Attempted to connect via the inspector UI - Connection fails
  5. Copied the generated STDIO configuration to Claude Desktop's claude_desktop_config.json
  6. 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

  1. 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"]
  2. Path with spaces handling: My project path contains spaces which may be causing parsing issues

  3. Inspector UI connection: When using php artisan mcp:inspector documents (without route), the inspector UI fails to connect

  4. Streamable HTTP configuration: While the inspector connects with the route-based command, Claude Desktop doesn't accept the streamable-http configuration

Questions

  1. Does the STDIO transport properly handle Windows paths with spaces?
  2. Is the streamable-http transport type supported by Claude Desktop?
  3. Should the args array contain the full artisan path as a single element or split as shown?
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions