diff --git a/cmd/mcp/main.go b/cmd/mcp/main.go index b4bbd83..67b3477 100644 --- a/cmd/mcp/main.go +++ b/cmd/mcp/main.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "os" + "path/filepath" "github.com/spf13/cobra" ) @@ -18,7 +19,11 @@ func main() { Use: "mcp", Short: "Metacircular Control Plane CLI", } - root.PersistentFlags().StringVarP(&cfgPath, "config", "c", "", "config file path") + defaultCfg := "" + if home, err := os.UserHomeDir(); err == nil { + defaultCfg = filepath.Join(home, ".config", "mcp", "mcp.toml") + } + root.PersistentFlags().StringVarP(&cfgPath, "config", "c", defaultCfg, "config file path") root.AddCommand(&cobra.Command{ Use: "version",