Versions in this module Expand all Collapse all v1 v1.30.1 Mar 11, 2026 v1.30.0 Mar 9, 2026 Changes in this version + func BuildAuthorizationURL(authEndpoint, clientID, redirectURI, state, codeChallenge, resourceURL string) string + func GeneratePKCEVerifier() string + func GenerateState() (string, error) + func RegisterClient(ctx context.Context, authMetadata *AuthorizationServerMetadata, ...) (clientID, clientSecret string, err error) + func RequestAuthorizationCode(ctx context.Context, authURL string, callbackServer *CallbackServer, ...) (string, string, error) + type AuthorizationServerMetadata struct + AuthorizationEndpoint string + CodeChallengeMethodsSupported []string + GrantTypesSupported []string + IntrospectionEndpoint string + Issuer string + JwksURI string + RegistrationEndpoint string + ResponseModesSupported []string + ResponseTypesSupported []string + RevocationEndpoint string + RevocationEndpointAuthMethodsSupported []string + ScopesSupported []string + TokenEndpoint string + TokenEndpointAuthMethodsSupported []string + type CallbackServer struct + func NewCallbackServer() (*CallbackServer, error) + 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 struct + func NewGatewayToolset(ctx context.Context, name, mcpServerName string, config any, ...) (*GatewayToolset, error) + func (t *GatewayToolset) Stop(ctx context.Context) error + type InMemoryTokenStore struct + func (s *InMemoryTokenStore) GetToken(resourceURL string) (*OAuthToken, error) + func (s *InMemoryTokenStore) RemoveToken(resourceURL string) error + func (s *InMemoryTokenStore) StoreToken(resourceURL string, token *OAuthToken) error + type OAuthToken struct + AccessToken string + ExpiresAt time.Time + ExpiresIn int + RefreshToken string + Scope string + TokenType string + func ExchangeCodeForToken(ctx context.Context, ...) (*OAuthToken, error) + func (t *OAuthToken) IsExpired() bool + type OAuthTokenStore interface + GetToken func(resourceURL string) (*OAuthToken, error) + RemoveToken func(resourceURL string) error + StoreToken func(resourceURL string, token *OAuthToken) error + func NewInMemoryTokenStore() OAuthTokenStore + type PromptArgument struct + Description string + Name string + Required bool + type PromptInfo struct + Arguments []PromptArgument + Description string + Name string + type Toolset struct + func NewRemoteToolset(name, urlString, transport string, headers map[string]string) *Toolset + func NewToolsetCommand(name, command string, args, env []string, cwd string) *Toolset + func (ts *Toolset) Describe() string + func (ts *Toolset) GetPrompt(ctx context.Context, name string, arguments map[string]string) (*mcp.GetPromptResult, error) + func (ts *Toolset) Instructions() string + func (ts *Toolset) ListPrompts(ctx context.Context) ([]PromptInfo, error) + func (ts *Toolset) SetElicitationHandler(handler tools.ElicitationHandler) + func (ts *Toolset) SetManagedOAuth(managed bool) + func (ts *Toolset) SetOAuthSuccessHandler(handler func()) + func (ts *Toolset) SetToolsChangedHandler(handler func()) + func (ts *Toolset) Start(ctx context.Context) error + func (ts *Toolset) Stop(ctx context.Context) error + func (ts *Toolset) Tools(ctx context.Context) ([]tools.Tool, error)