Fixes › Claude Code

Claude Code: MCP tool output is too large (MAX_MCP_OUTPUT_TOKENS)

Claude Code

The error

Warning that an MCP tool's output exceeds 10,000 tokens • results cut off at 25,000 tokens • long results saved to a file instead of shown

Why it happens

Claude Code warns when an MCP tool returns more than 10,000 tokens and limits tool output to 25,000 tokens by default to protect your context window. Separately, successful text results longer than 50,000 characters are saved to a file whatever the token limit is, unless the server raises that tool's own limit.

How to fix it

  1. Ask for less
    Most servers have paging or filter options (a page number, a row limit, a narrower query). Asking for smaller results is usually the best fix.
  2. Raise the limit if you really need more
    Set MAX_MCP_OUTPUT_TOKENS when you start Claude Code. The 10,000-token warning stays the same.
    MAX_MCP_OUTPUT_TOKENS=50000 claude
  3. Long-running tools: set a per-server timeout
    Add a timeout in milliseconds to the server's entry in .mcp.json (values under 1000 are ignored).
    {
      "mcpServers": {
        "big-server": {
          "command": "npx",
          "args": ["-y", "@example/mcp-server"],
          "timeout": 600000
        }
      }
    }

Related servers

Sources