This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Reloaderoo is a dual-purpose MCP (Model Context Protocol) tool that serves as both:
- MCP Server (Proxy Mode) - A transparent development proxy for hot-reloading MCP servers
- MCP Client/CLI Tool (Inspection Mode) - A debugging interface for inspecting MCP servers
Primary Purpose: Hot-reloading MCP server development with transparent forwarding
MCP Client ↔ Reloaderoo Proxy (MCP Server) ↔ Child MCP Server
(e.g., Claude) (transparent proxy + restart_server tool) (your-server)
- IS an MCP Server - Reloaderoo itself acts as an MCP server
- Transparent Forwarding - All MCP messages pass through seamlessly
- Capability Augmentation - Adds
restart_servertool to child server's capabilities - Session Persistence - Client connection remains active during server restarts
- Default Mode - Runs when using
reloaderooorreloaderoo proxy
MCPProxy- Main proxy implementationProcessManager- Child server lifecycle managementMessageRouter- JSON-RPC message forwardingCapabilityAugmenter- ModifiesInitializeResultto add proxy capabilitiesRestartHandler- Implements therestart_servertool
- Client sends MCP request → Reloaderoo Proxy
- If
restart_servertool call: Handle internally, restart child, notify client - All other requests: Forward to child server → return response to client
- Initialize handshake: Intercept and add
restart_serverto capabilities - Notifications: Send
tools/list_changedafter restarts
# Basic proxy usage (default mode)
reloaderoo -- node /path/to/my-mcp-server.js
# Explicit proxy mode with options
reloaderoo proxy --log-level debug --max-restarts 5 -- node server.js{
"mcpServers": {
"myDevelopmentServer": {
"command": "node",
"args": [
"/path/to/reloaderoo/dist/bin/reloaderoo.js",
"proxy",
"--log-level", "debug",
"--",
"node",
"/path/to/my-server.js"
]
}
}
}Primary Purpose: MCP server debugging and development testing
Inspection mode serves two different use cases:
For AI agents that DON'T need direct MCP access - Acts as an MCP client via CLI
# AI agents can use these commands directly without MCP configuration
reloaderoo inspect list-tools -- node my-server.js
reloaderoo inspect call-tool echo --params '{"message":"test"}' -- node my-server.js
reloaderoo inspect server-info -- node my-server.jsBenefits for AI Agents:
- ✅ No MCP server configuration required in AI session
- ✅ Direct CLI access to any MCP server for testing
- ✅ Perfect for development debugging workflows
- ✅ JSON formatted responses for easy parsing
For MCP clients that need protocol access - Reloaderoo as inspection MCP server
# Start inspection MCP server
reloaderoo inspect mcp -- node /path/to/my-server.jsAI Agent ↔ CLI Commands ↔ Reloaderoo Inspector ↔ Child MCP Server
(direct CLI calls) (acts as MCP client) (your-server)
MCP Client ↔ Reloaderoo Inspector (MCP Server) ↔ Child MCP Server
(e.g., Claude) (8 debug tools only) (not directly exposed)
- CLI-First Design - Primarily designed for command-line debugging
- MCP Client Functionality - Reloaderoo acts as a client to your MCP server
- Debug Tools Only - Exposes 8 inspection tools, child server tools accessed via
call_tool - Development Focus - Specifically for MCP server development and debugging
-
list_tools- List all available tools from child serverreloaderoo inspect list-tools -- node server.js
-
call_tool- Call any tool on the child serverreloaderoo inspect call-tool <tool-name> --params '{"param":"value"}' -- node server.js
-
list_resources- List all available resources from child serverreloaderoo inspect list-resources -- node server.js
-
read_resource- Read a specific resource from child serverreloaderoo inspect read-resource <resource-uri> -- node server.js
-
list_prompts- List all available prompts from child serverreloaderoo inspect list-prompts -- node server.js
-
get_prompt- Get a specific prompt from child serverreloaderoo inspect get-prompt <prompt-name> -- node server.js
-
get_server_info- Get comprehensive server information and capabilitiesreloaderoo inspect server-info -- node server.js
-
ping- Test connectivity and health of child serverreloaderoo inspect ping -- node server.js
DebugProxy- MCP server that exposes inspection toolsSimpleClient- Lightweight MCP client for connecting to child serversOutputFormatter- Formats CLI responses with metadata and error handling
{
"success": true,
"data": {
// Tool/resource/prompt data
},
"metadata": {
"command": "list-tools",
"timestamp": "2025-07-25T12:00:00.000Z",
"duration": 1200
}
}Current Stack:
- Language: Node.js (published to npm as
reloaderoo) - Protocol: Model Context Protocol v2024-11-05 over stdio
- Transport: JSON-RPC over stdio
- Platform: Primary macOS support, POSIX-compatible for Linux
All modes support the same environment variables:
# Logging Configuration
MCPDEV_PROXY_LOG_LEVEL=debug # Log level (debug, info, notice, warning, error, critical)
MCPDEV_PROXY_LOG_FILE=/path/to/log # Custom log file path (default: stderr)
MCPDEV_PROXY_DEBUG_MODE=true # Enable debug mode (true/false)
# Process Management
MCPDEV_PROXY_RESTART_LIMIT=5 # Maximum restart attempts (0-10, default: 3)
MCPDEV_PROXY_AUTO_RESTART=true # Enable/disable auto-restart (true/false)
MCPDEV_PROXY_TIMEOUT=30000 # Operation timeout in milliseconds
MCPDEV_PROXY_RESTART_DELAY=1000 # Delay between restart attempts in milliseconds
# Child Process Configuration
MCPDEV_PROXY_CHILD_CMD=node # Default child command
MCPDEV_PROXY_CHILD_ARGS="server.js" # Default child arguments (space-separated)
MCPDEV_PROXY_CWD=/path/to/directory # Default working directory- Make changes to source code
- Build:
npm run build - Lint:
npm run lint - Test:
npm test - Test CLI:
reloaderoo inspect list-tools -- node test-server-sdk.js - Test MCP:
reloaderoo inspect mcp -- node test-server-sdk.js - Test Proxy: Configure MCP client to use proxy mode
After completing each implementation task:
- Build:
npm run build- Verify TypeScript compilation - Lint:
npm run lint- Check code quality and type safety - Test:
npm test- Run full test suite - Manual Test: Test relevant CLI commands
- Commit: Create descriptive git commit
- Update Plan: Mark task as completed in IMPLEMENTATION_PLAN.md
For bug fixes and new features, follow the standardized release process:
📖 See @docs/RELEASE_PROCESS.md for complete workflow details
Key requirements:
- ✅ Always create feature branches - Never work directly on
main - ✅ Request push permission - Always ask before pushing to remote
- ✅ Logical commits - Include root cause, solution, testing, and impact
- ✅ Comprehensive PR descriptions - Use provided template with full context
- ✅ Add automated review - Comment
cursor reviewfor additional bug detection
Quick workflow summary:
git checkout -b fix/your-feature-name(create branch)- Make changes and commit with detailed message
- Ask permission: "May I push the commit to create a PR?"
git push origin fix/your-feature-name(after permission granted)gh pr createwith comprehensive descriptiongh pr comment [PR#] --body "cursor review"(trigger automated review)
- ✅ Hot-reloading development - When you want to develop MCP servers without client restarts
- ✅ Production-like testing - When you need full MCP protocol compatibility
- ✅ Client integration - When your AI client needs direct MCP server access
- ✅ MCP server debugging - When you need to test MCP servers during development
- ✅ AI agent debugging - When AI agents need to inspect MCP servers without MCP config
- ✅ Development workflow - When you need quick CLI access to MCP functionality
- ✅ Protocol testing - When you need to validate MCP server implementations
- ✅ Protocol debugging - When you need MCP client access to debug tools
- ✅ Interactive inspection - When you want to expose debug tools through MCP protocol
- ✅ Development tooling - When building MCP-based development tools