refactor(ai-config): shared MCP server config logic w/ jsonc-parser#1648
Merged
damyanpetev merged 8 commits intomasterfrom Apr 21, 2026
Merged
refactor(ai-config): shared MCP server config logic w/ jsonc-parser#1648damyanpetev merged 8 commits intomasterfrom
damyanpetev merged 8 commits intomasterfrom
Conversation
…or AI config handling
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses Issue #1646 by preventing ai-config (CLI and Angular schematics) from overwriting existing .vscode/mcp.json content, instead merging Ignite UI MCP server entries into existing JSON/JSONC while preserving comments.
Changes:
- Added a shared
addMcpServers()utility (jsonc-based) and centralizedIGNITEUI_MCP_SERVERSin@igniteui/cli-core. - Updated Angular schematics
addAIConfig()to merge MCP servers into an existing.vscode/mcp.json(or create it when missing). - Updated CLI
ai-configto use the shared jsonc-based merge logic; movedjsonc-parserdependency fromng-schematicstocli-core.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ng-schematics/src/cli-config/index.ts | Switches MCP config handling to shared merge utility to avoid overwriting existing mcp.json. |
| packages/ng-schematics/package.json | Removes direct jsonc-parser dependency (now provided by @igniteui/cli-core). |
| packages/core/util/index.ts | Exports the new MCP config utility module. |
| packages/core/util/McpConfig.ts | Introduces addMcpServers() and IGNITEUI_MCP_SERVERS shared constants. |
| packages/core/package.json | Adds jsonc-parser dependency to @igniteui/cli-core. |
| packages/cli/lib/commands/ai-config.ts | Uses shared MCP merge logic so existing mcp.json servers aren’t lost. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…lify file handling
…/igniteui-cli into mstoyanova/jsonc-parser
damyanpetev
reviewed
Apr 21, 2026
|
|
||
| if (!modified) { | ||
| Util.log(` Ignite UI MCP servers already configured in ${configPath}`); | ||
| Util.log(` Ignite UI MCP servers already configured`); |
Member
There was a problem hiding this comment.
Okay, my bad, bit overzealous with the moving of all consts to the core util. Still like the path here, so I'll revert it as an exported const and param
abb7b8a to
ae8d4d1
Compare
ae8d4d1 to
b3bcd7d
Compare
damyanpetev
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…or AI config handling
Description
Created util method that reads and modifies files with jsonc.
Related Issue
Closes #1646
Type of Change
Affected Packages
igniteui-cli(packages/cli)@igniteui/cli-core(packages/core)@igniteui/angular-templates(packages/igx-templates)@igniteui/angular-schematics(packages/ng-schematics)@igniteui/mcp-server(packages/igniteui-mcp)Checklist
npm run test)npm run build)npm run lint)Additional Context