Documentation
¶
Index ¶
- Constants
- func GetTokenStore(url string) client.TokenStore
- type BaseMessage
- type Client
- func (c *Client) CallTool(ctx context.Context, toolCall tools.ToolCall) (*tools.ToolCallResult, error)
- func (c *Client) CallToolWithArgs(ctx context.Context, toolName string, args any) (*tools.ToolCallResult, error)
- func (c *Client) GetServerInfo() (serverURL, serverType string)
- func (c *Client) GetToolByName(name string) (tools.Tool, error)
- func (c *Client) ListTools(ctx context.Context, toolFilter []string) ([]tools.Tool, error)
- func (c *Client) Start(ctx context.Context) error
- func (c *Client) Stop() error
- type GatewayToolset
- type RPCResponse
- type TokenManager
- type Toolset
Constants ¶
const ENV_DOCKER_MCP_URL_PREFIX = "DOCKER_MCP_URL_"
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 Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements an MCP client for interacting with MCP servers
func NewRemoteClient ¶
func NewRemoteClient(url, transportType string, headers map[string]string, redirectURI string, tokenStore client.TokenStore) (*Client, error)
NewRemoteClient creates a new MCP client that can connect to a remote MCP server
func NewStdioClient ¶
NewStdioClient creates a new MCP client that can start an stdio MCP server
func (*Client) CallTool ¶
func (c *Client) CallTool(ctx context.Context, toolCall tools.ToolCall) (*tools.ToolCallResult, error)
CallTool calls a tool on the MCP server
func (*Client) CallToolWithArgs ¶
func (c *Client) CallToolWithArgs(ctx context.Context, toolName string, args any) (*tools.ToolCallResult, error)
CallToolWithArgs is a convenience method to call a tool with arguments
func (*Client) GetServerInfo ¶ added in v1.3.1
GetServerInfo returns server identification information
func (*Client) GetToolByName ¶
GetToolByName returns a tool by name
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
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 NewToolsetCommand ¶
NewToolsetCommand creates a new MCP toolset from a command.
func NewToolsetRemote ¶
func NewToolsetRemote(url, transport string, headers map[string]string, toolFilter []string, redirectURI string) (*Toolset, error)
NewToolsetRemote creates a new MCP toolset from a remote MCP Server.
func (*Toolset) GetServerInfo ¶ added in v1.3.1
GetServerInfo returns server identification information
func (*Toolset) Instructions ¶
Instructions returns the toolset instructions