環境変数
MCP_DISCOVERY_CACHE_STRIKES
キャッシュのバックグラウンド更新が連続して失敗した際、エントリを破棄するまでの回数を設定します。
使い方・用途
- デフォルト値: 1。
- ネットワーク接続が断続的に切断される環境では、この値を上げることで、一度の更新失敗によるキャッシュの破棄を防げます。
英語原文(公式ドキュメントより)
At a start where a discovery-cache entry is older than MCP_DISCOVERY_CACHE_TTL_S, Claude Code refreshes it in the background. This variable sets how many refreshes in a row can fail before Claude Code discards the entry and connects the server at the next start instead (default: 1). Raise it if your network connection drops occasionally, so that one failed refresh doesn't discard the entry. Requires Claude Code v2.1.238 or later