ToolSearch keyword queries return no results for connected MCP server tools at session start

Resolved 💬 2 comments Opened Feb 15, 2026 by bgupta Closed Feb 15, 2026

Bug Description

ToolSearch keyword queries (+servername, single-word queries) return no results for MCP server tools at the start of a session, even though:

  • The server shows "Connected" via claude mcp list and /mcp
  • The tools appear in the deferred tools list in the system prompt
  • select:mcp__<server>__<exact_tool_name> works immediately

After using select: to load any tool from the server, keyword queries like +servername start working for ALL tools from that server.

Steps to Reproduce

  1. Configure an npx-based MCP server in .mcp.json
  2. Ensure the server name is in enabledMcpjsonServers in .claude/settings.local.json
  3. Start a new Claude Code session
  4. Verify server shows "Connected" via /mcp
  5. Run ToolSearch with +servernamereturns nothing
  6. Run ToolSearch with select:mcp__servername__known_toolworks, returns the tool
  7. Run ToolSearch with +servername again → now works

Expected Behavior

Keyword search should find tools immediately since they are in the deferred tools catalog and the server is connected.

Actual Behavior

Keyword search returns nothing until select: is used to bootstrap the index for that server.

Additional Context

  • Other servers work with +servername immediately — the issue may be related to npx cold-start timing for slower servers
  • Possibly related to #19422 (race condition where tool char count is measured before MCP servers finish enumerating)
  • 18 MCP servers configured total

Environment

  • Claude Code version: 2.1.39
  • OS: Ubuntu 25.10 (Linux 6.17.0-8-generic)

View original on GitHub ↗

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