Attach mcp stdio box to agent

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-04-22 23:07:54 +02:00
committed by mudler
parent 02490ea8a2
commit 6d9c58e6c0
4 changed files with 125 additions and 56 deletions

View File

@@ -50,7 +50,9 @@ type options struct {
conversationsPath string
mcpServers []MCPServer
mcpServers []MCPServer
mcpStdioServers []MCPSTDIOServer
mcpBoxURL string
newConversationsSubscribers []func(openai.ChatCompletionMessage)
@@ -207,6 +209,20 @@ func WithMCPServers(servers ...MCPServer) Option {
}
}
func WithMCPSTDIOServers(servers ...MCPSTDIOServer) Option {
return func(o *options) error {
o.mcpStdioServers = servers
return nil
}
}
func WithMCPBoxURL(url string) Option {
return func(o *options) error {
o.mcpBoxURL = url
return nil
}
}
func WithLLMAPIURL(url string) Option {
return func(o *options) error {
o.LLMAPI.APIURL = url