Skip to content

mcp-data-platform-v1.77.1

Choose a tag to compare

@github-actions github-actions released this 02 Jun 05:38
· 35 commits to main since this release
a22f50e

mcp-data-platform v1.77.1

A patch release that fixes an out-of-memory crash in the API gateway when api_invoke_endpoint is called against an endpoint that returns a binary (non-text) body.

API gateway no longer OOMs on binary response bodies (#540)

api_invoke_endpoint returns the upstream response body inline through the MCP/JSON channel. For a binary body that path is an out-of-memory vector: the body is buffered, converted to a string, and then JSON-marshaled, where every control and invalid-UTF-8 byte is escaped as \uXXXX. A high-entropy body (a zip, image, PDF, or application/octet-stream) inflates several-fold under that escaping and is held in multiple copies at once, so inlining even a single ~10 MiB binary can push the shared gateway process past its heap limit and get the container OOMKilled (exit 137), taking down every other in-flight request on the pod. The result was also useless to a model: a truncated, escaped binary string is not a usable artifact.

The per-request read cap (max_response_bytes) did not prevent this, because it bounds the pre-escape read size, not the escaped peak.

api_invoke_endpoint now refuses a non-text response before reading the body. When the upstream Content-Type is not text-shaped (text/*, application/json, any +json/+xml suffix, application/xml, form-urlencoded, JavaScript), the call returns a structured upstream_body_not_inlineable error without buffering anything, and steers the caller to api_export, which streams the body to a portal asset instead. The REST gateway shim maps the error to a non-retryable 415.

Key properties:

  • Content-type-driven, not size-driven. A small text response still returns inline; a binary response of any size is refused.
  • Zero-length responses are never refused, so HEAD and empty 204 responses are unaffected.
  • api_export and the raw passthrough route (/invoke-raw) are unchanged. Both stream the upstream body without buffering it inline and remain the correct paths for retrieving a large or binary body: api_export to a portal asset, /invoke-raw directly to a REST client.

No configuration changes and no migrations. This is a behavior change for api_invoke_endpoint calls that previously returned a binary body inline (those now return the structured error); text and JSON responses are unaffected.

Changelog

Bug Fixes

  • a22f50e: fix(apigateway): refuse binary response bodies in api_invoke_endpoint before buffering (#540) (@cjimti)

Installation

Homebrew (macOS)

brew install txn2/tap/mcp-data-platform

Claude Code CLI

claude mcp add mcp-data-platform -- mcp-data-platform

Docker

docker pull ghcr.io/txn2/mcp-data-platform:v1.77.1

Verification

All release artifacts are signed with Cosign. Verify with:

cosign verify-blob --bundle mcp-data-platform_1.77.1_linux_amd64.tar.gz.sigstore.json \
  mcp-data-platform_1.77.1_linux_amd64.tar.gz