Help us shape the future of Go! Take the 2026 Go Developer Survey

client

command
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 11 Imported by: 0

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); ... })

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL