Documentation
¶
Overview ¶
Package middleware holds the HTTP bearer gate and the MCP audit and metrics middleware that wrap the server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Observe ¶
func Observe(logger *slog.Logger) mcp.Middleware
Observe logs every tool call with redacted arguments and records its latency and outcome. An IsError result counts as an error even though it is not a JSON-RPC failure.
func RequireBearer ¶
RequireBearer rejects requests without a bearer token. The token is not validated here; Ascender does that when tool calls land. The fingerprint in UserID activates the SDK's session-hijack guard, and the raw token rides along in Extra for tools to forward. sessionTTL bounds how long a token is trusted for the session it opened.
Types ¶
This section is empty.