Skip to content

Network Body Capture

Gasoline is an open-source MCP server that captures HTTP request and response bodies, letting AI coding assistants see the actual data flowing between your app and APIs. No more copy-pasting from DevTools.

API debugging with AI assistants is painful. You see a 400 error, but without the response body your AI is guessing. You have to open DevTools, find the request, copy the response, paste it into chat — and repeat for every API issue.

With network body capture, your AI reads the payloads directly.

For every network request, Gasoline records:

FieldDescription
Request bodyPOST/PUT/PATCH payloads (up to 8KB)
Response bodyServer responses (up to 16KB)
HeadersRequest and response headers (auth stripped)
Status code200, 401, 500, etc.
Content typeJSON, HTML, text, etc.
DurationRequest timing in milliseconds

Your AI can query exactly the requests it needs:

// Find failed auth requests
{
"url": "/api/auth",
"status_min": 400,
"status_max": 499
}
// Find slow POST requests
{
"method": "POST",
"limit": 5
}
// Find requests to a specific endpoint
{
"url": "users/profile"
}
ParameterDescription
urlFilter by URL substring
methodFilter by HTTP method (GET, POST, etc.)
status_minMinimum status code
status_maxMaximum status code
limitMax entries to return (default: 20)
{
"url": "https://api.example.com/users",
"method": "POST",
"status": 422,
"contentType": "application/json",
"duration": 145,
"requestBody": "{\"email\":\"invalid\",\"name\":\"\"}",
"responseBody": "{\"errors\":{\"email\":\"invalid format\",\"name\":\"required\"}}"
}

Your AI immediately sees the validation errors without you lifting a finger.

LimitValue
Request body cap8KB (larger payloads truncated)
Response body cap16KB
Buffer size100 recent requests
Total memory budget8MB
Auth headersAlways stripped
  • Auth headers stripped — tokens never appear in logs
  • Localhost only — captured data stays on your machine
  • Bounded buffers — old requests evicted, never unbounded growth

“My form submission is failing.”

Your AI sees the exact validation errors in the response body and can fix the request payload.

“I’m getting 401s.”

Your AI inspects the request to see what’s missing and the response for error details.

“The API returns data but the UI is empty.”

Your AI compares the response structure to what your code expects — spotting field name changes, missing properties, or type mismatches.

“The Stripe webhook isn’t working.”

Your AI sees both what Stripe sent and how your server responded, identifying the disconnect.