mcptest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSavedTokenRejected = errors.New("saved token was rejected; refresh or re-authorize")

Functions

func AppendCall

func AppendCall(st *state.State, method string, res *CallResult, err error)

func IsSavedTokenRejected

func IsSavedTokenRejected(err error) bool

func ListTools

func ListTools(ctx context.Context, session *mcp.ClientSession) ([]*mcp.Tool, error)

func ServerInstructions

func ServerInstructions(session *mcp.ClientSession) string

Types

type CallResult

type CallResult struct {
	Method       string
	Summary      string
	Tools        []*mcp.Tool
	Instructions string
}

type Client

type Client struct {
	HTTPClient *http.Client
	Version    string
	Logger     *slog.Logger
}

func (*Client) Call

func (c *Client) Call(ctx context.Context, st *state.State, method string) (*CallResult, error)

func (*Client) ConnectWithHandler

func (c *Client) ConnectWithHandler(ctx context.Context, serverURL string, handler auth.OAuthHandler) (*mcp.ClientSession, error)

type StaticOAuthHandler

type StaticOAuthHandler struct {
	Token *oauth2.Token
}

func (*StaticOAuthHandler) Authorize

func (*StaticOAuthHandler) Authorize(_ context.Context, _ *http.Request, resp *http.Response) error

func (*StaticOAuthHandler) TokenSource

Jump to

Keyboard shortcuts

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