Skip to content

refactor(@angular/cli): provide a find examples MCP server tool #30717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Jul 15, 2025

The built-in stdio MCP server (ng mcp) for the Angular CLI now includes a tool that can find Angular code usage examples. The code examples are indexed and stored locally within the Angular CLI install. This removes the need for network requests to find the examples. It also ensures that the examples are relevant for the version of Angular currently being used. This tool requires Node.js 22.16 or higher. Lower versions will not have this specific tool available for use.
The tool is currently disabled by default but can be enabled for experimental purposes via the NG_MCP_CODE_EXAMPLES=1 environment variable.

@clydin clydin force-pushed the mcp/find-examples branch 7 times, most recently from 2ee5662 to e0991f1 Compare July 22, 2025 00:53
@clydin clydin marked this pull request as ready for review July 22, 2025 00:53
@clydin clydin added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Jul 22, 2025
@clydin clydin force-pushed the mcp/find-examples branch from e0991f1 to 22d76fc Compare July 22, 2025 15:14
@clydin clydin requested review from alan-agius4 and devversion July 22, 2025 16:39
The built-in stdio MCP server (`ng mcp`) for the Angular CLI now includes
a tool that can find Angular code usage examples. The code examples are
indexed and stored locally within the Angular CLI install. This removes
the need for network requests to find the examples. It also ensures that
the examples are relevant for the version of Angular currently being used.
This tool requires Node.js 22.16 or higher. Lower versions will not have
this specific tool available for use.
The tool is currently disabled by default but can be enabled for experimental
purposes via the `NG_MCP_CODE_EXAMPLES=1` environment variable.
@clydin clydin force-pushed the mcp/find-examples branch from 22d76fc to d6835ff Compare July 25, 2025 15:19
@clydin clydin removed the request for review from alan-agius4 July 25, 2025 22:11
@clydin clydin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jul 25, 2025
@clydin clydin merged commit fc012b7 into angular:main Jul 25, 2025
52 of 55 checks passed
@clydin clydin deleted the mcp/find-examples branch July 25, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: @angular/cli target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants