Regression: /mcp can show Tools: (none) for hyphenated MCP server names

Resolved 💬 2 comments Opened Mar 26, 2026 by ronny-rentner Closed Mar 27, 2026

Summary

On codex-cli v0.116.0, /mcp can show Tools: (none) for MCP servers whose configured server name contains a hyphen (-), even when tools/list succeeds and returns tools.

Versions

  • Works: v0.114.0
  • Broken: v0.116.0

Repro

  1. Configure any MCP server with a hyphenated server key in config, e.g. [mcp_servers.some-server].
  2. Start codex-cli v0.116.0.
  3. Run /mcp.
  4. Observe: server appears enabled but tools are shown as (none).

Expected

Tools should be listed for that server (as in v0.114.0).

Likely Cause

Commit cb7d8f45a1393d71b333aea64123227028ae535f ("Normalize MCP tool names to code-mode safe form", #14605) changed MCP tool-name sanitization to replace - with _ in qualified names.

/mcp rendering still filters tool keys using a prefix built from the raw server name (including -):

  • expected prefix: mcp__some-server__
  • actual keys after sanitization: mcp__some_server__...

This mismatch causes the UI grouping path to show no tools for that server.

Why It Looks Silent

tools/list succeeds and conversion succeeds; tools are present but fail prefix matching during /mcp grouping/rendering.

Suggested Fix

Normalize server-name matching in /mcp grouping consistently with qualified-key sanitization, or avoid raw string prefix matching for grouping.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗