Skip to content

v1.17.0 — HTTP Debug Environment Variables

Choose a tag to compare

@Criptic Criptic released this 25 Sep 14:16
· 64 commits to main since this release
d5c07a5

A minor release. HTTP_DEBUG=true writes every request this server sends to the SAS Viya APIs, and each response, to a separate file, so a failing tool call can be traced to the exact request behind it. (#64)

Highlights

🔍 HTTP_DEBUG traces every SAS Viya API request

A tool failure reaches the person as the model's summary of an error. The request that caused it — a wrong path, a missing media type, a body of the wrong shape — is nowhere to be seen, and one tool call can make several requests: paging, polling a compute job, fetching its log.

With HTTP_DEBUG=true in .env, each request sent through the server's Viya client and its response are appended as JSON lines to HTTP_DEBUG_LOG_PATH (default ~/.sas-mcp-server/http-debug.log), never to the server log, so stdio's protocol stream is untouched. Two records per exchange share an id: a request (method, URL, headers, body) and a response (status, elapsed_ms, headers, body). A request with no matching response failed in transit; a body read that failed midway is a response with an error, and the caller still gets that error.

What the trace keeps out and what it keeps in:

  • Redacted with the collection log's rules: Authorization, cookies and other credential-shaped headers, query parameters and body keys, plus inline Bearer and JWT strings. Not redacted: data values. Table rows and SAS code appear in bodies, so review the file before sharing it.
  • Bounded. Bodies are capped at HTTP_DEBUG_MAX_BODY_BYTES (default 4096; 0 records none), binary bodies are described rather than recorded, multipart uploads are not buffered, bodies over 1 MiB are clipped without being decoded or parsed whole, and the file rotates (HTTP_DEBUG_MAX_LOG_BYTES, HTTP_DEBUG_LOG_BACKUPS).
  • Faithful. A URL is recorded exactly as sent unless a parameter had to be masked, so it can be pasted into curl to reproduce the call.
  • Off the event loop. Records are written from a worker thread, as the collection log's are.

Off by default. The server warns at startup while it is on; it is meant for troubleshooting, not for a shared deployment. An unusable path turns tracing off with a warning rather than stopping the server. OAuth sign-in and token-refresh calls are not traced.

🔢 Tool count

92 tools, unchanged: 51 read-only and 21 destructive.

🐳 Container image

ghcr.io/sassoftware/sas-mcp-server:1.17.0

Also published as 1.17, 1 and latest. Helm chart 0.4.2 (appVersion 1.17.0); no chart values changed. To trace a deployment, pass HTTP_DEBUG through the chart's extraEnv.

📄 Details