Documentation
¶
Overview ¶
Command client consumes MCP servers as weft tools: it connects two in-memory servers concurrently under one deadline, imports their tools with per-server prefixes, registers them on a scripted agent, runs it, and prints the manifest — the imported tools' raw schemas show in it. Swap the in-memory transports for real ones (stdio, HTTP) and nothing else changes.
The connection fan-in here uses a WaitGroup and a shared deadline because this module imports only the core, the SDK, and stdlib; in your own code an errgroup with context is the one-liner shape:
g, ctx := errgroup.WithContext(ctx)
// g.Go(func() error { sess, err := client.Connect(ctx, t, nil); ... })
Click to show internal directories.
Click to hide internal directories.