Documentation
¶
Overview ¶
Package mcpclient owns remote MCP discovery and invocation. It deliberately returns protocol-native JSON for tool results; the agent runtime separately derives model-facing and public projections.
Index ¶
- func IsAuthenticationError(err error) bool
- type AuthError
- type AuthSource
- type AuthenticatedClient
- type AuthenticatedRedirectError
- type BearerCredential
- type Client
- type Remote
- func (r *Remote) Call(ctx context.Context, server domain.MCPServer, toolName string, ...) (Result, error)
- func (r *Remote) CallAuthenticated(ctx context.Context, sessionID string, server domain.MCPServer, ...) (Result, error)
- func (r *Remote) Discover(ctx context.Context, server domain.MCPServer) ([]Tool, error)
- func (r *Remote) DiscoverAuthenticated(ctx context.Context, sessionID string, server domain.MCPServer, ...) ([]Tool, error)
- func (r *Remote) ValidateBearer(ctx context.Context, mcpServerURL string, bearer string) (credentialruntime.MCPProbeResult, error)
- type Result
- type Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAuthenticationError ¶
Types ¶
type AuthSource ¶
type AuthSource = credentialruntime.AuthSource
type AuthenticatedClient ¶
type AuthenticatedClient interface {
DiscoverAuthenticated(context.Context, string, domain.MCPServer, AuthSource) ([]Tool, error)
CallAuthenticated(context.Context, string, domain.MCPServer, string, map[string]any, AuthSource) (Result, error)
}
AuthenticatedClient is the optional authenticated extension used by the Temporal runtime. Keeping it separate preserves small test/client adapters.
type AuthenticatedRedirectError ¶
AuthenticatedRedirectError prevents a bearer token and a replayable MCP request body from crossing an origin boundary.
func (*AuthenticatedRedirectError) Error ¶
func (e *AuthenticatedRedirectError) Error() string
type BearerCredential ¶
type BearerCredential = credentialruntime.BearerCredential
type Remote ¶
type Remote struct {
// contains filtered or unexported fields
}
func (*Remote) CallAuthenticated ¶
func (*Remote) DiscoverAuthenticated ¶
func (*Remote) ValidateBearer ¶
func (r *Remote) ValidateBearer( ctx context.Context, mcpServerURL string, bearer string, ) (credentialruntime.MCPProbeResult, error)
ValidateBearer performs the same initialize and tools/list handshake used by runtime discovery while retaining a bounded, scrubbed projection of the response that failed. It never returns the bearer in a result or error.
type Result ¶
type Result struct {
Raw json.RawMessage
IsError bool
}