From ad0f6524f6592567a8e410ff4cf8177f9be72315 Mon Sep 17 00:00:00 2001 From: Herdiyan Adam Putra Date: Sat, 25 Jul 2026 00:31:09 +0700 Subject: [PATCH] fix(@angular/cli): declare devserver_start and devserver_stop as isReadOnly:false Both tools are declared isReadOnly:true, so they remain registered and callable when the MCP server is started with --read-only, and MCP host clients that use readOnlyHint to auto-approve tool calls without asking the user will call them without confirmation. devserver_start spawns a background ng serve child process and binds a network port. devserver_stop sends SIGTERM to that process. Neither is a read-only operation. devserver_wait_for_build only polls status and logs of an already-running server, so it correctly stays isReadOnly:true. run_target.ts already declares isReadOnly:false for the same reason, so this aligns the two devserver lifecycle tools with the existing pattern. --- .../cli/src/commands/mcp/tools/devserver/devserver-start.ts | 2 +- .../cli/src/commands/mcp/tools/devserver/devserver-stop.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular/cli/src/commands/mcp/tools/devserver/devserver-start.ts b/packages/angular/cli/src/commands/mcp/tools/devserver/devserver-start.ts index 4e2155f500b7..72bf5440adcb 100644 --- a/packages/angular/cli/src/commands/mcp/tools/devserver/devserver-start.ts +++ b/packages/angular/cli/src/commands/mcp/tools/devserver/devserver-start.ts @@ -119,7 +119,7 @@ the first build completes. * **Consistent Ports**: If making multiple calls, it is recommended to reuse the port you got from the first call for subsequent ones. `, - isReadOnly: true, + isReadOnly: false, isLocalOnly: true, inputSchema: devserverStartToolInputSchema.shape, outputSchema: devserverStartToolOutputSchema.shape, diff --git a/packages/angular/cli/src/commands/mcp/tools/devserver/devserver-stop.ts b/packages/angular/cli/src/commands/mcp/tools/devserver/devserver-stop.ts index 669160695194..32b7d90269d2 100644 --- a/packages/angular/cli/src/commands/mcp/tools/devserver/devserver-stop.ts +++ b/packages/angular/cli/src/commands/mcp/tools/devserver/devserver-stop.ts @@ -69,7 +69,7 @@ Stops a running Angular development server ("ng serve") that was started with th time after this is called. However note that this is not a blocker for starting a new devserver. `, - isReadOnly: true, + isReadOnly: false, isLocalOnly: true, inputSchema: devserverStopToolInputSchema.shape, outputSchema: devserverStopToolOutputSchema.shape,