Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryData ¶
BinaryData represents binary response from tools (imported from handlers)
type Config ¶
type Config struct {
Port string
ServerName string // MCP server name
ServerVersion string // MCP server version
AppName string // Application name (used to generate MCP server ID)
}
Config contains the configuration for Handler
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles the Model Context Protocol server and configuration
func NewHandler ¶
func NewHandler(config Config, toolHandlers []ToolProvider, tui TuiInterface, exitChan chan bool) *Handler
NewHandler creates a new MCP handler with minimal dependencies
func (*Handler) ConfigureIDEs ¶
func (h *Handler) ConfigureIDEs()
ConfigureIDEs automatically configures supported IDEs with this MCP server
func (*Handler) OnUIAction ¶ added in v0.0.22
OnUIAction sets the callback for generic UI actions triggered from TUI or IDE
func (*Handler) PublishLog ¶ added in v0.0.22
PublishLog publishes a log message to SSE
func (*Handler) Serve ¶
func (h *Handler) Serve()
Serve starts the Model Context Protocol server for LLM integration via HTTP
type IDEInfo ¶
type IDEInfo struct {
ID string
Name string
GetConfigDir func() (string, error)
ConfigFileName string
// IDE-specific JSON format configuration
ServersKey string // "servers" for VS Code, "mcpServers" for Antigravity
URLKey string // "url" for VS Code, "serverUrl" for Antigravity
ExtraFields map[string]any // Additional fields like "type", "autoStart"
HasInputs bool // VS Code has "inputs" array, Antigravity doesn't
SkipProfiles bool // true = single config file, no profile scanning
}
IDEInfo represents a supported IDE and its MCP configuration format
type ParameterMetadata ¶
type ParameterMetadata struct {
Name string
Description string
Required bool
Type string // "string", "number", "boolean"
EnumValues []string
Default any
}
ParameterMetadata describes a tool parameter
type ToolExecutor ¶
ToolExecutor defines how a tool should be executed Handlers implement this to provide execution logic without exposing internals args: map of parameter name to value from MCP request
type ToolMetadata ¶
type ToolMetadata struct {
Name string
Description string
Parameters []ParameterMetadata
Execute ToolExecutor // Handler provides execution function
}
ToolMetadata provides MCP tool configuration metadata This is the standard interface that all handlers should implement
type ToolProvider ¶ added in v0.0.16
type ToolProvider interface {
GetMCPToolsMetadata() []ToolMetadata
}
ToolProvider defines the interface for handlers that support MCP tools
type TuiInterface ¶
type TuiInterface interface {
RefreshUI()
}
TuiInterface defines what the MCP handler needs from the TUI