When using the mcp tool to take screenshots, the response is Maximum call stack size exceeded

When using the mcp tool to take screenshots, the response is Maximum call stack size exceeded.

The tool can take snapshots normally, and the response is the base64 content of the image

n8n --version
1.107.4

**Running n8n via (Docker, npm, n8n cloud, desktop app):docker

  • **Operating system:AWS Linux AMI

The MCP tool returns a very large base64 string within the item’s JSON. This large payload goes through the n8n pipeline (cleanup, pairing, mappings, etc.), and in certain versions/paths ends up in a generic JS stack overflow (exactly this error), typical when handling very large structures/arguments or involving deep recursive traversals. This doesn’t seem to be a flaw in the MCP server itself, but rather in how the client/consumer handles the large response.

Convert the base64 to binary and purge the large JSON. Just after the MCP Client Tool, Convert to File → Move base64 string to file

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.