MCP server that watches files and triggers VS Code Copilot agents on changes
npm install @snapp.co.ke/filewatchermcpThis mcp server watches for file changes and invokes an agent to deal with it. I run custom subagents and they communicate via a task list held in tasks.md. Any agent can write a task, but the PM is responsible for reading the task list and delegating the next task to the appropriate agent. This tool let's me watch for changes in the task list and automatically ask the PM to deal with it. Also, whever I add new requirements to my requirements.md file, it now triggers an agent to write new stories, which triggers the backlog-prioritiser agent, and an updated backlog invokes the PM to write new tests.
``json`
"FileWatcherMCP": {
"command": "bunx",
"args": ["--bun", "@snapp.co.ke/filewatchermcp"]
}
Watch a file and trigger VS Code chat when it changes.
Parameters:
- filename - Full path to the file to watchprompt
- - Message to send when file changesagent
- - VS Code agent to invoke (defaults to "project-manager")
Stop watching a file.
Parameters:
- filename` - Full path to the file to stop watching
List all currently watched files.
Parameters: None
There is no persistance. If the server stops it will lose all watches
This is written to work with my system which uses vscode-insiders and bun.
For this to work it has to execute a shell command on the host, so it cannot easily be run in a docker container, hence the bun implementation.
If you want nodejs support, or support for the stable vscode release, fork the repo and make your changes. We cannot test them, so we cannot merge your changes to our project.