Documentation
¶
Overview ¶
Package mcpserver exposes Billet's tool surface as an MCP server over Streamable HTTP: the save_memory and search_memory tools Stirrup's harness calls directly (docs/DECISIONS.md, "two transports"). The tool semantics live in internal/service; this package owns only the MCP protocol adaptation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version = "dev"
Version is the Billet build version reported in the MCP Implementation handshake. Overridable at link time (-ldflags -X); "dev" otherwise.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server adapts a service.Service to the MCP save_memory/search_memory tool surface. Validation, budget gating, and the generic error policy all live in the service, shared with the RPC transport.
func (*Server) Handler ¶
Handler returns the http.Handler serving Billet's MCP endpoint: the Streamable HTTP transport, stateless and JSON-only.
Stirrup's actual MCP client (harness/internal/mcp/client.go) sends no Accept header and never issues an "initialize" call before tools/list — it is a minimal, non-fully-compliant Streamable HTTP client, not the reference client the SDK expects. Stateless mode tolerates the missing initialize handshake (it synthesizes default session state per request); JSONResponse avoids SSE framing the client cannot parse (it does a raw json.Unmarshal of the response body); and acceptAnyMediaType supplies the Accept header the client omits, which the SDK otherwise requires and rejects with 400 when absent. All three were verified empirically against github.com/modelcontextprotocol/go-sdk v1.7.0 (docs/DECISIONS.md).