Skip to content

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

Open
clydin wants to merge 1 commit intoangular:mainfrom
clydin:mcp/ng-bin-discovery
Open

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

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented Apr 14, 2026

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

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

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.

… 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
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: 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