Local MCP Server Development with Hot Module Reload (HMR)
Set up a local development loop for MCP servers with live reloading and browser-based inspector
About this automation
Use mcp-use SDK with npm run dev to spawn a local inspector on localhost. The inspector provides a BYOK chat interface, one-by-one tool testing, and server metadata validation. HMR is implemented via MCP protocol primitives (tools/list_changed notifications) so tool changes reload without hard-refreshing the session. UI changes propagate via Vite HMR to the embedded chat.
How to implement
Initialize an mcp-use project and define your MCP server tools
Run npm run dev to start the server and inspector
Open the inspector URL in your browser (localhost)
Edit tool definitions or UI in your code
Watch the inspector chat update live via HMR without session interruption
Test tool invocation order and agent understanding in the embedded chat
Optionally launch Claude Code with --chrome enabled pointing to the inspector URL for closed-loop agent testing