Summary
Add a --watch mode to the test command that re-runs scans when the target server's tool list or configuration changes.
Files to modify
What to change
- Add a
--watch boolean flag to the test command definition.
- When
--watch is set, after the initial scan completes, use chokidar or fs.watch to monitor the target's config file or stdin input for changes.
- On change, re-run the scan and display updated results.
- Pressing
Ctrl+C should exit cleanly.
- Display "Watching for changes..." after the initial scan.
Expected behavior
mcp-observatory test --watch npx -y @modelcontextprotocol/server-memory
Keeps the scan alive and re-runs whenever the server config changes.
Estimated time
~20 minutes
Summary
Add a
--watchmode to thetestcommand that re-runs scans when the target server's tool list or configuration changes.Files to modify
src/commands/test.tsWhat to change
--watchboolean flag to the test command definition.--watchis set, after the initial scan completes, usechokidarorfs.watchto monitor the target's config file or stdin input for changes.Ctrl+Cshould exit cleanly.Expected behavior
mcp-observatory test --watch npx -y @modelcontextprotocol/server-memoryKeeps the scan alive and re-runs whenever the server config changes.
Estimated time
~20 minutes