環境変数
MCP_DISCOVERY_CACHE_MAX_STALE_S
ディスカバリキャッシュのエントリが保持できる最大期間(秒)を設定します。
使い方・用途
- デフォルト値: 14400(4時間)。
- この値を超えたエントリは、起動時に破棄され、サーバーへ新規接続されます。
- 設定値の上限は 7 日間です。
英語原文(公式ドキュメントより)
Maximum age, in seconds, of a discovery-cache entry (default: 14400, or 4 hours). At a start where the entry is older than that, Claude Code discards it and connects the server at startup, as it does with the cache off. Claude Code caps the value at 7 days. Before v2.1.238, the default was 86400, or 24 hours, and Claude Code didn't cap the value