refactor(@angular/cli): integrate MCP roots into Host abstraction#33090
Conversation
960270e to
08b674d
Compare
There was a problem hiding this comment.
Code Review
This pull request implements path restriction for the MCP host by introducing a createRootRestrictedHost wrapper and updating the Host interface with a setRoots method. The MCP server now dynamically manages these roots based on client capabilities and notifications. Review feedback suggests enhancing the security of the path validation logic to prevent bypasses via glob patterns or command paths and recommends refactoring the server initialization to use an async handler instead of an IIFE.
e11994e to
6ff5f8b
Compare
Update the `Host` abstraction to be aware of allowed roots provided by the MCP client. A new `createRootRestrictedHost` wrapper enforces that file operations and command executions stay within these roots. The server is updated to initialize roots on connection and listen for changes.
6ff5f8b to
d4cdb0c
Compare
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Update the
Hostabstraction to be aware of allowed roots provided by the MCP client. A newcreateRootRestrictedHostwrapper enforces that file operations and command executions stay within these roots. The server is updated to initialize roots on connection and listen for changes.