From 52979a1eaf8ef9093f5ae51cd1957305ad691526 Mon Sep 17 00:00:00 2001 From: Kofo Okesola Date: Thu, 26 Jun 2025 11:16:18 +0100 Subject: [PATCH] added mcp config --- apiconfig/apiconfig.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/apiconfig/apiconfig.go b/apiconfig/apiconfig.go index 9b34bd1..9e87eaa 100644 --- a/apiconfig/apiconfig.go +++ b/apiconfig/apiconfig.go @@ -17,6 +17,30 @@ type APIConfig struct { Actions map[string]Action `json:"actions" yaml:"actions"` Conditionals map[string]Conditional `json:"conditionals" yaml:"conditionals"` Responses map[string]ResponseConfig `json:"responses" yaml:"responses"` + HttpConfig HttpConfig `json:"http" yaml:"http"` + McpConfig McpConfig `json:"mcp" yaml:"mcp"` +} + +type HttpConfig struct { + ListenPath string `json:"listenPath" yaml:"listenPath"` + Method string `json:"method" yaml:"method"` + Next string `json:"next" yaml:"next"` + CORSAllowedOrigins []string `json:"corsAllowedOrigins" yaml:"corsAllowedOrigins"` +} + +type McpConfig struct { + Tools map[string]MCPToolConfig `json:"tools" yaml:"tools"` +} + +type MCPToolConfig struct { + Name string `json:"name" yaml:"name"` + Description string `json:"description" yaml:"description"` + Args map[string]ArgType `json:"args" yaml:"args"` +} + +type ArgType struct { + Name string `json:"name" yaml:"name"` + Type string `json:"type" yaml:"type"` } type RequestConfig struct {