Documentation
¶
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 is the lesstruct-mcp MCP server: a stdio JSON-RPC front over the shared /api/v1 client. Build it with New, serve it with Run.
func New ¶
New builds a Server targeting baseURL with apiKey and reports version in the MCP handshake. The key is resolved by the caller (flag → env → config file); the client validates the base URL shape. Every tool group registers here, so a new group is one register call plus its tools_*.go file.
func NewWithClient ¶
NewWithClient builds a Server over an existing /api/v1 client. The HTTP front-end uses this to bind each request's API key to its own in-process client; New is the flag/env/config specialization.
func (*Server) Connect ¶
Connect attaches the tool surface to one client session over t and returns the session. Run is the stdio specialization; Connect is the seam the tests drive with in-memory transports (and any future HTTP transport would share).