Skip to content

Codex can't enumerate tools for the laravel-boost mcp server. #16326

Open

Description

@wordhazard

What version of Codex CLI is running?

117

What subscription do you have?

Pro

Which model were you using?

gpt-5.4 high

What platform is your computer?

Darwin 25.4.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

iTerm2 build 3.6.9

What issue are you seeing?

Codex CLI 0.117.0 is detecting a local MCP server but caching it as having no tools.

Environment

  • Codex version: 0.117.0
  • Project: Laravel app with laravel/boost and laravel/mcp
  • MCP server configured in ~/.codex/config.toml as:

[mcp_servers.laravel-boost]
command = "/opt/homebrew/bin/php"
args = ["artisan", "boost:mcp"]
cwd = "/Users/xxxx/src/webstack/cwics"

Observed behavior

  • Codex UI shows laravel-boost with Tools: (none)
  • Codex cache file ~/.codex/cache/codex_apps_tools/24f8a4dbd35e158afc9278429be4f359a5d156f9.json contains:
    {"schema_version":1,"tools":[]}

Important evidence

  • Codex startup log shows MCP is enabled:
    session_init.enabled_mcp_server_count=2
  • The Laravel Boost MCP server works correctly when tested directly over stdio.
  • Running an initialize followed by tools/list against php artisan boost:mcp returns a populated tool list with 15 tools, including:
    application-info, database-schema, search-docs, tinker, etc.

Direct repro command
cat <<'EOF' | /opt/homebrew/bin/php artisan boost:mcp
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"debug","version":"1.0"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
EOF

Expected

  • Codex should show the Laravel Boost tools and cache them correctly.

Actual

  • Codex recognizes the MCP server exists, but caches the tool list as empty and the UI shows Tools: (none).

What steps can reproduce the bug?

Uploaded thread: 019d43c2-5940-79d3-b4e9-d83d964e519a

What is the expected behavior?

It should have been able to enumerate and cache the tools for the mcp properly, but it persists tools: [].

Additional information

No response

Activity

  1. added
    bug
    on Mar 31, 2026
  2. added
    CLI
    mcp
    on Mar 31, 2026
  3. removed
    CLI
    on Mar 31, 2026
  4. JaysonGeng commented on Apr 1, 2026

    @JaysonGeng

    I dug into this one and it looks like the remaining hyphenated-server-name path from #14927 / #15832, but in the app-server MCP status assembly rather than the older /mcp grouping path.

    Root cause:
    collect_mcp_snapshot() exposes MCP tool keys using sanitized qualified names like mcp__laravel_boost__...
    list_mcp_server_status_task() was grouping tools once and then looking them up again by the raw configured server name (laravel-boost)
    that mismatch leaves McpServerStatus.tools empty even when the underlying MCP server enumerates tools correctly

    I put together a fix here:
    branch: fix/mcp-status-tool-name-normalization
    commit: c22d39f
    compare: main...JaysonGeng:codex:fix/mcp-status-tool-name-normalization

    What it changes:
    app-server now resolves MCP status tools by qualified_mcp_tool_name_prefix(server_name) instead of raw-name lookup
    adds a regression test covering some-server -> mcp__some_server__lookup

    Validation:
    git diff --check ✅
    cargo fmt --all --check ✅
    targeted cargo test -p codex-app-server mcp_status_tools_for_server_matches_sanitized_hyphenated_names -- --exact --nocapture and cargo check -p codex-app-server --tests both hit the local 60s hard timeout while still compiling the isolated worktree's local crates; neither surfaced a compiler error or failing assertion before timeout

    Per docs/contributing.md, I am not opening an unsolicited upstream PR. If this aligns with the intended fix, feel free to invite a PR or cherry-pick/rebase from the branch above.

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

    bugmcp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions