Documentation
¶
Index ¶
- type Handler
- func (h *Handler) CallTool(c *gin.Context)
- func (h *Handler) CheckSource(c *gin.Context)
- func (h *Handler) CreateSource(c *gin.Context)
- func (h *Handler) DeleteProfile(c *gin.Context)
- func (h *Handler) DeleteSource(c *gin.Context)
- func (h *Handler) GetCatalog(c *gin.Context)
- func (h *Handler) GetLocalHandler() *local.Handler
- func (h *Handler) GetMCPRuntimeConfig(c *gin.Context)
- func (h *Handler) GetRouting(c *gin.Context)
- func (h *Handler) GetTransportHandler() *local.TransportHandler
- func (h *Handler) IsMCPEnabled() bool
- func (h *Handler) ListProfiles(c *gin.Context)
- func (h *Handler) PatchSource(c *gin.Context)
- func (h *Handler) ProbeClient(c *gin.Context)
- func (h *Handler) ReconnectSource(c *gin.Context)
- func (h *Handler) RegisterRoutes(rt *module.Routes)
- func (h *Handler) SaveProfile(c *gin.Context)
- func (h *Handler) SetMCPRuntimeConfig(c *gin.Context)
- type MCPCatalogResponse
- type MCPClientProbeRequest
- type MCPClientProbeResponse
- type MCPProfilesResponse
- type MCPRoutingResponse
- type MCPRuntimeConfigRequest
- type MCPRuntimeConfigResponse
- type MCPSourceStatusResponse
- type MCPToolCallRequest
- type MCPToolCallResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles MCP configuration HTTP requests
func NewHandler ¶
func NewHandler(cfg *config.Config, rt ...*mcpruntime.Runtime) *Handler
NewHandler creates a new MCP handler. rt is an optional shared Runtime; when provided (e.g. from the main server) it is reused so the transport handler sees already-connected sources and registered builtins. When nil (e.g. in openapi/CLI mode) a fresh runtime is created from config.
func (*Handler) CheckSource ¶ added in v1.261026.0
func (*Handler) CreateSource ¶ added in v1.261026.0
func (*Handler) DeleteProfile ¶ added in v1.261026.0
func (*Handler) DeleteSource ¶ added in v1.261026.0
func (*Handler) GetCatalog ¶ added in v1.261026.0
func (*Handler) GetLocalHandler ¶ added in v0.260414.2000
GetLocalHandler returns the local mode handler
func (*Handler) GetMCPRuntimeConfig ¶
GetMCPRuntimeConfig returns the global MCP runtime configuration
func (*Handler) GetRouting ¶ added in v1.261026.0
func (*Handler) GetTransportHandler ¶ added in v0.260414.2000
func (h *Handler) GetTransportHandler() *local.TransportHandler
GetTransportHandler returns the transport handler for local mode
func (*Handler) IsMCPEnabled ¶ added in v0.260414.2000
IsMCPEnabled checks if MCP feature is enabled via scenario flag
func (*Handler) ListProfiles ¶ added in v1.261026.0
func (*Handler) PatchSource ¶ added in v1.261026.0
func (*Handler) ProbeClient ¶ added in v1.261026.0
func (*Handler) ReconnectSource ¶ added in v1.261026.0
func (*Handler) RegisterRoutes ¶ added in v1.261002.1
func (*Handler) SaveProfile ¶ added in v1.261026.0
func (*Handler) SetMCPRuntimeConfig ¶
SetMCPRuntimeConfig sets the global MCP runtime configuration
type MCPCatalogResponse ¶ added in v1.261026.0
type MCPCatalogResponse struct {
Success bool `json:"success"`
Enabled bool `json:"enabled"`
Sources []mcpruntime.SourceStatus `json:"sources"`
Error string `json:"error,omitempty"`
}
type MCPClientProbeRequest ¶ added in v1.261026.0
type MCPClientProbeRequest struct {
ToolName string `json:"tool_name,omitempty"`
Arguments map[string]any `json:"arguments,omitempty"`
}
MCPClientProbeRequest traverses the production MCP HTTP endpoint. An empty tool name checks initialize + tools/list only; a named tool also performs call.
type MCPClientProbeResponse ¶ added in v1.261026.0
type MCPProfilesResponse ¶ added in v1.261026.0
type MCPProfilesResponse struct {
Success bool `json:"success"`
Profiles []typ.MCPProfile `json:"profiles"`
Error string `json:"error,omitempty"`
}
type MCPRoutingResponse ¶ added in v1.261026.0
type MCPRoutingResponse struct {
Success bool `json:"success"`
Enabled bool `json:"enabled"`
Routing mcpruntime.RoutingSnapshot `json:"routing"`
Error string `json:"error,omitempty"`
}
type MCPRuntimeConfigRequest ¶
type MCPRuntimeConfigRequest struct {
Sources []typ.MCPSourceConfig `json:"sources,omitempty"`
RequestTimeout *int `json:"request_timeout,omitempty"` // seconds, default: 30
StripDisabledMCPTools *bool `json:"strip_disabled_mcp_tools,omitempty"` // dangerous: strip disabled MCP declarations/tool_calls
}
MCPRuntimeConfigRequest is the API request for setting MCP runtime config
type MCPRuntimeConfigResponse ¶
type MCPRuntimeConfigResponse struct {
Success bool `json:"success"`
Enabled bool `json:"enabled"`
Config *typ.MCPRuntimeConfig `json:"config,omitempty"`
Error string `json:"error,omitempty"`
}
MCPRuntimeConfigResponse is the API response for MCP runtime config
type MCPSourceStatusResponse ¶ added in v1.261026.0
type MCPSourceStatusResponse struct {
Success bool `json:"success"`
Status mcpruntime.SourceStatus `json:"status"`
Error string `json:"error,omitempty"`
}
type MCPToolCallRequest ¶ added in v1.261026.0
type MCPToolCallResponse ¶ added in v1.261026.0
type MCPToolCallResponse struct {
Success bool `json:"success"`
Result *coretool.ToolResult `json:"result,omitempty"`
ExecutionTime int64 `json:"execution_time"`
Error string `json:"error,omitempty"`
}