Labsco
neilopet logo

MCP Hot-Reload

โ˜… 10

from neilopet

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

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys

mcpmon

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.

What it is

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:

  • 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

How It Works

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!

FeatureWithout mcpmonWith mcpmon
File changesManual restart requiredAutomatic restart
Client connectionMust reconnectStays connected
Lost messagesPossibleNever (buffered)
Setup complexityManual config changesJust add mcpmon

Need Help?

Enable verbose logging to see what's happening:

MCPMON_VERBOSE=1 mcpmon node server.js

Common issues:

  • "ReadableStream is not defined"? mcpmon requires Node.js 16+. Use mcpmon setup to 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 our Troubleshooting Guide

Development

# Run tests (includes clean and build)
npm test

# Development mode
npm run dev

See Contributing Guide for more details.

Documentation