A comprehensive guide for configuring Model Context Protocol (MCP) servers with Claude, with focus on Supabase MCP server setup
This guide covers common issues and solutions when setting up MCP servers for Claude integration, specifically addressing Node.js compatibility and path configuration problems.
SyntaxError: The requested module 'node:util' does not provide an export named 'parseArgs'
Cause: Node.js version < 18.17 Solution: Upgrade to Node.js ≥18.17
TypeError: args.at is not a function
Cause: Mixed Node.js versions or npm compatibility issues Solution: Use explicit Node.js binary path in MCP configuration
Error: Cannot find module '[path]/dist/index.js'
Cause: Incorrect path to MCP server executable
Solution: Use correct path to transport file (usually dist/transports/stdio.js)
{
"server-name": {
"command": "~/.nvm/versions/node/v18.20.8/bin/node",
"args": ["./packages/mcp-server-name/dist/transports/stdio.js"],
"env": {
"SUPABASE_ACCESS_TOKEN": "your_token_here"
}
}
}-
Explicit Node.js Path: Use full path to Node 18+ binary
- Avoids system default version conflicts
- Format:
~/.nvm/versions/node/v18.x.x/bin/node
-
Correct Executable Path: Point to transport file, not main index
- Usually:
./packages/server-name/dist/transports/stdio.js - Check
package.jsonbinfield for confirmation
- Usually:
-
Environment Variables: Include required tokens/keys
- Server-specific authentication credentials
- API keys or access tokens
./your-mcp-server/
├── packages/
│ ├── mcp-server-name/
│ │ ├── dist/
│ │ │ ├── transports/
│ │ │ │ └── stdio.js # <- Actual executable
│ │ │ └── index.js
│ │ ├── src/
│ │ └── package.json # Check bin field here
│ └── utils/
└── package.json
node --version # Should be ≥18.17which node
# If using nvm:
nvm which 18ls -la ./packages/mcp-server-name/dist/transports/stdio.jscat ./packages/mcp-server-name/package.json | grep -A 3 '"bin"'~/.nvm/versions/node/v18.20.8/bin/node ./packages/mcp-server-name/dist/transports/stdio.js --version# Mac/Linux - adjust path for your system
tail -f ~/Library/Logs/Claude/mcp-server-name.log- Install Node.js 18+ via nvm:
nvm install 18 - Use explicit binary path in configuration
- Avoid relying on system default Node.js
- Check
package.jsonfor correct executable path - Ensure MCP server is built:
npm run build - Use relative paths from MCP configuration location
- Ensure execute permissions:
chmod +x [node-binary] - Check file permissions on MCP server files
- Verify directory access permissions
- Use server-specific token/key names
- Ensure tokens have proper API permissions
- Test token validity outside of MCP context
- No errors in MCP server logs
- Server tools appear in Claude interface
- Test operations return expected data
- No connection timeout errors
# Check Node.js compatibility
node -e "console.log(process.version)"
# Test MCP server directly
./node-binary ./mcp-server-path --help
# Monitor logs in real-time
tail -f ~/Library/Logs/Claude/mcp-server-*.log- Use NVM: Manage multiple Node.js versions easily
- Explicit Paths: Always use full paths in MCP configuration
- Test Locally: Verify MCP server works before configuring with Claude
- Check Logs: Monitor logs during initial setup
- Version Control: Document working configurations
- Paths may need adjustment based on your system and installation method
- Some MCP servers may have additional requirements or configuration steps
- Always remove sensitive tokens before sharing configurations