Skip to content

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

Closed

Description

@ronny-rentner

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.

Activity

  1. added
    bug
    CLI
    mcp
    TUI
    on Mar 26, 2026
  2. added
    regression
    and removed
    CLI
    on Mar 26, 2026
  3. etraut-openai commented on Mar 27, 2026

    @etraut-openai
    Contributor

    Thanks for the bug report. This will be addressed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIbugmcpregression

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions