feat(ng-schematics): add MCP server integration for AI assistant support#1606
feat(ng-schematics): add MCP server integration for AI assistant support#1606dkalinovInfra wants to merge 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds MCP server integration to @igniteui/angular-schematics so AI assistants can interact with Ignite UI docs/scaffolding via an Angular Architect builder (ng run <project>:mcp) and a hidden fallback schematic.
Changes:
- Introduces an
mcpArchitect builder plus registry (builders.json) and registers the target intoangular.jsonduring project creation /ng add. - Adds a hidden
mcpschematic as an alternative entry point and updates schematics collection metadata. - Updates repo and package documentation and adds dependencies (
@igniteui/mcp-server,@angular-devkit/architect).
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Locks new DevKit architect dependency and its transitive deps. |
| README.md | Updates MCP usage/docs and general repo instructions/typos. |
| packages/ng-schematics/src/ng-new/index.ts | Registers MCP target during ng new flow. |
| packages/ng-schematics/src/mcp/schema.ts | Adds TS options interface for MCP schematic/builder. |
| packages/ng-schematics/src/mcp/schema.json | Adds schematic option schema for remote/debug. |
| packages/ng-schematics/src/mcp/index.ts | Adds hidden schematic that starts the MCP server. |
| packages/ng-schematics/src/collection.json | Registers the hidden mcp schematic. |
| packages/ng-schematics/src/cli-config/index.ts | Adds addMcpBuilderTarget() and wires it into config rules. |
| packages/ng-schematics/src/builders/mcp/schema.json | Adds builder option schema for remote/debug. |
| packages/ng-schematics/src/builders/mcp/index.ts | Implements mcp Architect builder to start the server. |
| packages/ng-schematics/src/builders.json | Registers the mcp builder implementation/schema. |
| packages/ng-schematics/README.md | Documents ng run <project>:mcp usage and options. |
| packages/ng-schematics/package.json | Exposes builders entry + adds architect/mcp-server deps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
…ommand injection and align architect version Agent-Logs-Url: https://github.com/IgniteUI/igniteui-cli/sessions/87f53d3f-a82a-4e09-a71a-1c1f7a2a6dc9 Co-authored-by: dkalinovInfra <130121354+dkalinovInfra@users.noreply.github.com>
Applied the changes from the review in commit
|
|
|
||
| ```bash | ||
| ng run <project>:mcp | ||
| ``` |
There was a problem hiding this comment.
I get ng g is odd for a schematic integration that's not meant to actually generate any code (sadly that's the equivalent exposed through ng of the generic Schematics CLI), but having it as a builder isn't less awkward TBH.
The MCP is also not a builder and isn't associated with any project's build pipeline, so calling ng run client-app:mcp for example is off for me, especially if there are multiple projects in the workspace.
Also, not sure how starting the MCP server that way would be useful - I don't see any modification of the mcp.json and I'm not sure agents can discover and use the server like that to begin with.
This could also be just a bin script on either the schematics or the mcp package - depending on how you want it exposed and if the MCP is dep of the schematics or added as root dependency; basically ending up with identical integration as igniteui-cli just calling a different package in the config.
There was a problem hiding this comment.
Also consider some vendor prefix for the name like at least ig-mcp if this remains as a builder, mcp alone is too generic.
| const mcpPkgJson = require.resolve("@igniteui/mcp-server/package.json"); | ||
| mcpEntry = path.resolve(path.dirname(mcpPkgJson), "dist", "index.js"); | ||
| } catch { | ||
| context.logger.error( | ||
| "MCP server package not found. Install it first:\n" + | ||
| " yarn install\n" | ||
| ); | ||
| return { success: false }; |
There was a problem hiding this comment.
If you make the MCP a dep of the schematics package it'll always be there and you can directly import from it, if that suits us better.
| if (!fs.existsSync(mcpEntry)) { | ||
| context.logger.error( | ||
| "MCP server not built. Build it first:\n" + | ||
| " npm run build:mcp\n" | ||
| ); | ||
| return { success: false }; | ||
| } |
There was a problem hiding this comment.
Surely, if that's user project context working with shipped packages they wouldn't need to build anything additionally themselves, right?
There was a problem hiding this comment.
This one is a duplicate of packages/ng-schematics/src/builders/mcp/index.ts (or the other way around)
Summary
Adds MCP server integration to the
@igniteui/angular-schematicspackage, enabling AI assistants (GitHub Copilot, Cursor, etc.) to interact with Ignite UI documentation and scaffolding tools via the Model Context Protocol.Changes
Angular CLI Builder (
ng run <project>:mcp)src/builders/mcp/— starts the MCP server viang run <project>:mcpbuilders.jsonregistry added alongside existing schematics collection--remote <url>and--debugoptionsSchematic (
ng generate @igniteui/angular-schematics:mcp)src/mcp/as a fallback entry point--remote,--debugProject Scaffolding Integration
addAIConfig()incli-config/index.tsnow also registers themcparchitect target inangular.jsonduring project creation.vscode/mcp.json(for VS Code auto-discovery) and anmcptarget inangular.jsonDependencies
@angular-devkit/architect(^21.0.0) to support builders@igniteui/mcp-server(~15.0.0-rc.0) as dependencyDocumentation
README.md: added React/Web Components to framework list, simplified build steps, fixed typospackages/ng-schematics/README.mdwith MCP server usage instructionsUsage