Skip to content

feat(ng-schematics): add AI configuration to mcp.json for igniteui an…#1588

Merged
kdinev merged 6 commits intomasterfrom
mstoyanova/ng-add-mcp-config
Apr 2, 2026
Merged

feat(ng-schematics): add AI configuration to mcp.json for igniteui an…#1588
kdinev merged 6 commits intomasterfrom
mstoyanova/ng-add-mcp-config

Conversation

@Marina-L-Stoyanova
Copy link
Copy Markdown
Contributor

…d igniteui-theming servers

Closes # .

Additional information related to this pull request:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the Angular cli-config schematic to automatically add Ignite UI MCP server entries into a VS Code .vscode/mcp.json, and adds unit tests to validate creation/merge behavior.

Changes:

  • Add a new addAIConfig() schematic rule that creates or updates /.vscode/mcp.json with igniteui and igniteui-theming MCP server definitions.
  • Wire addAIConfig() into the existing cli-config schematic chain.
  • Add a dedicated test suite covering creation and merge scenarios for the MCP config file.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/ng-schematics/src/cli-config/index.ts Adds addAIConfig() rule to create/update /.vscode/mcp.json and registers it in the schematic chain.
packages/ng-schematics/src/cli-config/index_spec.ts Adds tests asserting correct creation, merging, and non-modification of /.vscode/mcp.json.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +132 to +136
if (tree.exists(mcpFilePath)) {
const content = JSON.parse(tree.read(mcpFilePath)!.toString());
const servers = content.servers ?? {};
let modified = false;
if (!servers["igniteui"]) {
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

addAIConfig assumes /.vscode/mcp.json is valid JSON and that content.servers is a mutable object. If the file is empty/invalid JSON (or servers is a string/array), JSON.parse/property assignment will throw and abort the schematic run. Consider wrapping the read/parse in try/catch (or using a tolerant parser if mcp.json can contain comments) and validating servers is a plain object before mutating; if parsing/validation fails, log a warning and skip updating rather than crashing.

Copilot uses AI. Check for mistakes.
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 1, 2026

Coverage Status

coverage: 77.588% (+0.5%) from 77.084%
when pulling d4bdba0 on mstoyanova/ng-add-mcp-config
into 9e940df on master.

@kdinev kdinev merged commit e5a69f0 into master Apr 2, 2026
3 checks passed
@kdinev kdinev deleted the mstoyanova/ng-add-mcp-config branch April 2, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants