Hot reload for MCP servers. Like nodemon, but for MCP.
Project description
mcpmon
Hot reload for MCP servers. Like nodemon, but for MCP.
Features
- Hot reload - Restart server on file changes
- Tool refresh - Sends
notifications/tools/list_changedso Claude Code sees new tools without session restart - Gateway mode - Aggregate multiple MCP servers behind one gateway
- Dual implementation - Python and Bun/TypeScript with full feature parity
Install
# Python
pip install mcpmon
# Bun (no install needed)
bunx mcpmon
# npm
npm install -g mcpmon
# Or download binary from GitHub releases (no dependencies)
Usage
Single Server Mode
mcpmon --watch src/ -- python -m my_mcp_server
Gateway Mode (Multi-Server)
mcpmon --config .mcpmon.yaml
# .mcpmon.yaml
servers:
sage:
command: sage-mcp
watch: ~/.sage/src/
crucible:
command: crucible-mcp
watch: ~/crucible/src/
my-server:
command: python
args: ["-m", "my_server"]
watch: ./src/
extensions: py,json
Gateway aggregates tools with prefixes: sage::recall, crucible::review, etc.
Options
| Option | Description |
|---|---|
-c, --config <file> |
Config file for multi-server gateway mode |
-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
Examples
# Basic - watch current directory for .py changes
mcpmon -- python server.py
# Watch specific directory and extensions
mcpmon --watch src/ --ext py,json -- python -m myserver
# With timestamps and log file
mcpmon --timestamps --log-file mcpmon.log -- python server.py
# Gateway mode - multiple servers
mcpmon --config .mcpmon.yaml
Sample Output
[mcpmon 16:08:50] Watching src/ for .py changes
[mcpmon 16:08:50 pid:53307] Started: python -m my_server
[mcpmon 16:08:54] File modified: tools.py
[mcpmon 16:08:54 pid:53307] Restarting...
[mcpmon 16:08:54 pid:53411] Started: python -m my_server
[mcpmon 16:08:54 pid:53411] Restart #1 complete
[mcpmon 16:08:54] Sent tools/list_changed notification
MCP Config
Single Server
{
"mcpServers": {
"my-server": {
"command": "mcpmon",
"args": ["--watch", "src/", "--", "python", "-m", "my_server"]
}
}
}
Gateway (Multiple Servers)
{
"mcpServers": {
"gateway": {
"command": "mcpmon",
"args": ["--config", ".mcpmon.yaml"]
}
}
}
How It Works
Single Server Mode
- Starts your MCP server as a subprocess
- Watches specified directory for file changes
- On change: SIGTERM → wait 2s → SIGKILL → restart
- Sends
notifications/tools/list_changednotification - Claude Code refreshes tool cache automatically
Gateway Mode
- Reads config file, starts all backend servers
- Aggregates tools from all backends (prefixed:
backend::tool) - Routes tool calls to correct backend
- Watches each backend's files independently
- Hot-reloads individual backends on change
- Hot-adds/removes backends when config changes
Development
# Python
pip install -e ".[dev]"
pytest tests/ -v # 42 tests
# Bun/TypeScript
bun test # 16 tests
License
MIT
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-1.0.1.tar.gz.
File metadata
- Download URL: mcpmon-1.0.1.tar.gz
- Upload date:
- Size: 35.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 |
04cc9a2385ad649b8131c167e3a97034b808bba8b7e071be02deac604eda3f49
|
|
| MD5 |
ae73cf9c730cf1c1e0300da4ab59f76d
|
|
| BLAKE2b-256 |
97c98d523f3616df454b3d7512e904986320cdbc802de952c8134d838584a9da
|
Provenance
The following attestation bundles were made for mcpmon-1.0.1.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-1.0.1.tar.gz -
Subject digest:
04cc9a2385ad649b8131c167e3a97034b808bba8b7e071be02deac604eda3f49 - Sigstore transparency entry: 855048500
- Sigstore integration time:
-
Permalink:
b17z/mcpmon@027f0af9222a5d6ddd95eadf5c0f4ed0e04f31af -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/b17z
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@027f0af9222a5d6ddd95eadf5c0f4ed0e04f31af -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcpmon-1.0.1-py3-none-any.whl.
File metadata
- Download URL: mcpmon-1.0.1-py3-none-any.whl
- Upload date:
- Size: 15.1 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 |
2df593e301a89ede54b1ad3c047f0cef172cd7a79320aa24f21becc5db6f2e6b
|
|
| MD5 |
dcea6ce072dfdc33bca7336bf47be213
|
|
| BLAKE2b-256 |
12c05e3f2ba8c26bb3c94eb6ecf6f937ff5e35717f0f89e1774fdc5cdbf52f06
|
Provenance
The following attestation bundles were made for mcpmon-1.0.1-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-1.0.1-py3-none-any.whl -
Subject digest:
2df593e301a89ede54b1ad3c047f0cef172cd7a79320aa24f21becc5db6f2e6b - Sigstore transparency entry: 855048501
- Sigstore integration time:
-
Permalink:
b17z/mcpmon@027f0af9222a5d6ddd95eadf5c0f4ed0e04f31af -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/b17z
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@027f0af9222a5d6ddd95eadf5c0f4ed0e04f31af -
Trigger Event:
push
-
Statement type: