MCP Hot-Reload

by neilopet

Not rated
GitHub

About

A Hot Module Replacement (HMR) proxy server for MCP servers that automatically restarts on file changes, buffers messages, and manages connections.

Details

Author
neilopet
Categories
Developer Tools, Automation, Infrastructure

Setup

Install MCP Hot-Reload in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/neilopet/mcp-server-hmr

Follow the installation instructions in the repository README, then restart your MCP client.

Hot-reload monitor for MCP servers - like nodemon but for Model Context Protocol

Make changes to your MCP server code and see them instantly without restarting your MCP client. Just like nodemon automatically restarts Node.js applications, mcpmon automatically restarts MCP servers.

mcpmon is atransparent proxythat sits between your MCP client (Claude Code, Claude Desktop, MCP Inspector, etc.) and your MCP server. When you modify your server code, mcpmon automatically restarts the server while keeping your client connected.

- Like nodemon, but for MCP- Simple command-line interface you already know
- Zero configuration- Just wrap your server command with mcpmon
- Non-disruptive development- Your MCP client stays connected while your server reloads
- Zero message loss- Requests are buffered during server restart
- Universal compatibility- Works with any MCP server (Node.js, Python, Deno, etc.)
- Library support- Import as a dependency for custom monitoring solutions

# Instead of: node server.js mcpmon node server.js # Instead of: python server.py mcpmon python server.py # Instead of: deno run --allow-all server.ts mcpmon deno run --allow-all server.ts
# MCP Inspector npx @modelcontextprotocol/inspector mcpmon node server.js # For existing Claude Code/Desktop servers, use setup: mcpmon setup my-server

Setup automatically configures your existing MCP servers for hot-reload! ✨

That's it! Your MCP server now has hot-reload enabled. Edit your server code and changes apply instantly.

# Node.js server mcpmon node server.js # Python server mcpmon python -m mcp_server # Python with args mcpmon python server.py --port 3000 # Deno server mcpmon deno run --allow-all server.ts # With debugging mcpmon node --inspect server.js
# Direct command npx @modelcontextprotocol/inspector mcpmon node server.js # With environment variables API_KEY=your-key npx @modelcontextprotocol/inspector mcpmon node server.js

Easiest way:Use the automatic setup command for existing servers:

# Setup hot-reload for an existing server mcpmon setup my-server # Setup all stdio servers for hot-reload mcpmon setup --all # List available servers mcpmon setup --list # Restore original config if needed mcpmon setup --restore

- ✅Backs upyour original configuration
- ✅Detectsand uses modern Node.js versions for compatibility
- ✅Wrapsyour server command with mcpmon
- ✅Preservesall environment variables and arguments
- ✅Enableshot-reload instantly
- ✅Idempotent- safe to run multiple times

- Code changes: Your server automatically restarts - no action needed!
- Schema changes(new tools/resources): Toggle the MCP server off/on in Claude Desktop settings

- Go to Claude Desktop Settings → Features → Model Context Protocol
- Toggle your server off, then back on
- No restart needed- just the toggle!

Pro tip: For the best development experience, make code changes first, then schema changes. Claude Desktop will pick up tool calls from the latest hot-reloaded code even after schema updates!

Manual configuration:You can also manually update your config:

{ "mcpServers": { "my-server": { "command": "mcpmon", "args": ["node", "server.js"], "env": { "API_KEY": "your-key" } } } }

Claude Desktop(~/Library/Application Support/Claude/claude_desktop_config.json):

{ "mcpServers": { "my-server": { "command": "/Users/username/.nvm/versions/node/v22.15.0/bin/node", "args": ["/usr/local/bin/mcpmon", "python", "server.py"], "env": { "PYTHONPATH": "/path/to/your/modules" } } } }

Note: The setup command automatically detects your latest Node.js version and mcpmon path. The above shows what the generated config looks like - you rarely need to write this manually!

mcpmon works out of the box withzero configuration. It automatically detects your server file and starts watching for changes.

# Watch multiple files MCPMON_WATCH="server.js,config.json" mcpmon node server.js

That's it! mcpmon is designed to work with zero configuration.

- MCPMON_WATCH- Override files/directories to watch (comma-separated)
- MCPMON_DELAY- Restart delay in milliseconds (default: 1000)
- MCPMON_VERBOSE- Enable verbose logging

mcpmon acts as a transparent proxy between your MCP client and server, providing automatic hot-reload capabilities:

sequenceDiagram participant Client as MCP Client participant mcpmon participant Server as MCP Server Client->>mcpmon: Request mcpmon->>Server: Request Server->>mcpmon: Response mcpmon->>Client: Response Server->>Server: File changed Note right of Server: Auto restart Client->>mcpmon: Request mcpmon->>Server: Request Server->>mcpmon: Response mcpmon->>Client: Response

The magic:Your MCP client stays connected while your server reloads. No need to reconnect Claude Code or restart MCP Inspector!

Enable verbose loggingto see what's happening:

- "ReadableStream is not defined"?mcpmon requires Node.js 16+. Usemcpmon setupto auto-detect modern Node.js versions
- Server won't start?Check the error messages for missing dependencies
- No hot reload?Verify your server file is being detected in the logs
- Schema changes not visible?Toggle your MCP server off/on in Claude Desktop settings
- Need help?See ourTroubleshooting Guide

# Run tests (includes clean and build) npm test # Development mode npm run dev

SeeContributing Guidefor more details.

Requirements:Node.js16+ (automatically detected by setup command)

# Install globally (recommended) npm install -g mcpmon # Or use without installing npx mcpmon node server.js

We welcome contributions! SeeContributing Guidefor details.

- API Documentation- Library usage and advanced features
-
Architecture Guide- How mcpmon works internally
-
Testing Guide- Test architecture and patterns
-
Troubleshooting Guide- Common issues and solutions
-
Contributing Guide- How to contribute
-
Changelog- Version history and changes

MIT License - seeLICENSEfile for details.

Like nodemon? You'll love mcpmon.Simple, fast, and reliable hot-reload for MCP development.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Paid remote MCP for CLI tool MCP, structured receipts, usage logs, and audit-ready evidence for agent and CI workflows.

A flexible MCP server that executes arbitrary command-line tools defined in a configuration file.

Clean and audit messy MCP setups: stale servers, unused tools, context-heavy MCPs, outdated packages, and safe repair plans.

An MCP Server for the GitHub Actions API, enabling AI assistants to manage and operate GitHub Actions workflows.

Read-first Jenkins MCP server in Go for agent-driven build debugging. 20 tools including compare_builds, flaky-test detection, JUnit/Ginkgo failure parsing, and disk-cached console logs with on-disk path handoff. Write tools (trigger/stop/cancel) gated by JENKINS_MCP_READONLY env var.

A Python implementation of a Model Context Protocol server for interacting with Kestra.

Execute make targets from any Makefile in a safe and controlled environment.

Exposes Makefile targets as callable tools for AI assistants.

A Python-based server to install and configure other MCP servers from PyPI, npm, or local directories.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.