環境変数
MAX_MCP_OUTPUT_TOKENS
MCPツールのレスポンスで許可される最大トークン数を設定します。
使い方・用途
- MCPツールが大量のデータを出力して会話コンテキストを圧迫するのを防ぎ、トークン使用量を管理するために使用します。
- 出力が10,000トークンを超えると警告が表示されますが、この変数でデフォルト制限値(25,000)を調整できます。
英語原文(公式ドキュメントより)
Maximum number of tokens allowed in MCP tool responses. Claude Code displays a warning when output exceeds 10,000 tokens. Tools that declare anthropic/maxResultSizeChars use that character limit for text content instead, but image content from those tools is still subject to this variable (default: 25000)