Skip to content

feat(@schematics/angular): update ai-config to include Angular MCP server config#32973

Open
hawkgs wants to merge 1 commit intoangular:mainfrom
hawkgs:schematics/ai-mcp-config
Open

feat(@schematics/angular): update ai-config to include Angular MCP server config#32973
hawkgs wants to merge 1 commit intoangular:mainfrom
hawkgs:schematics/ai-mcp-config

Conversation

@hawkgs
Copy link
Copy Markdown
Member

@hawkgs hawkgs commented Apr 9, 2026

Update the ai-config schematic, which is activated during workspace creation, to enable Angular MCP server by default.

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Apr 9, 2026
@hawkgs hawkgs force-pushed the schematics/ai-mcp-config branch from 37cb2af to 6590032 Compare April 14, 2026 14:59
…rver config

Update the `ai-config` schematic, which is activated during workspace creation, to enable Angular MCP server by default.
@hawkgs hawkgs force-pushed the schematics/ai-mcp-config branch from 6590032 to 4490726 Compare April 14, 2026 15:00
@hawkgs hawkgs marked this pull request as ready for review April 14, 2026 15:04
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

@dgp1130 dgp1130 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No major concerns on my side, but I'll defer to others on schematics nuances.

Comment on lines +4 to +5
"command": "npx",
"args": ["-y", "@angular/cli", "mcp"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants