Testing a Laravel MCP Server Using Herd and Claude Desktop

I recently added an MCP server to ContributorIQ, using Laravel's native MCP server integration. Creating the MCP server with Claude Code was trivial, however testing it with the MCP Inspector and Claude Desktop was not because of an SSL issue related to Laravel Herd. If you arrived at this page I suppose it is because you already know what all of these terms mean and so I'm not going to waste your time by explaining.

The issue you're probably facing is because MCP clients are looking for a valid SSL certificate if https is used to define the MCP server endpoint. The fix involves setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to 0.

If you want to test your MCP server using the official MCP Inspector, you can set this environment variable right before running the inspector, like so:

$ NODE_TLS_REJECT_UNAUTHORIZED=0 npx @modelcontextprotocol/inspector

If you'd like to test the MCP server inside Claude Desktop (which is what your end users will probably do), then you'll need to set this environment variable inside claude_desktop_config.json. I also faced Node version issues but suspect that's due to an annoying local environment issue, but I'll include that code in the snippet just in case it's helpful:

{
  "mcpServers": {
    "contributoriq": {
      "command": "/Users/wjgilmore/.nvm/versions/node/v22.17.1/bin/npx",
      "args": [
        "mcp-remote",
        "https://contributoriq.test/mcp",
        "--header",
        "Authorization: Bearer YOUR-BEARER-TOKEN"
      ],
      "env": {
        "NODE_TLS_REJECT_UNAUTHORIZED": "0",
        "PATH": "/Users/wjgilmore/.nvm/versions/node/v22.17.1/bin:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin"
      }
    }
  },
  "isUsingBuiltInNodeForMcp": false,
  "preferences": {
    "coworkScheduledTasksEnabled": false,
    "sidebarMode": "chat"
  }
}

Hope this helps.