mcpclient

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package mcpclient runs real viant/mcp client/server transport tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t testing.TB, service dserver.ServerService, protocolVersion string) *client.Client

New starts an ephemeral loopback MCP server and initializes the native client. Test cleanup owns transport, listener, server and context shutdown.

func SkillFile

func SkillFile(t testing.TB, native *client.Client, skill schema.Skill, uri string) []byte

SkillFile verifies one on-demand read; listing never calls it implicitly.

func Stdio

func Stdio(t testing.TB, binary string, args ...string) *client.Client

Stdio starts a trusted fixture binary using the native MCP client (no shell).

Types

type Config

type Config struct {
	ResourceAuthorizer auth.ResourceAuthorizer
	Service            dserver.ServerService
	Source             dserver.Source
	ProtocolVersion    string
}

Config selects a fixed service or a generation source for native wire tests.

func (Config) New

func (c Config) New(t testing.TB) *client.Client

type StdioConfig

type StdioConfig struct {
	Binary          string
	Args            []string
	ProtocolVersion string
}

func (StdioConfig) New

func (c StdioConfig) New(t testing.TB) *client.Client

Jump to

Keyboard shortcuts

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