feat(@schematics/angular): update ai-config to include Angular MCP server config#32973
feat(@schematics/angular): update ai-config to include Angular MCP server config#32973hawkgs wants to merge 1 commit intoangular:mainfrom
Conversation
37cb2af to
6590032
Compare
…rver config Update the `ai-config` schematic, which is activated during workspace creation, to enable Angular MCP server by default.
6590032 to
4490726
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors the AI configuration schematic to support the generation and integration of Model Context Protocol (MCP) server configurations alongside best practices Markdown files. It introduces utility functions for creating or updating JSON and TOML configuration files, ensuring that existing settings are preserved and merged where applicable. The set of supported AI tools has been updated to include Claude Code, Cursor, Gemini CLI, OpenAI Codex, and VS Code, with corresponding updates to the schematic schema and unit tests. I have no feedback to provide as there are no review comments.
|
|
||
| if (existingFileBuffer) { | ||
| let existing = existingFileBuffer.toString(); | ||
| if (existing.includes(TOML_MCP_SERVERS_PROP)) { |
There was a problem hiding this comment.
I've opted out of using a TOML parser since I couldn't find an organization-managed one on npm.
I guess we can discuss whether this approach is good enough or we want something different.
dgp1130
left a comment
There was a problem hiding this comment.
No major concerns on my side, but I'll defer to others on schematics nuances.
| "command": "npx", | ||
| "args": ["-y", "@angular/cli", "mcp"] |
There was a problem hiding this comment.
Consider: I know I've ragged on this in the past, but it would be a little safer to do node node_modules/.bin/ng mcp?
I know npx uses the project-local install if it exists, but I'm wondering if there are edge cases were we might potentially get the wrong version of MCP compared to the project? If the user hasn't run npm install yet, is there a chance it just picks the latest version? Would it better to fail with "node_modules/.bin/ng does not exist" than pick the wrong version?
/cc @clydin
Update the
ai-configschematic, which is activated during workspace creation, to enable Angular MCP server by default.