on main help sign in
chore:chore: add mcp disabled state
0e76c64Kujtim Hoxha
internal/config/config.go+6−5
@@ -86,11 +86,12 @@ const (
86)
86)
87
87
88type MCPConfig struct {
88type MCPConfig struct {
89− Command string `json:"command,omitempty" `
89+ Command string `json:"command,omitempty" `
90− Env []string `json:"env,omitempty"`
90+ Env []string `json:"env,omitempty"`
91− Args []string `json:"args,omitempty"`
91+ Args []string `json:"args,omitempty"`
92− Type MCPType `json:"type"`
92+ Type MCPType `json:"type"`
93− URL string `json:"url,omitempty"`
93+ URL string `json:"url,omitempty"`
94+ Disabled bool `json:"disabled,omitempty"`
94
95
95 // TODO: maybe make it possible to get the value from the env
96 // TODO: maybe make it possible to get the value from the env
96 Headers map[string]string `json:"headers,omitempty"`
97 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
188 return mcpTools
188 return mcpTools
189 }
189 }
190 for name, m := range cfg.MCP {
190 for name, m := range cfg.MCP {
191+ if m.Disabled {
192+ slog.Debug("skipping disabled mcp", "name", name)
193+ continue
194+ }
191 switch m.Type {
195 switch m.Type {
192 case config.MCPStdio:
196 case config.MCPStdio:
193 c, err := client.NewStdioMCPClient(
197 c, err := client.NewStdioMCPClient(