# MAX_MCP_OUTPUT_TOKENS

> It sets how big an MCP tool's answer may be.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** MAX_MCP_OUTPUT_TOKENS environment variable

## Think of it like

It is like a voice note. It can only be so long.

## Definition

MAX_MCP_OUTPUT_TOKENS sets how many tokens an MCP tool's answer may hold. The default is 25,000, and Claude Code warns once an answer goes over 10,000. A text answer over 50,000 characters, from a tool that sets no size of its own, is saved to a file instead.

## Example

Jack's database server returns big query results that get cut off. He raises the limit, and Claude sees the whole table.

## Example code

```bash
export MAX_MCP_OUTPUT_TOKENS=50000
claude
```

Allow bigger answers from MCP tools.

## Why it matters

A tool that returns too much can fill the chat in one call. This keeps that in check.

## Common mistake

Raising it to fix one noisy tool. Better to make that tool return less, or page its results.

## Three principles

- **Default 25,000.** Tokens per answer.
- **Warns at 10,000.** So you notice.
- **Huge text.** Goes to a file.

## Related terms

- [MCP Tool](https://learn.benibix.com/term/ai/mcp-tool)
- [MCP Server](https://learn.benibix.com/term/ai/mcp-server)
- [MCP_TIMEOUT](https://learn.benibix.com/term/ai/mcp-timeout-variable)

![Each tool has its own cap on how much of its output Claude gets to read.](https://learn.benibix.com/diagrams/env-output-caps.svg)

---

Source: https://learn.benibix.com/term/ai/max-mcp-output-tokens-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
