on main help sign in
chore:chore: add mcp disabled state
commit0e76c64c5829dc8b721ad2e4339b235f136b3b18 authorKujtim Hoxha <kujtimii.h@gmail.com> dateTue 8 Jul 2025, 14:20 (1 year ago) parent8e5abb9
2 files changed+10−5
internal/config/config.go+6−5 internal/llm/agent/mcp-tools.go+4
internal/config/config.go+6−5
@@ -86,11 +86,12 @@ const (
8686)
8787
8888type MCPConfig struct {
89− Command string `json:"command,omitempty" `
90− Env []string `json:"env,omitempty"`
91− Args []string `json:"args,omitempty"`
92− Type MCPType `json:"type"`
93− URL string `json:"url,omitempty"`
89+ Command string `json:"command,omitempty" `
90+ Env []string `json:"env,omitempty"`
91+ Args []string `json:"args,omitempty"`
92+ Type MCPType `json:"type"`
93+ URL string `json:"url,omitempty"`
94+ Disabled bool `json:"disabled,omitempty"`
9495
9596 // TODO: maybe make it possible to get the value from the env
9697 Headers map[string]string `json:"headers,omitempty"`
internal/llm/agent/mcp-tools.go+4
@@ -188,6 +188,10 @@ func GetMcpTools(ctx context.Context, permissions permission.Service, cfg *confi
188188 return mcpTools
189189 }
190190 for name, m := range cfg.MCP {
191+ if m.Disabled {
192+ slog.Debug("skipping disabled mcp", "name", name)
193+ continue
194+ }
191195 switch m.Type {
192196 case config.MCPStdio:
193197 c, err := client.NewStdioMCPClient(