Documentation
¶
Overview ¶
Package mcpserver exposes waggle's stored traces, metrics, and logs to an MCP client (e.g. Claude). It is a thin adapter: every tool maps onto an existing store.Store read method or the internal/query builder, so there is no query logic here that the HTTP API doesn't already have.
Two transports share one set of tool handlers:
- HTTPHandler returns a Streamable-HTTP handler to mount on the running server's UI mux (the data is already live in-process).
- RunStdio serves the same tools over stdio for the `waggle mcp` subcommand, pointed at a database file directly.
All tools are read-only — the write paths on store.Store (WriteBatch, Clear, Retain) are never bound.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps the SDK server so callers never touch the SDK directly.
func (*Server) HTTPHandler ¶
HTTPHandler returns a Streamable-HTTP handler serving this server. Mount it at a fixed path (waggle uses /mcp). Every request is served by the same server instance, which is safe: the store's reader pool handles concurrency.