Referenced in comparison with other development tools, noting Bun's --hot functionality for state preservation but lack of MCP integration.
Supports wrapping Node.js MCP servers with hot-reload capabilities, allowing dynamic reloading of JavaScript tools and handling complex arguments.
Mentioned as a comparison tool, highlighting MCP Reloader's advantages in state preservation and native MCP integration compared to nodemon's full restart approach.
Enables wrapping Python LSP/MCP servers with hot-reload functionality, automatically detecting file changes and restarting the server when necessary.
Referenced in comparison with other development tools, mentioning tsx watch for TypeScript-only development but noting its limitations for MCP integration.
MCP Reloader
A hot-reload development tool for building MCP (Model Context Protocol) servers with Claude Code. This tool enables Claude Code to dynamically reload MCP tools as they are modified, making it perfect for iterative development where Claude Code can write and test MCP tools in real-time.
Overview
MCP Reloader is specifically designed for developers using Claude Code to build MCP tools. It solves the common development pain point where MCP clients need to be restarted whenever server tools are modified. By implementing file watching and the tools/list_changed
notification, Claude Code can modify tools and immediately test them without manual restarts.
Key Features for Claude Code Development
- Real-time Tool Development: Claude Code can write, modify, and test MCP tools without restarts
- Dynamic Tool Loading: Automatically loads JavaScript tools from
tools/
directory - Instant Feedback Loop: Changes are reflected immediately in the MCP client
- File Watching: Uses chokidar to detect file changes in real-time
- Process Wrapping: Wrap any LSP/MCP process with hot-reload capabilities
- Auto-restart on Config Changes: Watch configuration files and restart when needed
Quick Start with Claude Code
1. Create a new MCP project
2. Configure Claude Desktop
Add to your claude_desktop_config.json
:
3. Ask Claude Code to create tools
Now Claude Code can create and modify tools in the tools/
directory, and they will be automatically available without restarting Claude Desktop!
Example: Claude Code Creating Tools
Here's how Claude Code can create a tool that will be immediately available:
Claude Code can create this file, and it will be immediately available to use!
Installation
Usage
Basic Server Start
Using Include Patterns
Watch additional files and restart the process when they change:
Wrapping Custom LSP Servers
Wrap any LSP server with hot-reload capabilities:
Example: Wrapping Existing MCP Server
Here's how to add hot-reload to any MCP server. This example wraps a simple echo server:
When config.json
changes, the entire echo server restarts automatically.
Command Line Arguments
--include patterns
Specify glob patterns for files to watch. When matched files change, the entire process restarts.
-- separator
Everything after --
is treated as the command and its arguments. This makes it easy to pass complex arguments without escaping.
How It Works
Two-Level Reload Strategy
- Tool Files (
tools/*.js
): Hot-reloaded without process restart- File changes are detected by chokidar
- Tools are dynamically imported with cache busting
tools/list_changed
notification sent to clients- MCP clients can immediately use updated tools
- Include Pattern Files: Full process restart
- Wrapper process monitors specified glob patterns
- On change, the entire server process is restarted
- Useful for configuration files or core dependencies
Architecture
Expected Behavior
Initial Startup
- Server loads all tools from
tools/
- Initial tools are immediately available
- Client receives the tool list
Adding a Tool
- Create new file (e.g.,
tools/hello.js
) - Server detects the new file
- Tool is automatically loaded
tools/list_changed
notification sent- Tool immediately available in client
Modifying a Tool
- Edit existing file (e.g.,
tools/echo.js
) - Server detects the change
- Tool is reloaded with new implementation
tools/list_changed
notification sent- Updated behavior immediately available
Deleting a Tool
- Remove file (e.g.,
tools/time.js
) - Server detects the deletion
- Tool is removed from available tools
tools/list_changed
notification sent- Tool no longer callable
Include Pattern Changes
- Modify watched file (e.g.,
config.json
) - Wrapper detects the change
- Entire server process restarts
- All tools are reloaded with new configuration
Local Development
For developing mcp-reloader itself:
Comparison with Similar Tools
Tool | Use Case | State Preservation | MCP Integration |
---|---|---|---|
mcp-reloader | MCP/LSP servers | Two-level strategy | Native support |
nodemon | General purpose | No (full restart) | Manual setup |
tsx watch | TypeScript only | No (full restart) | No |
Bun --hot | Bun runtime | Yes | No |
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Acknowledgments
This project implements the Model Context Protocol specification for tool hot-reloading, specifically designed to enhance the Claude Code development experience.
This server cannot be installed
A hot-reload development tool that enables real-time development of MCP (Model Context Protocol) servers by automatically reloading tools as they're modified without requiring manual restarts.
Related MCP Servers
- -securityAlicense-qualityA server implementation of the Model Context Protocol (MCP) for managing development workflow with features like project management, task tracking, and QA review support.Last updated -JavaScriptAGPL 3.0
MCP-YNU FastMCP Serverofficial
-securityAlicense-qualityA dynamic MCP server implementation that automatically loads tools, resources, and prompts from their respective directories, allowing for easy extension and configuration.Last updated -PythonMIT License- -securityFlicense-qualityAn MCP server that allows users to create custom tools on the fly by stitching together actions from multiple MCP tools into reusable routines.Last updated -1451TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that provides daily-refreshed documentation for 9000+ libraries directly in AI code editors, helping developers avoid outdated references and hallucinations.Last updated -120654JavaScriptMIT License