Skip to main content

Hot reload for MCP servers. Like nodemon, but for MCP.

Project description

mcpmon

Hot reload for MCP servers. Like nodemon, but for MCP.

Install

# Bun (recommended)
bunx mcpmon

# Or install globally
bun install -g mcpmon

# Python alternative
pip install mcpmon

# Or download binary from GitHub releases (no dependencies)

Usage

mcpmon --watch src/ -- python -m my_mcp_server

Options

Option Description
-w, --watch <dir> Directory to watch (default: .)
-e, --ext <exts> Extensions to watch, comma-separated (default: py)
-q, --quiet Only show errors
-v, --verbose Show file change details
--debug Show all debug output
-t, --timestamps Include timestamps in output
-l, --log-file <file> Also write logs to file

Logging Levels

--quiet       Only errors
(default)     Start, stop, restart events + PID
--verbose     + file change details
--debug       + everything (ignored files, spawning, exit codes)

Examples

# Basic usage - watch current directory for .py changes
mcpmon -- python server.py

# Watch src/ for .py and .json changes
mcpmon --watch src/ --ext py,json -- python -m myserver

# With timestamps and verbose output
mcpmon --timestamps --verbose -- python server.py

# Log to file for debugging
mcpmon --debug --log-file mcpmon.log -- python server.py

# With crucible-mcp
mcpmon --watch src/crucible/ -- crucible-mcp

# With sage-mcp
mcpmon --watch sage/ --ext py -- python -m sage.mcp_server

Sample Output

[mcpmon 16:08:50] Watching sage for .py changes
[mcpmon 16:08:50 pid:53307] Started: python -m sage.mcp_server
[mcpmon 16:08:54 pid:53307] Restarting...
[mcpmon 16:08:54 pid:53411] Started: python -m sage.mcp_server
[mcpmon 16:08:54 pid:53411] Restart #1 complete
[mcpmon 16:08:57] Received SIGTERM, shutting down...
[mcpmon 16:08:57] Shutdown complete (restarts: 1)

MCP Config

Use mcpmon in your .mcp.json for hot reload during development:

{
  "mcpServers": {
    "my-server": {
      "command": "mcpmon",
      "args": ["--watch", "src/", "--", "python", "-m", "my_server"]
    }
  }
}

How it works

  1. Starts your MCP server as a subprocess
  2. Watches specified directory for file changes
  3. On change: SIGTERM → wait 2s → SIGKILL → restart
  4. Claude Code automatically reconnects to the restarted server

Dual Implementation

mcpmon ships as both:

  • Bun/TypeScript (mcpmon.ts) - Zero dependencies, fast startup
  • Python (mcpmon.py) - Uses watchfiles for robust file watching

Both implementations have feature parity.

Development

# Install dev dependencies (Python)
pip install -e ".[dev]"

# Run Python tests (27 tests)
pytest tests/ -v

# Run Bun/TS tests (12 tests)
bun test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcpmon-0.3.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcpmon-0.3.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file mcpmon-0.3.0.tar.gz.

File metadata

  • Download URL: mcpmon-0.3.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcpmon-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ed98f5e520c9ecb711a3751b2f8d8880757d4831724c0a48e80ab23b3218ba3f
MD5 9300c976e3a062f2a1498fc4a40f9c7f
BLAKE2b-256 25bc4aed61029ca6b90323a676501970202a03532d76a7aa9ab333f956c6eb2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcpmon-0.3.0.tar.gz:

Publisher: release.yml on b17z/mcpmon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcpmon-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: mcpmon-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcpmon-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97a94f94136c3e8b8b9eb8e3f6de6e2d38f11992da418337afb5d94408ed8a2a
MD5 812105cef71738e1d81f92839b14312c
BLAKE2b-256 7daa0877eccd64a4c49c74c3acaf400339e58a767ed90698c8f73b8449383e90

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcpmon-0.3.0-py3-none-any.whl:

Publisher: release.yml on b17z/mcpmon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page