Documentation
¶
Index ¶
- Variables
- type Client
- type Config
- type Local
- func (l *Local) Client(server ServerConfig, clientOpts ...nmcp.ClientOption) (*Client, error)
- func (l *Local) Close() error
- func (l *Local) Load(ctx context.Context, tool types.Tool) (result []types.Tool, _ error)
- func (l *Local) LoadTools(ctx context.Context, server ServerConfig, serverName, toolName string) ([]types.Tool, error)
- func (l *Local) Run(ctx engine.Context, _ chan<- types.CompletionStatus, tool types.Tool, ...) (string, error)
- func (l *Local) ShutdownServer(server ServerConfig) error
- type ServerConfig
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultLoader = &Local{} DefaultRunner = DefaultLoader )
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) Capabilities ¶
func (c *Client) Capabilities() nmcp.ServerCapabilities
type Config ¶
type Config struct {
MCPServers map[string]ServerConfig `json:"mcpServers"`
}
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
func (*Local) Client ¶
func (l *Local) Client(server ServerConfig, clientOpts ...nmcp.ClientOption) (*Client, error)
func (*Local) ShutdownServer ¶
func (l *Local) ShutdownServer(server ServerConfig) error
type ServerConfig ¶
type ServerConfig struct {
DisableInstruction bool `json:"disableInstruction"`
Command string `json:"command"`
Args []string `json:"args"`
Env []string `json:"env"`
Server string `json:"server"`
URL string `json:"url"`
BaseURL string `json:"baseURL,omitempty"`
Headers []string `json:"headers"`
Scope string `json:"scope"`
AllowedTools []string `json:"allowedTools"`
}
ServerConfig represents an MCP server configuration for tools calls. It is important that this type doesn't have any maps.
func (*ServerConfig) GetBaseURL ¶
func (s *ServerConfig) GetBaseURL() string
Click to show internal directories.
Click to hide internal directories.