This guide provides comprehensive instructions for testing Reloaderoo using the included test MCP servers and various testing scenarios.
- Prerequisites
- Test MCP Servers
- CLI Mode Testing
- Server Mode Testing
- Advanced Testing Scenarios
- Performance Testing
- Troubleshooting
-
Build the project:
npm run build
-
Verify installation:
node dist/bin/reloaderoo.js --version
The repository includes several test MCP servers for different testing scenarios:
- Description: Uses official
@modelcontextprotocol/sdk - Tools:
echo,add,greet, plus dynamically generated tools - Features: Proper error handling, random tool generation, lifecycle logging
- Best for: Comprehensive testing, CLI inspection, server restart testing
- Description: Simple server with minimal tools
- Tools:
discover_tools,echo - Features: Basic functionality, error simulation
- Best for: Quick testing, basic functionality verification
test-debug-client.js: Tests debug mode with tool inspectiontest-debug-resources.js: Tests resource and prompt inspection
# Using SDK server (recommended)
node dist/bin/reloaderoo.js inspect list-tools -- node test-server-sdk.js
# Using basic server
node dist/bin/reloaderoo.js inspect list-tools -- node test-server.jsExpected Output:
- JSON structure with
success: true - Array of tools with
name,description, andinputSchema - Metadata including timestamp and duration
node dist/bin/reloaderoo.js inspect server-info -- node test-server-sdk.jsExpected Output:
- Protocol version information
- Server capabilities
- Basic server metadata
node dist/bin/reloaderoo.js inspect ping -- node test-server-sdk.jsExpected Output:
alive: trueif server is responsive- Timestamp of the ping
# Echo tool test
node dist/bin/reloaderoo.js inspect call-tool echo \
--params "{\"message\": \"Hello from CLI!\"}" \
-- node test-server-sdk.js
# Add tool test (mathematical operation)
node dist/bin/reloaderoo.js inspect call-tool add \
--params "{\"a\": 15, \"b\": 27}" \
-- node test-server-sdk.js
# Greeting tool test
node dist/bin/reloaderoo.js inspect call-tool greet \
--params "{\"name\": \"Alice\"}" \
-- node test-server-sdk.jsThe SDK server generates random tools that change each restart:
# First, list tools to see what's available
node dist/bin/reloaderoo.js inspect list-tools -- node test-server-sdk.js
# Then call a dynamic tool (replace 'dice_XXXX' with actual name)
node dist/bin/reloaderoo.js inspect call-tool dice_1234 \
--params "{\"sides\": 20}" \
-- node test-server-sdk.jsnode dist/bin/reloaderoo.js inspect call-tool nonexistent_tool \
-- node test-server-sdk.jsExpected: Error response with clear message about unknown tool.
node dist/bin/reloaderoo.js inspect call-tool add \
--params "{\"a\": \"not_a_number\", \"b\": 5}" \
-- node test-server-sdk.jsExpected: Error response about invalid parameter types.
node dist/bin/reloaderoo.js inspect call-tool echo \
-- node test-server-sdk.jsExpected: Error response about missing required parameters.
For scripting and automation, use --raw flag:
node dist/bin/reloaderoo.js inspect list-tools --raw \
-- node test-server-sdk.jsExpected: Direct JSON output without metadata wrapper.
# Start server (will run until terminated)
node dist/bin/reloaderoo.js proxy -- node test-server-sdk.js
# Or using backward compatibility
node dist/bin/reloaderoo.js -- node test-server-sdk.jsExpected Output:
- Server startup messages
- Child process connection confirmation
- Server runs indefinitely until SIGTERM/SIGINT
# In one terminal - start proxy
node dist/bin/reloaderoo.js proxy -- node test-server-sdk.js
# In another terminal - test with debug client
node test-debug-client.jsnode dist/bin/reloaderoo.js proxy --debug-mode -- node test-server-sdk.jsExpected:
- Server starts in debug/inspection mode
- Exposes 8 debug tools for MCP inspection
- Can be connected to via MCP clients
# Test basic debug functionality
node test-debug-client.js
# Test resources and prompts inspection
node test-debug-resources.jsStart server and test restart functionality:
# Start proxy
node dist/bin/reloaderoo.js proxy -- node test-server-sdk.js
# From another terminal, connect with MCP client and call restart_server tool
# (This requires an MCP client that can call the restart_server tool)Test automatic restart on child process crashes:
# Start proxy with verbose logging
node dist/bin/reloaderoo.js proxy --log-level debug -- node test-server-sdk.js
# Kill child process to test auto-restart
# pkill -f test-server-sdk.jsExpected:
- Child process detected as crashed
- Automatic restart initiated
- New child process spawned
- Connection re-established
# Test with environment configuration
MCPDEV_PROXY_LOG_LEVEL=debug \
MCPDEV_PROXY_MAX_RESTARTS=5 \
node dist/bin/reloaderoo.js proxy -- node test-server-sdk.js# Test with various CLI options
node dist/bin/reloaderoo.js proxy \
--log-level debug \
--max-restarts 2 \
--restart-delay 2000 \
--working-dir /tmp \
-- node test-server-sdk.js# Test configuration validation
node dist/bin/reloaderoo.js proxy --dry-run \
--log-level debug \
--max-restarts 3 \
-- node test-server-sdk.jsnode dist/bin/reloaderoo.js inspect list-tools -- python my_server.py# Test with different servers
node dist/bin/reloaderoo.js inspect list-tools -- node test-server.js
node dist/bin/reloaderoo.js inspect list-tools -- node test-server-sdk.jsReloaderoo is designed to work with MCP servers that don't implement all protocol methods. When testing with servers that have incomplete implementations:
- Missing
tools/list: Returns empty tools array, logs warning - Missing
resources/list: Returns empty resources array - Missing
prompts/list: Returns empty prompts array - Server continues functioning: Proxy mode works even with missing methods
# These should all return empty arrays instead of errors
node dist/bin/reloaderoo.js inspect list-tools -- node incomplete-server.js
node dist/bin/reloaderoo.js inspect list-resources -- node incomplete-server.js
node dist/bin/reloaderoo.js inspect list-prompts -- node incomplete-server.js
# Proxy mode should still start successfully
node dist/bin/reloaderoo.js proxy -- node incomplete-server.js# Example with XcodeBuildMCP server (incomplete implementation)
node dist/bin/reloaderoo.js inspect list-tools --working-dir /path/to/server -- node server.js
node dist/bin/reloaderoo.js proxy --working-dir /path/to/server -- node server.jsChild server does not support tools/list - continuing with empty tool listChild does not support resourcesChild does not support prompts
# Test with large message parameter
node dist/bin/reloaderoo.js inspect call-tool echo \
--params "{\"message\": \"$(printf 'A%.0s' {1..1000})\"}" \
-- node test-server-sdk.js# Test with special characters
node dist/bin/reloaderoo.js inspect call-tool echo \
--params "{\"message\": \"Hello 世界! 🌍 Special: \\\"quotes\\\" and \\\\backslashes\\\\\"}" \
-- node test-server-sdk.js# Test with short timeout
node dist/bin/reloaderoo.js inspect ping --timeout 1000 \
-- node test-server-sdk.js# Measure CLI command performance
time node dist/bin/reloaderoo.js inspect list-tools -- node test-server-sdk.js
time node dist/bin/reloaderoo.js inspect ping -- node test-server-sdk.js# Test multiple rapid calls
for i in {1..5}; do
echo "Call $i:"
node dist/bin/reloaderoo.js inspect ping -- node test-server-sdk.js | jq '.data.timestamp'
sleep 1
done# Test multiple concurrent CLI operations
node dist/bin/reloaderoo.js inspect ping -- node test-server-sdk.js &
node dist/bin/reloaderoo.js inspect list-tools -- node test-server-sdk.js &
node dist/bin/reloaderoo.js inspect server-info -- node test-server-sdk.js &
waitnpm run inspector- Open browser to
http://127.0.0.1:6274 - Configure connection:
- Command:
node - Arguments:
dist/bin/reloaderoo.js --debug-mode -- node test-server-sdk.js
- Command:
- Click "Connect"
- Test debug tools through the web interface
- List tools from child server
- Call tools with parameters
- Test restart functionality
- Monitor server logs
# Clean and rebuild
npm run clean
npm run build# Make sure scripts are executable
chmod +x test-server-sdk.js test-server.js# Kill existing processes
pkill -f reloaderoo
pkill -f test-server- Ensure proper escaping of quotes in
--params - Use single quotes around JSON strings
- Test JSON validity:
echo '{"test": "value"}' | jq .
node dist/bin/reloaderoo.js inspect list-tools \
--log-level debug \
-- node test-server-sdk.js# View running processes
ps aux | grep -E "(reloaderoo|test-server)"
# Check system resources
top -p $(pgrep -f reloaderoo)node dist/bin/reloaderoo.js --help
node dist/bin/reloaderoo.js inspect --help
node dist/bin/reloaderoo.js inspect call-tool --helpnode dist/bin/reloaderoo.js info --verbose- ✅ All commands return
"success": true - ✅ Response times under 2 seconds
- ✅ Proper JSON structure in output
- ✅ Error responses include clear messages
- ✅ Child server connects successfully
- ✅ Proxy forwards requests correctly
- ✅ Restart functionality works
- ✅ Debug tools are accessible
- ✅ MCP Inspector can connect
- ✅ All debug tools work through inspector
- ✅ Backward compatibility maintained
- ✅ No memory leaks during extended use
For ongoing development, create automated test scripts:
#!/bin/bash
# test-suite.sh
echo "Running Reloaderoo Test Suite..."
# Test CLI commands
echo "1. Testing CLI commands..."
node dist/bin/reloaderoo.js inspect ping -- node test-server-sdk.js
node dist/bin/reloaderoo.js inspect list-tools -- node test-server-sdk.js
# Test server mode (short duration)
echo "2. Testing server mode..."
timeout 5s node dist/bin/reloaderoo.js proxy -- node test-server-sdk.js
echo "Test suite completed!"Run with:
chmod +x test-suite.sh
./test-suite.shThis comprehensive testing guide ensures all aspects of Reloaderoo functionality are properly validated across different usage scenarios and configurations.