Skip to content

Result Limits

maxResultChars limits serialized result length before returning tool output.

  • Global default: top-level maxResultChars
  • Per-server override: servers.<name>.maxResultChars

If a result exceeds the limit, mcp-bridge returns truncation metadata:

{
"_truncated": true,
"_originalLength": 183422,
"result": "{\"huge\":\"json payload...\""
}
{
"maxResultChars": 50000,
"servers": {
"verbose-server": {
"transport": "streamable-http",
"url": "https://verbose.example.com/mcp",
"maxResultChars": 10000
},
"github": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"]
}
}
}

In this example:

  • Most servers use 50000
  • verbose-server is capped at 10000
  • Truncated responses carry _truncated and _originalLength so callers can detect and handle clipping