Skip to main content

Module http_server

Module http_server 

Source
Expand description

Optional remote MCP transport over Streamable HTTP.

The endpoint exposes shell and filesystem capabilities, so remote mode is deliberately fail-closed: loopback bind by default, strong file-backed or explicit bearer credentials, bounded request concurrency/rate, and isolated daemon namespaces for independently authenticated principals.

Structs§

HttpServerOptions

Constants§

DEFAULT_MAX_CONCURRENCY
DEFAULT_PRINCIPAL_REQUESTS_PER_MINUTE
Fixed-window request budget per authenticated principal. Behind one reverse proxy every client shares a single source IP, so the IP window alone cannot keep one busy principal from starving the others.
DEFAULT_REQUESTS_PER_MINUTE
Fixed-window budget of failed authentication attempts per source IP. Authenticated requests never consume it, so junk traffic sharing a tunnel’s source IP cannot rate-limit a valid principal.
MAX_BODY_BYTES
The one effective request-body limit. It drives both the declared-length precheck and the SDK’s streaming read limit, and at the default concurrency bounds buffered request bodies to 32 x 16 MiB = 512 MiB (bodies are only read after admission). Over HTTP this, not EditFiles’ larger aggregate content cap, bounds a tool call; the SDK default it replaces was 4 MiB.

Functions§

start_http_server
start_http_server_with_options
start_http_server_with_runtime

Type Aliases§

BoxError