INNER CODE UNIT · Go

init

eat-pray-ai/yutu · cmd/mcp.go:37

func init() {
	mcpCmd.Example = example
	RootCmd.AddCommand(mcpCmd)

	_ = mcpCmd.Flags().Set("host", "localhost")
	_ = mcpCmd.Flags().Set("port", "8216")
	_ = mcpCmd.Flags().MarkHidden("host")
	_ = mcpCmd.Flags().MarkHidden("port")
	_ = mcpCmd.Flags().MarkHidden("baseUrl")
	_ = mcpCmd.Flags().MarkHidden("stateless")

	mcpCmd.PreRunE = func(cmd *cobra.Command, _ []string) error {
		mode, _ := cmd.Flags().GetString("mode")
		if mode == "http" {
			mcpConfig.Auth = &cobramcp.AuthConfig{
				TokenVerifier:        auth.GoogleTokenVerifier,
				Scopes:               auth.Scopes,
				AuthorizationServers: []string{"https://accounts.google.com"},

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…