Documentation
¶
Index ¶
- type CallbackServer
- func (cs *CallbackServer) GetRedirectURI() string
- func (cs *CallbackServer) SetExpectedState(state string)
- func (cs *CallbackServer) Shutdown(ctx context.Context) error
- func (cs *CallbackServer) Start() error
- func (cs *CallbackServer) WaitForCallback(ctx context.Context) (code, state string, err error)
- type GatewayToolset
- func (t *GatewayToolset) Instructions() string
- func (t *GatewayToolset) SetElicitationHandler(handler tools.ElicitationHandler)
- func (t *GatewayToolset) SetOAuthSuccessHandler(handler func())
- func (t *GatewayToolset) Start(ctx context.Context) error
- func (t *GatewayToolset) Stop() error
- func (t *GatewayToolset) Tools(ctx context.Context) ([]tools.Tool, error)
- type InMemoryTokenStore
- type OAuthToken
- type OAuthTokenStore
- type Toolset
- func (ts *Toolset) Instructions() string
- func (ts *Toolset) SetElicitationHandler(handler tools.ElicitationHandler)
- func (ts *Toolset) SetOAuthSuccessHandler(handler func())
- func (ts *Toolset) Start(ctx context.Context) error
- func (ts *Toolset) Stop() error
- func (ts *Toolset) Tools(ctx context.Context) ([]tools.Tool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackServer ¶ added in v1.7.0
type CallbackServer struct {
// contains filtered or unexported fields
}
CallbackServer handles OAuth callback requests
func NewCallbackServer ¶ added in v1.7.0
func NewCallbackServer() (*CallbackServer, error)
NewCallbackServer creates a new OAuth callback server
func (*CallbackServer) GetRedirectURI ¶ added in v1.7.0
func (cs *CallbackServer) GetRedirectURI() string
func (*CallbackServer) SetExpectedState ¶ added in v1.7.0
func (cs *CallbackServer) SetExpectedState(state string)
func (*CallbackServer) Shutdown ¶ added in v1.7.0
func (cs *CallbackServer) Shutdown(ctx context.Context) error
func (*CallbackServer) Start ¶ added in v1.7.0
func (cs *CallbackServer) Start() error
func (*CallbackServer) WaitForCallback ¶ added in v1.7.0
func (cs *CallbackServer) WaitForCallback(ctx context.Context) (code, state string, err error)
type GatewayToolset ¶ added in v1.1.0
type GatewayToolset struct {
// contains filtered or unexported fields
}
func NewGatewayToolset ¶ added in v1.1.0
func NewGatewayToolset(mcpServerName string, config any, toolFilter []string, envProvider environment.Provider) *GatewayToolset
func (*GatewayToolset) Instructions ¶ added in v1.1.0
func (t *GatewayToolset) Instructions() string
func (*GatewayToolset) SetElicitationHandler ¶ added in v1.7.0
func (t *GatewayToolset) SetElicitationHandler(handler tools.ElicitationHandler)
func (*GatewayToolset) SetOAuthSuccessHandler ¶ added in v1.7.0
func (t *GatewayToolset) SetOAuthSuccessHandler(handler func())
func (*GatewayToolset) Start ¶ added in v1.1.0
func (t *GatewayToolset) Start(ctx context.Context) error
func (*GatewayToolset) Stop ¶ added in v1.1.0
func (t *GatewayToolset) Stop() error
type InMemoryTokenStore ¶ added in v1.7.0
type InMemoryTokenStore struct {
// contains filtered or unexported fields
}
InMemoryTokenStore implements OAuthTokenStore in memory
func (*InMemoryTokenStore) GetToken ¶ added in v1.7.0
func (s *InMemoryTokenStore) GetToken(resourceURL string) (*OAuthToken, error)
func (*InMemoryTokenStore) RemoveToken ¶ added in v1.7.0
func (s *InMemoryTokenStore) RemoveToken(resourceURL string) error
func (*InMemoryTokenStore) StoreToken ¶ added in v1.7.0
func (s *InMemoryTokenStore) StoreToken(resourceURL string, token *OAuthToken) error
type OAuthToken ¶ added in v1.7.0
type OAuthToken struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
ExpiresIn int `json:"expires_in,omitempty"`
RefreshToken string `json:"refresh_token,omitempty"`
Scope string `json:"scope,omitempty"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
}
func (*OAuthToken) IsExpired ¶ added in v1.7.0
func (t *OAuthToken) IsExpired() bool
IsExpired checks if the token is expired
type OAuthTokenStore ¶ added in v1.7.0
type OAuthTokenStore interface {
// GetToken retrieves a token for the given resource URL
GetToken(resourceURL string) (*OAuthToken, error)
// StoreToken stores a token for the given resource URL
StoreToken(resourceURL string, token *OAuthToken) error
// RemoveToken removes a token for the given resource URL
RemoveToken(resourceURL string) error
}
OAuthTokenStore manages OAuth tokens
func NewInMemoryTokenStore ¶ added in v1.7.0
func NewInMemoryTokenStore() OAuthTokenStore
NewInMemoryTokenStore creates a new in-memory token store
type Toolset ¶
type Toolset struct {
// contains filtered or unexported fields
}
Toolset represents a set of MCP tools
func NewRemoteToolset ¶ added in v1.7.0
func NewRemoteToolset(url, transport string, headers map[string]string, toolFilter []string, redirectURI string) (*Toolset, error)
NewRemoteToolset creates a new MCP toolset from a remote MCP Server.
func NewToolsetCommand ¶
NewToolsetCommand creates a new MCP toolset from a command.
func (*Toolset) Instructions ¶
func (*Toolset) SetElicitationHandler ¶ added in v1.7.0
func (ts *Toolset) SetElicitationHandler(handler tools.ElicitationHandler)
SetElicitationHandler sets the elicitation handler for remote MCP clients This allows the runtime to provide a handler that propagates elicitation requests
func (*Toolset) SetOAuthSuccessHandler ¶ added in v1.7.0
func (ts *Toolset) SetOAuthSuccessHandler(handler func())
Click to show internal directories.
Click to hide internal directories.