Documentation
¶
Overview ¶
Package remotemcp serves the AerolVM MCP tools over Streamable HTTP at /mcp on sandboxd (plans/mcp-server-and-agent-cli.md §5.7, Phase 2b). It is off unless SB_MCP_ENABLED=true, authenticates with the API's bearer token, and is pinned-only: every request names one sandbox in ?sandbox=.
The endpoint is stateless (no Mcp-Session-Id), so any node can serve any request behind any load balancer and nothing touches cluster state. Each request builds an agentmcp server whose tools reach the API in-process with the caller's own token (see inProcessTransport).
Index ¶
Constants ¶
const Path = "/mcp"
Path is where the endpoint is mounted: not under /v1, because MCP versions itself.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// AllowedOrigins lists browser origins that may call /mcp. A request
// with any other Origin is refused (DNS rebinding); MCP clients that
// aren't browsers send no Origin and are unaffected.
AllowedOrigins []string
// AllowedHosts, when set, lists the Host values /mcp answers to.
AllowedHosts []string
// RateLimit is the per-token request rate (req/s); the burst is twice
// that. Zero disables the limit.
RateLimit float64
Version string
Logger *slog.Logger
}
Config configures the endpoint.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the /mcp endpoint.
func New ¶
New builds the endpoint. api returns sandboxd's root API handler; it is a func because /mcp is mounted on that same handler.