Documentation
¶
Index ¶
- type Capabilities
- type Config
- type Configuration
- type Configurator
- type FileBasedConfiguration
- type Gateway
- func (g *Gateway) GetSessionCache(ss *mcp.ServerSession) *ServerSessionCache
- func (g *Gateway) ListRoots(ctx context.Context, ss *mcp.ServerSession)
- func (g *Gateway) RefreshCapabilities(ctx context.Context, server *mcp.Server, serverSession *mcp.ServerSession) error
- func (g *Gateway) RemoveSessionCache(ss *mcp.ServerSession)
- func (g *Gateway) Run(ctx context.Context) error
- type Options
- type PromptRegistration
- type ResourceRegistration
- type ResourceTemplateRegistration
- type ServerSessionCache
- type ToolRegistration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct {
Tools []ToolRegistration
Prompts []PromptRegistration
Resources []ResourceRegistration
ResourceTemplates []ResourceTemplateRegistration
}
func (*Capabilities) PromptNames ¶
func (c *Capabilities) PromptNames() []string
func (*Capabilities) ToolNames ¶
func (c *Capabilities) ToolNames() []string
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
func (*Configuration) DockerImages ¶
func (c *Configuration) DockerImages() []string
func (*Configuration) Find ¶
func (c *Configuration) Find(serverName string) (*catalog.ServerConfig, *map[string]catalog.Tool, bool)
func (*Configuration) ServerNames ¶
func (c *Configuration) ServerNames() []string
type Configurator ¶
type Configurator interface {
Read(ctx context.Context) (Configuration, chan Configuration, func() error, error)
}
type FileBasedConfiguration ¶
type FileBasedConfiguration struct {
CatalogPath []string
ServerNames []string // Takes precedence over the RegistryPath
RegistryPath []string
ConfigPath []string
ToolsPath []string
SecretsPath string // Optional, if not set, use Docker Desktop's secrets API
Watch bool
Central bool
// contains filtered or unexported fields
}
func (*FileBasedConfiguration) Read ¶
func (c *FileBasedConfiguration) Read(ctx context.Context) (Configuration, chan Configuration, func() error, error)
type Gateway ¶
type Gateway struct {
Options
// contains filtered or unexported fields
}
func (*Gateway) GetSessionCache ¶ added in v0.14.0
func (g *Gateway) GetSessionCache(ss *mcp.ServerSession) *ServerSessionCache
GetSessionCache returns the cached information for a server session
func (*Gateway) ListRoots ¶ added in v0.14.0
func (g *Gateway) ListRoots(ctx context.Context, ss *mcp.ServerSession)
ListRoots checks if client supports Roots, gets them, and caches the result
func (*Gateway) RefreshCapabilities ¶ added in v0.17.0
func (g *Gateway) RefreshCapabilities(ctx context.Context, server *mcp.Server, serverSession *mcp.ServerSession) error
RefreshCapabilities implements the CapabilityRefresher interface This method updates the server's capabilities by reloading the configuration
func (*Gateway) RemoveSessionCache ¶ added in v0.14.0
func (g *Gateway) RemoveSessionCache(ss *mcp.ServerSession)
RemoveSessionCache removes the cached information for a server session
type Options ¶
type Options struct {
Port int
Transport string
ToolNames []string
Interceptors []string
Verbose bool
LongLived bool
DebugDNS bool
LogCalls bool
BlockSecrets bool
BlockNetwork bool
VerifySignatures bool
DryRun bool
Watch bool
Cpus int
Memory string
Static bool
Central bool
OAuthInterceptorEnabled bool
}
type PromptRegistration ¶ added in v0.14.0
type PromptRegistration struct {
Prompt *mcp.Prompt
Handler mcp.PromptHandler
}
type ResourceRegistration ¶ added in v0.14.0
type ResourceRegistration struct {
Resource *mcp.Resource
Handler mcp.ResourceHandler
}
type ResourceTemplateRegistration ¶ added in v0.14.0
type ResourceTemplateRegistration struct {
ResourceTemplate mcp.ResourceTemplate
Handler mcp.ResourceHandler
}
type ServerSessionCache ¶ added in v0.14.0
type ToolRegistration ¶ added in v0.14.0
type ToolRegistration struct {
Tool *mcp.Tool
Handler mcp.ToolHandler
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.