Skip to content

angular-cli troublesome tooling name causes Claude desktop to fail #33628

Description

@draganziv

Command

other

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

21

Description

Command

mcp (the built-in MCP server: ng mcp)

Is this a regression?

  • Yes, this behavior used to work in the previous version

The MCP devserver.* tools are recent; MCP integrations that previously connected to ng mcp began failing when these tools were introduced.

The previous version in which this bug was not present was: an @angular/cli release prior to the addition of the devserver.start / devserver.stop / devserver.wait_for_build MCP tools (please confirm the exact version internally).

Description

ng mcp registers three tools whose names contain a . (dot):

  • devserver.start
  • devserver.stop
  • devserver.wait_for_build

Dots are not valid in tool names for at least some MCP clients. The Anthropic Messages API enforces the tool-name pattern:

^[a-zA-Z0-9_-]{1,64}$

A dot is not in [a-zA-Z0-9_-], so these three tool names are rejected. Because a client typically sends the entire tool list in one request, a single invalid name causes the whole request to be rejected, disabling all tools from all MCP servers — not just Angular's.

Observed error from the client (Claude Desktop):

tools.<N>.FrontendRemoteMcpToolDefinition.name: String should match pattern '^[a-zA-Z0-9_-]{1,64}$'

Note: some clients (e.g. Claude Code CLI) sanitize tool names by replacing . with _ before sending them, so they are unaffected — which masks the problem. Clients that forward the raw MCP tool name verbatim break.

The other Angular MCP tools are fine (all match the pattern):
ai_tutor, get_best_practices, search_documentation, list_projects, onpush_zoneless_migration, run_target.

Minimal reproduction

Start the MCP server and request its tool list over stdio:

  1. Run: npx -y @angular/cli@22.0.7 mcp
  2. Perform the MCP handshake (initializenotifications/initialized) and send tools/list.
  3. Inspect the returned tool names.

Result: the list includes devserver.start, devserver.stop, devserver.wait_for_build — names containing ..

--read-only and --local-only do not exclude these tools, so there is no flag-based workaround to hide the invalid names.

Exception or Error

Tool names returned by `tools/list` that violate ^[a-zA-Z0-9_-]{1,64}$:
  devserver.start
  devserver.stop
  devserver.wait_for_build

Suggested fix

Rename the tools to use an allowed separator, e.g. _:

  • devserver.startdevserver_start
  • devserver.stopdevserver_stop
  • devserver.wait_for_builddevserver_wait_for_build

(Any character within [a-zA-Z0-9_-] and length ≤ 64 would be compliant. Underscore keeps them consistent with the other Angular MCP tools, which already use underscores.)

My environment

Angular CLI: 22.0.7 (@angular/cli, ng mcp)
Node: v24.18.0
Package Manager: npm 11.16.0
OS: Windows 11 (x64)
MCP client where it fails: Claude Desktop (raw tool-name forwarding)
MCP client where it works: Claude Code CLI (sanitizes ._)

Minimal Reproduction

Start the MCP server and request its tool list over stdio:

  1. Run: npx -y @angular/cli@22.0.7 mcp
  2. Perform the MCP handshake (initializenotifications/initialized) and send tools/list.
  3. Inspect the returned tool names.

Result: the list includes devserver.start, devserver.stop, devserver.wait_for_build — names containing ..

--read-only and --local-only do not exclude these tools, so there is no flag-based workaround to hide the invalid names.

MCP client where it fails: Claude Desktop (raw tool-name forwarding)
MCP client where it works: Claude Code CLI (sanitizes ._)

Exception or Error


Your Environment

### My environment

**Angular CLI:** 22.0.7 (`@angular/cli`, `ng mcp`)
**Node:** v24.18.0
**Package Manager:** npm 11.16.0
**OS:** Windows 11 (x64)
**MCP client where it fails:** Claude Desktop (raw tool-name forwarding)
**MCP client where it works:** Claude Code CLI (sanitizes `.` → `_`)

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions