Skip to content

feat(ng-schematics): add MCP server integration for AI assistant support#1606

Open
dkalinovInfra wants to merge 2 commits intomasterfrom
dkalinov/angular_schematics_mcp_start
Open

feat(ng-schematics): add MCP server integration for AI assistant support#1606
dkalinovInfra wants to merge 2 commits intomasterfrom
dkalinov/angular_schematics_mcp_start

Conversation

@dkalinovInfra
Copy link
Copy Markdown
Contributor

Summary

Adds MCP server integration to the @igniteui/angular-schematics package, 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)

  • New Architect Builder at src/builders/mcp/ — starts the MCP server via ng run <project>:mcp
  • builders.json registry added alongside existing schematics collection
  • Supports --remote <url> and --debug options

Schematic (ng generate @igniteui/angular-schematics:mcp)

  • Hidden schematic at src/mcp/ as a fallback entry point
  • Same options: --remote, --debug

Project Scaffolding Integration

  • addAIConfig() in cli-config/index.ts now also registers the mcp architect target in angular.json during project creation
  • New projects get .vscode/mcp.json (for VS Code auto-discovery) and an mcp target in angular.json

Dependencies

  • Added @angular-devkit/architect (^21.0.0) to support builders
  • Added @igniteui/mcp-server (~15.0.0-rc.0) as dependency

Documentation

  • Updated root README.md: added React/Web Components to framework list, simplified build steps, fixed typos
  • Updated packages/ng-schematics/README.md with MCP server usage instructions

Usage

# Builder (preferred)
ng run my-app:mcp
ng run my-app:mcp --remote https://backend-url
ng run my-app:mcp --debug

# Schematic (alternative)
ng generate @igniteui/angular-schematics:mcp

Copilot AI review requested due to automatic review settings April 3, 2026 11:53
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

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 mcp Architect builder plus registry (builders.json) and registers the target into angular.json during project creation / ng add.
  • Adds a hidden mcp schematic 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.

@dkalinovInfra
Copy link
Copy Markdown
Contributor Author

@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>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 3, 2026

@copilot apply changes based on the comments in this thread

Applied the changes from the review in commit 89ae4e3:

  1. Command injection fix (both src/builders/mcp/index.ts and src/mcp/index.ts): Replaced Util.execSync with a shell-interpolated string with spawnSync(process.execPath, [mcpEntry, ...args], { stdio: "inherit" }), passing arguments as an array — eliminating the injection risk.

  2. @angular-devkit/architect version: Updated from ^0.2100.0 to ^0.2102.0 to align with the Angular 21.2.x series used by the other @angular-devkit/* dependencies, reducing duplicate @angular-devkit/core versions (was 21.0.6 + 21.2.3, now 21.2.6 + 21.2.3).

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.

4 participants