Skip to content

refactor(@angular/cli): use serveStdio to support both 2025 and 2026-07-28 MCP protocol eras - #33750

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
clydin:mcp-support-2026-07-28
Aug 5, 2026
Merged

refactor(@angular/cli): use serveStdio to support both 2025 and 2026-07-28 MCP protocol eras#33750
alan-agius4 merged 1 commit into
angular:mainfrom
clydin:mcp-support-2026-07-28

Conversation

@clydin

@clydin clydin commented Aug 4, 2026

Copy link
Copy Markdown
Member

Replace direct StdioServerTransport connection in cli.ts with serveStdio from @modelcontextprotocol/server/stdio.

serveStdio supports both the 2025-era protocol (initialize handshake) and the 2026-07-28 protocol revision over stdio on the same endpoint, automatically negotiating the era for each connection.

…6-07-28 MCP protocol eras

Replace direct `StdioServerTransport` connection in `cli.ts` with `serveStdio` from `@modelcontextprotocol/server/stdio`.

`serveStdio` supports both the 2025-era protocol (`initialize` handshake) and the 2026-07-28 protocol revision over stdio on the same endpoint, automatically negotiating the era for each connection.
@clydin clydin added the target: minor This PR is targeted for the next minor release label Aug 4, 2026

@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 refactors the Angular CLI MCP command to use the serveStdio helper function from @modelcontextprotocol/server/stdio instead of manually instantiating StdioServerTransport and connecting the server. A critical issue was identified where the asynchronous serveStdio call is not being awaited, which can cause the command execution to terminate prematurely and lead to unhandled promise rejections.

Comment thread packages/angular/cli/src/commands/mcp/cli.ts
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 4, 2026
@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 Aug 5, 2026
@alan-agius4
alan-agius4 merged commit b6ed402 into angular:main Aug 5, 2026
43 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator

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

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