-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Labels
mcp-hmrRelated to the `mcp-hmr` packageRelated to the `mcp-hmr` package
Description
When mcp-hmr hot-swaps the inner app (unmount old proxy → mount new proxy on base_app), it does not send a notifications/tools/list_changed notification per the MCP spec.
The client caches its tool list from the initial tools/list call and never re-queries it, so newly added or removed tools are invisible until a full server restart — which defeats the purpose of hot reload.
Expected
After each hot-swap, mcp-hmr should send notifications/tools/list_changed so the client refreshes its tool cache.
Reproduction
- Start a server via
mcp-hmr src.server:mcp -t stdio - Add a new
@mcp.tool()function in a new or existing module - Save the file — mcp-hmr detects the change and hot-swaps
- Call the new tool →
Tool does not exist(client still has stale cache) - Restart the server → tool now appears
Workaround
We use a wrapper script that monkey-patches ServerSession.__init__ to capture the active session reference, then monitors base_app._mounted_servers for changes and calls session.send_tool_list_changed() after each swap.
Environment
- mcp-hmr 0.0.3.3
- fastmcp 2.14.6
- MCP client: GitHub Copilot CLI (stdio transport)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
mcp-hmrRelated to the `mcp-hmr` packageRelated to the `mcp-hmr` package