feat: chat with mcp tools

This commit is contained in:
lilong.129
2025-05-16 23:05:40 +08:00
parent a58ccffb28
commit a4cff1c98a
13 changed files with 544 additions and 124 deletions
+2
View File
@@ -14,6 +14,7 @@ const (
// MCPConfig represents the configuration for MCP servers
type MCPConfig struct {
ConfigPath string `json:"-"`
MCPServers map[string]ServerConfigWrapper `json:"mcpServers"`
}
@@ -120,6 +121,7 @@ func LoadMCPConfig(configPath string) (*MCPConfig, error) {
if err := json.Unmarshal(configData, &config); err != nil {
return nil, fmt.Errorf("error parsing config file: %w", err)
}
config.ConfigPath = configPath
return &config, nil
}