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
- Starts your MCP server as a subprocess
- Watches specified directory for file changes
- On change: SIGTERM → wait 2s → SIGKILL → restart
- 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) - Useswatchfilesfor 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed98f5e520c9ecb711a3751b2f8d8880757d4831724c0a48e80ab23b3218ba3f
|
|
| MD5 |
9300c976e3a062f2a1498fc4a40f9c7f
|
|
| BLAKE2b-256 |
25bc4aed61029ca6b90323a676501970202a03532d76a7aa9ab333f956c6eb2e
|
Provenance
The following attestation bundles were made for mcpmon-0.3.0.tar.gz:
Publisher:
release.yml on b17z/mcpmon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcpmon-0.3.0.tar.gz -
Subject digest:
ed98f5e520c9ecb711a3751b2f8d8880757d4831724c0a48e80ab23b3218ba3f - Sigstore transparency entry: 854776428
- Sigstore integration time:
-
Permalink:
b17z/mcpmon@de8be9eba3913c0bc4db323acf41dd120fae3b09 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/b17z
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@de8be9eba3913c0bc4db323acf41dd120fae3b09 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97a94f94136c3e8b8b9eb8e3f6de6e2d38f11992da418337afb5d94408ed8a2a
|
|
| MD5 |
812105cef71738e1d81f92839b14312c
|
|
| BLAKE2b-256 |
7daa0877eccd64a4c49c74c3acaf400339e58a767ed90698c8f73b8449383e90
|
Provenance
The following attestation bundles were made for mcpmon-0.3.0-py3-none-any.whl:
Publisher:
release.yml on b17z/mcpmon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcpmon-0.3.0-py3-none-any.whl -
Subject digest:
97a94f94136c3e8b8b9eb8e3f6de6e2d38f11992da418337afb5d94408ed8a2a - Sigstore transparency entry: 854776434
- Sigstore integration time:
-
Permalink:
b17z/mcpmon@de8be9eba3913c0bc4db323acf41dd120fae3b09 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/b17z
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@de8be9eba3913c0bc4db323acf41dd120fae3b09 -
Trigger Event:
workflow_dispatch
-
Statement type: