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 was not straightforward when using MCP Inspector and Claude Desktop because of an SSL issue related to Laravel Herd. If you're seeing similar issues then hopefully this will help.
For security reasons MCP clients want a valid SSL certificate if an MCP server endpoint is using the https protocol. 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.