Skip to content

Connection error: JSON parse failure on Node 26 (gzip response handling) #6

Description

@rrpfi

Environment

  • Node.js: v26.0.0
  • OS: macOS Tahoe (arm64)
  • MCP client: OpenClaw

Error

Running npx -y @superhuman/mcp-mail fails with:

[12162] Connecting to remote server: https://mcp.mail.superhuman.com/mcp
[12162] Using transport strategy: http-first
[12162] Connection error: SyntaxError: Unexpected token 'e', "e0�i��"... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:4227:19)

Analysis

The error suggests the HTTP client is receiving a compressed (gzip) response but attempting to parse it as raw JSON. The binary prefix e0�i�� looks like gzip-compressed data.

This may be a compatibility issue with Node 26's undici changes, or the MCP client needs to explicitly handle Accept-Encoding/Content-Encoding headers.

Reproduction

npx -y @superhuman/mcp-mail

Server discovery works, but connection to https://mcp.mail.superhuman.com/mcp fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions