Documentation
¶
Overview ¶
Package mcp exposes memini over the Model Context Protocol. It is a thin adapter over the same service.Service the REST API uses, served over stdio and Streamable HTTP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPHandler ¶
HTTPHandler returns an http.Handler serving MCP over Streamable HTTP. The tenant namespace is taken from nsHeader when present, else defaultNS; tool calls may still override it per-call. The caller's personal namespace is taken from homeHeader when present — canonicalized exactly like REST's homeMiddleware so both transports resolve the same client input to the same namespace key — else "" (no home leg — unlike the namespace header there is no default and no per-call override). An invalid nsHeader or homeHeader value is rejected with 400 (matching the REST API) rather than silently falling back to the default tenant. When apiKey is non-empty, requests must present it as a bearer token — required for any remote (non-localhost) deployment.
func NewServer ¶
NewServer builds an MCP server exposing memini's memory tools. defaultNS is used whenever a tool call omits the namespace argument. home is the caller's personal namespace (X-Memini-Home / MEMINI_HOME), merged read-only into every recall/briefing/answer/remember; "" means no home leg. There is no per-call override — home is a transport-level default, fixed for the life of this server instance.
Types ¶
This section is empty.