Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 4 tasks
confususs opened this issue Apr 6, 2025 · 1 comment
Open
1 of 4 tasks
Assignees
Labels
bug Something isn't working

Comments

@confususs
Copy link

confususs commented Apr 6, 2025

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • Claude CLI version: 0.2.57
  • Operating System: NixOS
  • Terminal: alacritty

Bug Description

When using claude and prompting too fast, or when using claude "", 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.

@confususs confususs added the bug Something isn't working label Apr 6, 2025
@ashwin-ant
Copy link
Collaborator

This is a good request. We don't block on MCP servers right now because some servers can take 10+ seconds to start, and we don't want that to slow down the main startup. But making an optional flag sounds okay.

@ashwin-ant ashwin-ant self-assigned this Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants