Skip to content

fix(@angular/cli): dynamically resolve project Angular CLI executable inside MCP tools#33001

Merged
clydin merged 1 commit into
angular:mainfrom
clydin:mcp/ng-bin-discovery
Apr 15, 2026
Merged

fix(@angular/cli): dynamically resolve project Angular CLI executable inside MCP tools#33001
clydin merged 1 commit into
angular:mainfrom
clydin:mcp/ng-bin-discovery

Conversation

@clydin

@clydin clydin commented Apr 14, 2026

Copy link
Copy Markdown
Member

The MCP server host runtime now dynamically resolves the precise Angular CLI binary from the workspace's node_modules rather than relying on global system path invocations. This guarantees full compatibility between a project's specific configuration constraints and the active framework version, preventing mismatches across monorepos or containerized setups.

@clydin clydin added the target: patch This PR is targeted for the next patch release label Apr 14, 2026
@clydin
clydin marked this pull request as ready for review April 14, 2026 18:57
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 14, 2026
@clydin
clydin requested a review from alan-agius4 April 14, 2026 18:57

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a resolveCommand utility to locate the local @angular/cli binary within a workspace, ensuring that ng commands execute using the project-specific CLI version. The LocalWorkspaceHost was updated to utilize this resolution logic. Feedback was provided regarding the use of createRequire, noting that passing a directory path directly may lead to incorrect module resolution relative to the parent directory.

Comment thread packages/angular/cli/src/commands/mcp/host.ts Outdated
… inside MCP tools

The MCP server host runtime now dynamically resolves the precise Angular CLI binary from the workspace's node_modules rather than relying on global system path invocations. This guarantees full compatibility between a project's specific configuration constraints and the active framework version, preventing mismatches across monorepos or containerized setups.
@clydin
clydin force-pushed the mcp/ng-bin-discovery branch from 46068a7 to 638257d Compare April 14, 2026 19:02
@alan-agius4 alan-agius4 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 Apr 15, 2026
@clydin
clydin merged commit cc30034 into angular:main Apr 15, 2026
36 checks passed
@clydin

clydin commented Apr 15, 2026

Copy link
Copy Markdown
Member Author

This PR was merged into the repository. The changes were merged into the following branches:

@clydin
clydin deleted the mcp/ng-bin-discovery branch April 15, 2026 13:55
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators May 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/cli target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants