Documentation
¶
Index ¶
- Constants
- Variables
- func NewDefangMCPServer(version string, client MCPClient, cli agentTools.CLIInterface, ...) (*server.MCPServer, error)
- func NewMCPElicitationsController(server *server.MCPServer) *mcpElicitationsController
- func SelectMCPclients() ([]string, error)
- func SetupClient(clientStr string) error
- func SetupKnowledgeBase() error
- func ValidClientStrings() []string
- type ClientInfo
- type MCPClient
- type MCPServerConfig
- type StackConfig
- type ToolTracker
Constants ¶
View Source
const DocumentationEndpoint = "data"
Variables ¶
View Source
var AskDefangBaseURL = "https://ask.defang.io"
AskDefangBaseURL is a var so tests can override it
View Source
var KnowledgeBaseDir = client.StateDir
View Source
var ValidClients = append( []MCPClient{ MCPClientClaudeCode, MCPClientClaudeDesktop, MCPClientCodex, MCPClientCursor, MCPClientKiro, MCPClientRovo, MCPClientWindsurf, }, ValidVSCodeClients..., )
ValidClients is a list of supported MCP clients
View Source
var ValidVSCodeClients = []MCPClient{ MCPClientVSCode, MCPClientVSCodeCodespaces, MCPClientVSCodeInsiders, }
ValidVSCodeClients is a list of supported VSCode MCP clients with shorthand names
Functions ¶
func NewDefangMCPServer ¶
func NewDefangMCPServer(version string, client MCPClient, cli agentTools.CLIInterface, config StackConfig) (*server.MCPServer, error)
NewDefangMCPServer returns a new MCPServer instance with all resources, tools registered.
func SelectMCPclients ¶
SelectMCPclients prompts the user to select one or more MCP clients
func SetupClient ¶
func SetupKnowledgeBase ¶
func SetupKnowledgeBase() error
func ValidClientStrings ¶
func ValidClientStrings() []string
ValidClientStrings converts ValidClients to []string for survey options
Types ¶
type ClientInfo ¶
type ClientInfo struct {
// contains filtered or unexported fields
}
ClientInfo defines where each client stores its MCP configuration
type MCPClient ¶
type MCPClient string
MCPClient represents the supported MCP clients as an enum
const ( MCPClientClaudeCode MCPClient = "claude-code" MCPClientClaudeDesktop MCPClient = "claude-desktop" MCPClientCodex MCPClient = "codex" MCPClientCursor MCPClient = "cursor" MCPClientKiro MCPClient = "kiro" MCPClientRovo MCPClient = "rovo" MCPClientUnspecified MCPClient = "" MCPClientVSCode MCPClient = "vscode" MCPClientVSCodeCodespaces MCPClient = "vscode-codespaces" MCPClientVSCodeInsiders MCPClient = "vscode-insiders" MCPClientWindsurf MCPClient = "windsurf" )
func ParseMCPClient ¶
ParseMCPClient parses and validates the MCP client string
type MCPServerConfig ¶
type MCPServerConfig struct {
Command string `json:"command,omitempty" toml:"command,omitempty"`
Args []string `json:"args,omitempty" toml:"args,omitempty"`
Type string `json:"type,omitempty" toml:"type,omitempty"`
URL string `json:"url,omitempty" toml:"url,omitempty"`
Env map[string]string `json:"env,omitempty" toml:"env,omitempty"`
EnvFile string `json:"envFile,omitempty" toml:"envFile,omitempty"`
Headers map[string]string `json:"headers,omitempty" toml:"headers,omitempty"`
}
MCPServerConfig represents the configuration for an MCP server
type StackConfig ¶
type StackConfig = tools.StackConfig
type ToolTracker ¶
type ToolTracker struct {
// contains filtered or unexported fields
}
func (*ToolTracker) TrackTool ¶
func (t *ToolTracker) TrackTool(name string, handler server.ToolHandlerFunc) server.ToolHandlerFunc
Click to show internal directories.
Click to hide internal directories.
