mcp

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTokenStore added in v1.3.1

func GetTokenStore(url string) client.TokenStore

GetTokenStore returns the tokenStore instance for the given URL

Types

type BaseMessage

type BaseMessage struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      *int64          `json:"id,omitempty"`
	Method  string          `json:"method,omitempty"`
	Result  json.RawMessage `json:"result,omitempty"`
	Error   *struct {
		Code    int    `json:"code"`
		Message string `json:"message"`
	} `json:"error,omitempty"`
}

type GatewayToolset added in v1.0.7

type GatewayToolset struct {
	// contains filtered or unexported fields
}

func NewGatewayToolset added in v1.0.7

func NewGatewayToolset(mcpServerName string, config any, toolFilter []string, envProvider environment.Provider) *GatewayToolset

func (*GatewayToolset) Instructions added in v1.0.7

func (t *GatewayToolset) Instructions() string

func (*GatewayToolset) Start added in v1.0.7

func (t *GatewayToolset) Start(ctx context.Context) error

func (*GatewayToolset) Stop added in v1.0.7

func (t *GatewayToolset) Stop() error

func (*GatewayToolset) Tools added in v1.0.7

func (t *GatewayToolset) Tools(ctx context.Context) ([]tools.Tool, error)

type RPCResponse

type RPCResponse struct {
	Error    *string
	Response *json.RawMessage
}

type TokenManager added in v1.3.1

type TokenManager struct {
	// contains filtered or unexported fields
}

TokenManager manages token stores per URL

func (*TokenManager) GetTokenStoreForServer added in v1.3.1

func (m *TokenManager) GetTokenStoreForServer(url string) client.TokenStore

GetTokenStoreForServer returns a token store for the given URL, creating it if necessary

type Toolset

type Toolset struct {
	// contains filtered or unexported fields
}

Toolset represents a set of MCP tools

func NewRemoteToolset added in v1.6.3

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

func NewToolsetCommand(command string, args, env, toolFilter []string) *Toolset

NewToolsetCommand creates a new MCP toolset from a command.

func (*Toolset) Instructions

func (ts *Toolset) Instructions() string

func (*Toolset) Start

func (ts *Toolset) Start(ctx context.Context) error

func (*Toolset) Stop

func (ts *Toolset) Stop() error

func (*Toolset) Tools

func (ts *Toolset) Tools(ctx context.Context) ([]tools.Tool, error)

Jump to

Keyboard shortcuts

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