From f9ceaf7a28ec19f24cb8dc588a06395b669568a5 Mon Sep 17 00:00:00 2001 From: Alessio Pelliccione Date: Thu, 20 Nov 2025 15:52:51 +0100 Subject: [PATCH] fix(@schematics/angular): add MCP configuration file to new workspaces Changes: - Add .vscode/mcp.json template with angular-cli MCP server configuration - Update .gitignore template to whitelist .vscode/mcp.json - Update workspace schematic tests to expect mcp.json file Closes #31888 --- .../angular/workspace/files/__dot__gitignore.template | 1 + .../workspace/files/__dot__vscode/mcp.json.template | 9 +++++++++ packages/schematics/angular/workspace/index_spec.ts | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 packages/schematics/angular/workspace/files/__dot__vscode/mcp.json.template diff --git a/packages/schematics/angular/workspace/files/__dot__gitignore.template b/packages/schematics/angular/workspace/files/__dot__gitignore.template index b1d225e26e57..854acd5fc039 100644 --- a/packages/schematics/angular/workspace/files/__dot__gitignore.template +++ b/packages/schematics/angular/workspace/files/__dot__gitignore.template @@ -26,6 +26,7 @@ yarn-error.log !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json +!.vscode/mcp.json .history/* # Miscellaneous diff --git a/packages/schematics/angular/workspace/files/__dot__vscode/mcp.json.template b/packages/schematics/angular/workspace/files/__dot__vscode/mcp.json.template new file mode 100644 index 000000000000..bf4004da9477 --- /dev/null +++ b/packages/schematics/angular/workspace/files/__dot__vscode/mcp.json.template @@ -0,0 +1,9 @@ +{ + // For more information, visit: https://angular.dev/ai/mcp + "mcpServers": { + "angular-cli": { + "command": "npx", + "args": ["-y", "@angular/cli", "mcp"] + } + } +} diff --git a/packages/schematics/angular/workspace/index_spec.ts b/packages/schematics/angular/workspace/index_spec.ts index 22be6e797e14..65dd7987aa41 100644 --- a/packages/schematics/angular/workspace/index_spec.ts +++ b/packages/schematics/angular/workspace/index_spec.ts @@ -29,6 +29,7 @@ describe('Workspace Schematic', () => { jasmine.arrayContaining([ '/.vscode/extensions.json', '/.vscode/launch.json', + '/.vscode/mcp.json', '/.vscode/tasks.json', '/.editorconfig', '/angular.json', @@ -70,6 +71,7 @@ describe('Workspace Schematic', () => { jasmine.arrayContaining([ '/.vscode/extensions.json', '/.vscode/launch.json', + '/.vscode/mcp.json', '/.vscode/tasks.json', '/angular.json', '/.gitignore',