[BUG] claude doesn't wait until mcp servers are connected before initial prompt

Resolved 💬 9 comments Opened Apr 6, 2025 by confususs Closed Dec 9, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 0.2.57
  • Operating System: NixOS
  • Terminal: alacritty

Bug Description

When using claude and prompting too fast, or when using claude "<prompt here>", mcp servers are not utilized as it sometimes takes a few seconds before they are connected.

Steps to Reproduce

  1. Have an mcp server that doesn't connect immediately
  2. Use a prompt where you expect the mcp server to be utilized (e.g. have a playwright mcp server, ask it to use playwright to visit X)
  3. claude will respond without utilizing the mcp server

Expected Behavior

  1. Initial prompt is delayed until mcp servers are connected

Actual Behavior

  1. Initial prompt doesn't wait for mcp servers to be connected

Additional Context

It would be nice to at least have an option like '--wait-for-mcp-servers' when calling claude.

View original on GitHub ↗

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