A Hot Module Replacement (HMR) proxy server for MCP servers that automatically restarts on file changes, buffers messages, and manages connections.
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 a transparent proxy that 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.
Key benefits:
Install globally:
npm install -g mcpmon
Use with your MCP server:
# 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
Use with MCP clients:
# 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
The setup command automatically:
After setting up hot-reload:
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:
Claude Code (~/.claude_code_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 with zero configuration. It automatically detects your server file and starts watching for changes.
To watch additional files:
# 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 loggingmcpmon 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!
Feature | Without mcpmon | With mcpmon |
---|---|---|
File changes | Manual restart required | Automatic restart |
Client connection | Must reconnect | Stays connected |
Lost messages | Possible | Never (buffered) |
Setup complexity | Manual config changes | Just add mcpmon |
Enable verbose logging to see what's happening:
MCPMON_VERBOSE=1 mcpmon node server.js
Common issues:
mcpmon setup
to auto-detect modern Node.js versions# Run tests (includes clean and build)
npm test
# Development mode
npm run dev
See Contributing Guide for more details.
Requirements: Node.js 16+ (automatically detected by setup command)
# Install globally (recommended)
npm install -g mcpmon
# Or use without installing
npx mcpmon node server.js
We welcome contributions! See Contributing Guide for details.
MIT License - see LICENSE file for details.
Like nodemon? You'll love mcpmon. Simple, fast, and reliable hot-reload for MCP development.
A collection of reference implementations for Model Context Protocol (MCP) servers in Typescript and Python, demonstrating MCP features and SDK usage.
Search for and run Yeoman generator templates programmatically.
Run code in secure sandboxes hosted by E2B
An MCP server implementation for the Unity game engine that enables a natural user experience.
Generate images using Bytedance's SeedDream 3.0 model via the Replicate platform.
An MCP server for managing authorization models with OpenFGA, an open-source authorization system.
Interact with Jupyter notebooks running in any JupyterLab environment, supporting real-time control and smart execution of notebook cells.
Execute pre-configured and secure shell commands via a Go-based MCP server.
An autonomous memory management system for Claude AI, featuring multi-provider LLM integration and a persistent memory database.
Interact with the Monad testnet, query blockchain data, and engage with the CoinflipGame smart contract.