From 5840c6bb829329e0678c83160691bb79691264ad Mon Sep 17 00:00:00 2001 From: tommaso-moro Date: Wed, 26 Aug 2026 14:42:09 +0100 Subject: [PATCH 1/2] fix(cli): register tool search command Wire the documented tool-search subcommand to the existing discovery engine and configured inventory. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- cmd/github-mcp-server/tool_search.go | 177 ++++++++++++++++++ cmd/github-mcp-server/tool_search_test.go | 118 ++++++++++++ go.mod | 3 + go.sum | 9 + third-party-licenses.darwin.md | 3 + third-party-licenses.linux.md | 3 + third-party-licenses.windows.md | 3 + third-party/github.com/fatih/color/LICENSE.md | 20 ++ .../github.com/mattn/go-colorable/LICENSE | 21 +++ .../github.com/mattn/go-isatty/LICENSE | 9 + 10 files changed, 366 insertions(+) create mode 100644 cmd/github-mcp-server/tool_search.go create mode 100644 cmd/github-mcp-server/tool_search_test.go create mode 100644 third-party/github.com/fatih/color/LICENSE.md create mode 100644 third-party/github.com/mattn/go-colorable/LICENSE create mode 100644 third-party/github.com/mattn/go-isatty/LICENSE diff --git a/cmd/github-mcp-server/tool_search.go b/cmd/github-mcp-server/tool_search.go new file mode 100644 index 0000000000..667956fbd5 --- /dev/null +++ b/cmd/github-mcp-server/tool_search.go @@ -0,0 +1,177 @@ +package main + +import ( + "context" + "fmt" + "io" + "strings" + + "github.com/fatih/color" + "github.com/github/github-mcp-server/pkg/github" + "github.com/github/github-mcp-server/pkg/tooldiscovery" + "github.com/github/github-mcp-server/pkg/translations" + "github.com/github/github-mcp-server/pkg/utils" + "github.com/modelcontextprotocol/go-sdk/mcp" + "github.com/spf13/cobra" + "github.com/spf13/viper" +) + +type toolSearchConfig struct { + enabledToolsets []string + enabledTools []string + excludedTools []string + enabledFeatures []string + host string + readOnly bool + insiders bool +} + +var toolSearchCmd = &cobra.Command{ + Use: "tool-search ", + Short: "Search enabled tools", + Long: "Search enabled tools by name, description, and input parameter names.", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + maxResults, err := cmd.Flags().GetInt("max-results") + if err != nil { + return fmt.Errorf("failed to read max-results: %w", err) + } + if maxResults < 1 { + return fmt.Errorf("max-results must be greater than zero") + } + + return runToolSearch(cmd.Context(), cmd.OutOrStdout(), args[0], maxResults) + }, +} + +func init() { + toolSearchCmd.Flags().Int("max-results", tooldiscovery.DefaultMaxSearchResults, "Maximum number of matching tools to return") + rootCmd.AddCommand(toolSearchCmd) +} + +func runToolSearch(ctx context.Context, output io.Writer, query string, maxResults int) error { + cfg, err := loadToolSearchConfig() + if err != nil { + return err + } + + translator, _ := translations.TranslationHelper() + results, err := searchConfiguredTools(ctx, query, maxResults, cfg, translator) + if err != nil { + return err + } + + return writeToolSearchResults(output, results) +} + +func loadToolSearchConfig() (toolSearchConfig, error) { + enabledToolsets, err := toolSearchStringSlice("toolsets") + if err != nil { + return toolSearchConfig{}, err + } + enabledTools, err := toolSearchStringSlice("tools") + if err != nil { + return toolSearchConfig{}, err + } + excludedTools, err := toolSearchStringSlice("exclude_tools") + if err != nil { + return toolSearchConfig{}, err + } + enabledFeatures, err := toolSearchStringSlice("features") + if err != nil { + return toolSearchConfig{}, err + } + + return toolSearchConfig{ + enabledToolsets: enabledToolsets, + enabledTools: enabledTools, + excludedTools: excludedTools, + enabledFeatures: enabledFeatures, + host: viper.GetString("host"), + readOnly: viper.GetBool("read-only"), + insiders: viper.GetBool("insiders"), + }, nil +} + +func toolSearchStringSlice(key string) ([]string, error) { + if !viper.IsSet(key) { + return nil, nil + } + + var values []string + if err := viper.UnmarshalKey(key, &values); err != nil { + return nil, fmt.Errorf("failed to unmarshal %s: %w", strings.ReplaceAll(key, "_", "-"), err) + } + return values, nil +} + +func searchConfiguredTools( + ctx context.Context, + query string, + maxResults int, + cfg toolSearchConfig, + translator translations.TranslationHelperFunc, +) ([]tooldiscovery.SearchResult, error) { + hostType, err := utils.ParseHostType(cfg.host) + if err != nil { + return nil, fmt.Errorf("failed to classify API host: %w", err) + } + + enabledFeatures := github.ResolveFeatureFlags(cfg.enabledFeatures, cfg.insiders) + inventoryBuilder := github.NewInventory(translator, github.WithHost(hostType)). + WithDeprecatedAliases(github.DeprecatedToolAliases). + WithReadOnly(cfg.readOnly). + WithToolsets(github.ResolvedEnabledToolsets(cfg.enabledToolsets, cfg.enabledTools)). + WithTools(github.CleanTools(cfg.enabledTools)). + WithExcludeTools(cfg.excludedTools). + WithFeatureChecker(func(_ context.Context, flagName string) (bool, error) { + return enabledFeatures[flagName], nil + }) + + inv, err := inventoryBuilder.Build() + if err != nil { + return nil, fmt.Errorf("failed to build inventory: %w", err) + } + + serverTools := inv.AvailableTools(ctx) + tools := make([]mcp.Tool, len(serverTools)) + for i, serverTool := range serverTools { + tools[i] = serverTool.Tool + } + + results, err := tooldiscovery.SearchTools(tools, query, tooldiscovery.SearchOptions{MaxResults: maxResults}) + if err != nil { + return nil, fmt.Errorf("failed to search tools: %w", err) + } + return results, nil +} + +func writeToolSearchResults(output io.Writer, results []tooldiscovery.SearchResult) error { + if len(results) == 0 { + _, err := fmt.Fprintln(output, "No matching tools found.") + return err + } + + noun := "tools" + if len(results) == 1 { + noun = "tool" + } + if _, err := fmt.Fprintf(output, "Found %d matching %s:\n", len(results), noun); err != nil { + return err + } + + toolName := color.New(color.FgCyan, color.Bold) + for _, result := range results { + if _, err := fmt.Fprintln(output); err != nil { + return err + } + if _, err := toolName.Fprintln(output, result.Tool.Name); err != nil { + return err + } + if _, err := fmt.Fprintln(output, result.Tool.Description); err != nil { + return err + } + } + + return nil +} diff --git a/cmd/github-mcp-server/tool_search_test.go b/cmd/github-mcp-server/tool_search_test.go new file mode 100644 index 0000000000..03ba9ea1e9 --- /dev/null +++ b/cmd/github-mcp-server/tool_search_test.go @@ -0,0 +1,118 @@ +package main + +import ( + "bytes" + "context" + "testing" + + "github.com/github/github-mcp-server/pkg/tooldiscovery" + "github.com/github/github-mcp-server/pkg/translations" + "github.com/modelcontextprotocol/go-sdk/mcp" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestToolSearchCommandRegistered(t *testing.T) { + command, _, err := rootCmd.Find([]string{"tool-search"}) + require.NoError(t, err) + assert.Same(t, toolSearchCmd, command) + + maxResults := toolSearchCmd.Flags().Lookup("max-results") + require.NotNil(t, maxResults) + assert.Equal(t, "3", maxResults.DefValue) +} + +func TestSearchConfiguredTools(t *testing.T) { + tests := []struct { + name string + query string + cfg toolSearchConfig + wantTool string + excludeTool string + wantCount int + }{ + { + name: "searches selected toolset", + query: "issue_read", + cfg: toolSearchConfig{enabledToolsets: []string{"issues"}}, + wantTool: "issue_read", + }, + { + name: "specific tools replace defaults", + query: "get_me", + cfg: toolSearchConfig{enabledTools: []string{"get_me"}}, + wantTool: "get_me", + wantCount: 1, + }, + { + name: "honors read only mode", + query: "issue_write", + cfg: toolSearchConfig{enabledToolsets: []string{"issues"}, readOnly: true}, + excludeTool: "issue_write", + }, + { + name: "honors excluded tools", + query: "issue_read", + cfg: toolSearchConfig{enabledToolsets: []string{"issues"}, excludedTools: []string{"issue_read"}}, + excludeTool: "issue_read", + }, + { + name: "honors feature flags", + query: "find_duplicate", + cfg: toolSearchConfig{enabledToolsets: []string{"issues"}, enabledFeatures: []string{"duplicate_detection"}}, + wantTool: "find_duplicate", + }, + { + name: "omits disabled feature tools", + query: "find_duplicate", + cfg: toolSearchConfig{enabledToolsets: []string{"issues"}}, + excludeTool: "find_duplicate", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + results, err := searchConfiguredTools( + context.Background(), + tt.query, + 10, + tt.cfg, + translations.NullTranslationHelper, + ) + require.NoError(t, err) + + names := make([]string, len(results)) + for i, result := range results { + names[i] = result.Tool.Name + } + if tt.wantTool != "" { + assert.Contains(t, names, tt.wantTool) + } + if tt.excludeTool != "" { + assert.NotContains(t, names, tt.excludeTool) + } + if tt.wantCount > 0 { + assert.Len(t, results, tt.wantCount) + } + }) + } +} + +func TestWriteToolSearchResults(t *testing.T) { + t.Run("results", func(t *testing.T) { + var output bytes.Buffer + err := writeToolSearchResults(&output, []tooldiscovery.SearchResult{ + {Tool: mcp.Tool{Name: "issue_read", Description: "Read an issue."}}, + }) + require.NoError(t, err) + assert.Contains(t, output.String(), "Found 1 matching tool:") + assert.Contains(t, output.String(), "issue_read") + assert.Contains(t, output.String(), "Read an issue.") + }) + + t.Run("no results", func(t *testing.T) { + var output bytes.Buffer + require.NoError(t, writeToolSearchResults(&output, nil)) + assert.Equal(t, "No matching tools found.\n", output.String()) + }) +} diff --git a/go.mod b/go.mod index 45e0dcebdc..f79f4ace52 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/github/github-mcp-server go 1.25.12 require ( + github.com/fatih/color v1.18.0 github.com/go-chi/chi/v5 v5.3.2 github.com/go-viper/mapstructure/v2 v2.5.0 github.com/google/go-github/v89 v89.0.1-0.20260728185857-34349a88bac3 @@ -28,6 +29,8 @@ require ( github.com/google/go-querystring v1.2.0 // indirect github.com/gorilla/css v1.0.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/segmentio/asm v1.1.3 // indirect diff --git a/go.sum b/go.sum index 4974f0c247..0a19120056 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,8 @@ github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= @@ -32,6 +34,11 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8LFgLN4= github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= github.com/modelcontextprotocol/go-sdk v1.7.0 h1:yqjY2dsbKAC0LSuWZVBMrHgiG8ukXv6NRo0JiALay44= @@ -100,7 +107,9 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= diff --git a/third-party-licenses.darwin.md b/third-party-licenses.darwin.md index f1d33c5130..5a3589110d 100644 --- a/third-party-licenses.darwin.md +++ b/third-party-licenses.darwin.md @@ -13,6 +13,7 @@ The following open source dependencies are used to build the [github/github-mcp- The following packages are included for the amd64, arm64 architectures. - [github.com/aymerick/douceur](https://pkg.go.dev/github.com/aymerick/douceur) ([MIT](https://github.com/aymerick/douceur/blob/v0.2.0/LICENSE)) + - [github.com/fatih/color](https://pkg.go.dev/github.com/fatih/color) ([MIT](https://github.com/fatih/color/blob/v1.18.0/LICENSE.md)) - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/fsnotify/fsnotify/blob/v1.9.0/LICENSE)) - [github.com/github/github-mcp-server](https://pkg.go.dev/github.com/github/github-mcp-server) ([MIT](https://github.com/github/github-mcp-server/blob/HEAD/LICENSE)) - [github.com/go-chi/chi/v5](https://pkg.go.dev/github.com/go-chi/chi/v5) ([MIT](https://github.com/go-chi/chi/blob/v5.3.2/LICENSE)) @@ -23,6 +24,8 @@ The following packages are included for the amd64, arm64 architectures. - [github.com/gorilla/css/scanner](https://pkg.go.dev/github.com/gorilla/css/scanner) ([BSD-3-Clause](https://github.com/gorilla/css/blob/v1.0.1/LICENSE)) - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/v2/LICENSE)) - [github.com/lithammer/fuzzysearch/fuzzy](https://pkg.go.dev/github.com/lithammer/fuzzysearch/fuzzy) ([MIT](https://github.com/lithammer/fuzzysearch/blob/v1.1.8/LICENSE)) + - [github.com/mattn/go-colorable](https://pkg.go.dev/github.com/mattn/go-colorable) ([MIT](https://github.com/mattn/go-colorable/blob/v0.1.13/LICENSE)) + - [github.com/mattn/go-isatty](https://pkg.go.dev/github.com/mattn/go-isatty) ([MIT](https://github.com/mattn/go-isatty/blob/v0.0.20/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([Apache-2.0](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) diff --git a/third-party-licenses.linux.md b/third-party-licenses.linux.md index bd98a92cb8..a3d011b39b 100644 --- a/third-party-licenses.linux.md +++ b/third-party-licenses.linux.md @@ -13,6 +13,7 @@ The following open source dependencies are used to build the [github/github-mcp- The following packages are included for the 386, amd64, arm64 architectures. - [github.com/aymerick/douceur](https://pkg.go.dev/github.com/aymerick/douceur) ([MIT](https://github.com/aymerick/douceur/blob/v0.2.0/LICENSE)) + - [github.com/fatih/color](https://pkg.go.dev/github.com/fatih/color) ([MIT](https://github.com/fatih/color/blob/v1.18.0/LICENSE.md)) - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/fsnotify/fsnotify/blob/v1.9.0/LICENSE)) - [github.com/github/github-mcp-server](https://pkg.go.dev/github.com/github/github-mcp-server) ([MIT](https://github.com/github/github-mcp-server/blob/HEAD/LICENSE)) - [github.com/go-chi/chi/v5](https://pkg.go.dev/github.com/go-chi/chi/v5) ([MIT](https://github.com/go-chi/chi/blob/v5.3.2/LICENSE)) @@ -23,6 +24,8 @@ The following packages are included for the 386, amd64, arm64 architectures. - [github.com/gorilla/css/scanner](https://pkg.go.dev/github.com/gorilla/css/scanner) ([BSD-3-Clause](https://github.com/gorilla/css/blob/v1.0.1/LICENSE)) - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/v2/LICENSE)) - [github.com/lithammer/fuzzysearch/fuzzy](https://pkg.go.dev/github.com/lithammer/fuzzysearch/fuzzy) ([MIT](https://github.com/lithammer/fuzzysearch/blob/v1.1.8/LICENSE)) + - [github.com/mattn/go-colorable](https://pkg.go.dev/github.com/mattn/go-colorable) ([MIT](https://github.com/mattn/go-colorable/blob/v0.1.13/LICENSE)) + - [github.com/mattn/go-isatty](https://pkg.go.dev/github.com/mattn/go-isatty) ([MIT](https://github.com/mattn/go-isatty/blob/v0.0.20/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([Apache-2.0](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) diff --git a/third-party-licenses.windows.md b/third-party-licenses.windows.md index 05086f41c2..e8c9984b1c 100644 --- a/third-party-licenses.windows.md +++ b/third-party-licenses.windows.md @@ -13,6 +13,7 @@ The following open source dependencies are used to build the [github/github-mcp- The following packages are included for the 386, amd64, arm64 architectures. - [github.com/aymerick/douceur](https://pkg.go.dev/github.com/aymerick/douceur) ([MIT](https://github.com/aymerick/douceur/blob/v0.2.0/LICENSE)) + - [github.com/fatih/color](https://pkg.go.dev/github.com/fatih/color) ([MIT](https://github.com/fatih/color/blob/v1.18.0/LICENSE.md)) - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/fsnotify/fsnotify/blob/v1.9.0/LICENSE)) - [github.com/github/github-mcp-server](https://pkg.go.dev/github.com/github/github-mcp-server) ([MIT](https://github.com/github/github-mcp-server/blob/HEAD/LICENSE)) - [github.com/go-chi/chi/v5](https://pkg.go.dev/github.com/go-chi/chi/v5) ([MIT](https://github.com/go-chi/chi/blob/v5.3.2/LICENSE)) @@ -24,6 +25,8 @@ The following packages are included for the 386, amd64, arm64 architectures. - [github.com/inconshreveable/mousetrap](https://pkg.go.dev/github.com/inconshreveable/mousetrap) ([Apache-2.0](https://github.com/inconshreveable/mousetrap/blob/v1.1.0/LICENSE)) - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/v2/LICENSE)) - [github.com/lithammer/fuzzysearch/fuzzy](https://pkg.go.dev/github.com/lithammer/fuzzysearch/fuzzy) ([MIT](https://github.com/lithammer/fuzzysearch/blob/v1.1.8/LICENSE)) + - [github.com/mattn/go-colorable](https://pkg.go.dev/github.com/mattn/go-colorable) ([MIT](https://github.com/mattn/go-colorable/blob/v0.1.13/LICENSE)) + - [github.com/mattn/go-isatty](https://pkg.go.dev/github.com/mattn/go-isatty) ([MIT](https://github.com/mattn/go-isatty/blob/v0.0.20/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([Apache-2.0](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) diff --git a/third-party/github.com/fatih/color/LICENSE.md b/third-party/github.com/fatih/color/LICENSE.md new file mode 100644 index 0000000000..25fdaf639d --- /dev/null +++ b/third-party/github.com/fatih/color/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Fatih Arslan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/third-party/github.com/mattn/go-colorable/LICENSE b/third-party/github.com/mattn/go-colorable/LICENSE new file mode 100644 index 0000000000..91b5cef30e --- /dev/null +++ b/third-party/github.com/mattn/go-colorable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/third-party/github.com/mattn/go-isatty/LICENSE b/third-party/github.com/mattn/go-isatty/LICENSE new file mode 100644 index 0000000000..65dc692b6b --- /dev/null +++ b/third-party/github.com/mattn/go-isatty/LICENSE @@ -0,0 +1,9 @@ +Copyright (c) Yasuhiro MATSUMOTO + +MIT License (Expat) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 29aa0e3f2c3feb1319f7bc24357d486ac3046d6c Mon Sep 17 00:00:00 2001 From: tommaso-moro Date: Wed, 26 Aug 2026 14:45:22 +0100 Subject: [PATCH 2/2] docs: remove unavailable tool-search command Remove the CLI section that advertised a subcommand the binary does not provide. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1d58829-0794-4caa-aa18-86543d177609 --- README.md | 11 -- cmd/github-mcp-server/tool_search.go | 177 ------------------ cmd/github-mcp-server/tool_search_test.go | 118 ------------ go.mod | 3 - go.sum | 9 - third-party-licenses.darwin.md | 3 - third-party-licenses.linux.md | 3 - third-party-licenses.windows.md | 3 - third-party/github.com/fatih/color/LICENSE.md | 20 -- .../github.com/mattn/go-colorable/LICENSE | 21 --- .../github.com/mattn/go-isatty/LICENSE | 9 - 11 files changed, 377 deletions(-) delete mode 100644 cmd/github-mcp-server/tool_search.go delete mode 100644 cmd/github-mcp-server/tool_search_test.go delete mode 100644 third-party/github.com/fatih/color/LICENSE.md delete mode 100644 third-party/github.com/mattn/go-colorable/LICENSE delete mode 100644 third-party/github.com/mattn/go-isatty/LICENSE diff --git a/README.md b/README.md index d8d8695d2a..145281bcdb 100644 --- a/README.md +++ b/README.md @@ -421,17 +421,6 @@ If you don't have Docker, you can use `go build` to build the binary in the } ``` -### CLI utilities - -The `github-mcp-server` binary includes a few CLI subcommands that are helpful for debugging and exploring the server. - -- `github-mcp-server tool-search ""` searches tools by name, description, and input parameter names. Use `--max-results` to return more matches. -Example (color output requires a TTY; use `docker run -t` (or `-it`) when running in Docker): -```bash -docker run -it --rm ghcr.io/github/github-mcp-server tool-search "issue" --max-results 5 -github-mcp-server tool-search "issue" --max-results 5 -``` - ## Tool Configuration The GitHub MCP Server supports enabling or disabling specific groups of functionalities via the `--toolsets` flag. This allows you to control which GitHub API capabilities are available to your AI tools. Enabling only the toolsets that you need can help the LLM with tool choice and reduce the context size. diff --git a/cmd/github-mcp-server/tool_search.go b/cmd/github-mcp-server/tool_search.go deleted file mode 100644 index 667956fbd5..0000000000 --- a/cmd/github-mcp-server/tool_search.go +++ /dev/null @@ -1,177 +0,0 @@ -package main - -import ( - "context" - "fmt" - "io" - "strings" - - "github.com/fatih/color" - "github.com/github/github-mcp-server/pkg/github" - "github.com/github/github-mcp-server/pkg/tooldiscovery" - "github.com/github/github-mcp-server/pkg/translations" - "github.com/github/github-mcp-server/pkg/utils" - "github.com/modelcontextprotocol/go-sdk/mcp" - "github.com/spf13/cobra" - "github.com/spf13/viper" -) - -type toolSearchConfig struct { - enabledToolsets []string - enabledTools []string - excludedTools []string - enabledFeatures []string - host string - readOnly bool - insiders bool -} - -var toolSearchCmd = &cobra.Command{ - Use: "tool-search ", - Short: "Search enabled tools", - Long: "Search enabled tools by name, description, and input parameter names.", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - maxResults, err := cmd.Flags().GetInt("max-results") - if err != nil { - return fmt.Errorf("failed to read max-results: %w", err) - } - if maxResults < 1 { - return fmt.Errorf("max-results must be greater than zero") - } - - return runToolSearch(cmd.Context(), cmd.OutOrStdout(), args[0], maxResults) - }, -} - -func init() { - toolSearchCmd.Flags().Int("max-results", tooldiscovery.DefaultMaxSearchResults, "Maximum number of matching tools to return") - rootCmd.AddCommand(toolSearchCmd) -} - -func runToolSearch(ctx context.Context, output io.Writer, query string, maxResults int) error { - cfg, err := loadToolSearchConfig() - if err != nil { - return err - } - - translator, _ := translations.TranslationHelper() - results, err := searchConfiguredTools(ctx, query, maxResults, cfg, translator) - if err != nil { - return err - } - - return writeToolSearchResults(output, results) -} - -func loadToolSearchConfig() (toolSearchConfig, error) { - enabledToolsets, err := toolSearchStringSlice("toolsets") - if err != nil { - return toolSearchConfig{}, err - } - enabledTools, err := toolSearchStringSlice("tools") - if err != nil { - return toolSearchConfig{}, err - } - excludedTools, err := toolSearchStringSlice("exclude_tools") - if err != nil { - return toolSearchConfig{}, err - } - enabledFeatures, err := toolSearchStringSlice("features") - if err != nil { - return toolSearchConfig{}, err - } - - return toolSearchConfig{ - enabledToolsets: enabledToolsets, - enabledTools: enabledTools, - excludedTools: excludedTools, - enabledFeatures: enabledFeatures, - host: viper.GetString("host"), - readOnly: viper.GetBool("read-only"), - insiders: viper.GetBool("insiders"), - }, nil -} - -func toolSearchStringSlice(key string) ([]string, error) { - if !viper.IsSet(key) { - return nil, nil - } - - var values []string - if err := viper.UnmarshalKey(key, &values); err != nil { - return nil, fmt.Errorf("failed to unmarshal %s: %w", strings.ReplaceAll(key, "_", "-"), err) - } - return values, nil -} - -func searchConfiguredTools( - ctx context.Context, - query string, - maxResults int, - cfg toolSearchConfig, - translator translations.TranslationHelperFunc, -) ([]tooldiscovery.SearchResult, error) { - hostType, err := utils.ParseHostType(cfg.host) - if err != nil { - return nil, fmt.Errorf("failed to classify API host: %w", err) - } - - enabledFeatures := github.ResolveFeatureFlags(cfg.enabledFeatures, cfg.insiders) - inventoryBuilder := github.NewInventory(translator, github.WithHost(hostType)). - WithDeprecatedAliases(github.DeprecatedToolAliases). - WithReadOnly(cfg.readOnly). - WithToolsets(github.ResolvedEnabledToolsets(cfg.enabledToolsets, cfg.enabledTools)). - WithTools(github.CleanTools(cfg.enabledTools)). - WithExcludeTools(cfg.excludedTools). - WithFeatureChecker(func(_ context.Context, flagName string) (bool, error) { - return enabledFeatures[flagName], nil - }) - - inv, err := inventoryBuilder.Build() - if err != nil { - return nil, fmt.Errorf("failed to build inventory: %w", err) - } - - serverTools := inv.AvailableTools(ctx) - tools := make([]mcp.Tool, len(serverTools)) - for i, serverTool := range serverTools { - tools[i] = serverTool.Tool - } - - results, err := tooldiscovery.SearchTools(tools, query, tooldiscovery.SearchOptions{MaxResults: maxResults}) - if err != nil { - return nil, fmt.Errorf("failed to search tools: %w", err) - } - return results, nil -} - -func writeToolSearchResults(output io.Writer, results []tooldiscovery.SearchResult) error { - if len(results) == 0 { - _, err := fmt.Fprintln(output, "No matching tools found.") - return err - } - - noun := "tools" - if len(results) == 1 { - noun = "tool" - } - if _, err := fmt.Fprintf(output, "Found %d matching %s:\n", len(results), noun); err != nil { - return err - } - - toolName := color.New(color.FgCyan, color.Bold) - for _, result := range results { - if _, err := fmt.Fprintln(output); err != nil { - return err - } - if _, err := toolName.Fprintln(output, result.Tool.Name); err != nil { - return err - } - if _, err := fmt.Fprintln(output, result.Tool.Description); err != nil { - return err - } - } - - return nil -} diff --git a/cmd/github-mcp-server/tool_search_test.go b/cmd/github-mcp-server/tool_search_test.go deleted file mode 100644 index 03ba9ea1e9..0000000000 --- a/cmd/github-mcp-server/tool_search_test.go +++ /dev/null @@ -1,118 +0,0 @@ -package main - -import ( - "bytes" - "context" - "testing" - - "github.com/github/github-mcp-server/pkg/tooldiscovery" - "github.com/github/github-mcp-server/pkg/translations" - "github.com/modelcontextprotocol/go-sdk/mcp" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestToolSearchCommandRegistered(t *testing.T) { - command, _, err := rootCmd.Find([]string{"tool-search"}) - require.NoError(t, err) - assert.Same(t, toolSearchCmd, command) - - maxResults := toolSearchCmd.Flags().Lookup("max-results") - require.NotNil(t, maxResults) - assert.Equal(t, "3", maxResults.DefValue) -} - -func TestSearchConfiguredTools(t *testing.T) { - tests := []struct { - name string - query string - cfg toolSearchConfig - wantTool string - excludeTool string - wantCount int - }{ - { - name: "searches selected toolset", - query: "issue_read", - cfg: toolSearchConfig{enabledToolsets: []string{"issues"}}, - wantTool: "issue_read", - }, - { - name: "specific tools replace defaults", - query: "get_me", - cfg: toolSearchConfig{enabledTools: []string{"get_me"}}, - wantTool: "get_me", - wantCount: 1, - }, - { - name: "honors read only mode", - query: "issue_write", - cfg: toolSearchConfig{enabledToolsets: []string{"issues"}, readOnly: true}, - excludeTool: "issue_write", - }, - { - name: "honors excluded tools", - query: "issue_read", - cfg: toolSearchConfig{enabledToolsets: []string{"issues"}, excludedTools: []string{"issue_read"}}, - excludeTool: "issue_read", - }, - { - name: "honors feature flags", - query: "find_duplicate", - cfg: toolSearchConfig{enabledToolsets: []string{"issues"}, enabledFeatures: []string{"duplicate_detection"}}, - wantTool: "find_duplicate", - }, - { - name: "omits disabled feature tools", - query: "find_duplicate", - cfg: toolSearchConfig{enabledToolsets: []string{"issues"}}, - excludeTool: "find_duplicate", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - results, err := searchConfiguredTools( - context.Background(), - tt.query, - 10, - tt.cfg, - translations.NullTranslationHelper, - ) - require.NoError(t, err) - - names := make([]string, len(results)) - for i, result := range results { - names[i] = result.Tool.Name - } - if tt.wantTool != "" { - assert.Contains(t, names, tt.wantTool) - } - if tt.excludeTool != "" { - assert.NotContains(t, names, tt.excludeTool) - } - if tt.wantCount > 0 { - assert.Len(t, results, tt.wantCount) - } - }) - } -} - -func TestWriteToolSearchResults(t *testing.T) { - t.Run("results", func(t *testing.T) { - var output bytes.Buffer - err := writeToolSearchResults(&output, []tooldiscovery.SearchResult{ - {Tool: mcp.Tool{Name: "issue_read", Description: "Read an issue."}}, - }) - require.NoError(t, err) - assert.Contains(t, output.String(), "Found 1 matching tool:") - assert.Contains(t, output.String(), "issue_read") - assert.Contains(t, output.String(), "Read an issue.") - }) - - t.Run("no results", func(t *testing.T) { - var output bytes.Buffer - require.NoError(t, writeToolSearchResults(&output, nil)) - assert.Equal(t, "No matching tools found.\n", output.String()) - }) -} diff --git a/go.mod b/go.mod index f79f4ace52..45e0dcebdc 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/github/github-mcp-server go 1.25.12 require ( - github.com/fatih/color v1.18.0 github.com/go-chi/chi/v5 v5.3.2 github.com/go-viper/mapstructure/v2 v2.5.0 github.com/google/go-github/v89 v89.0.1-0.20260728185857-34349a88bac3 @@ -29,8 +28,6 @@ require ( github.com/google/go-querystring v1.2.0 // indirect github.com/gorilla/css v1.0.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/segmentio/asm v1.1.3 // indirect diff --git a/go.sum b/go.sum index 0a19120056..4974f0c247 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,6 @@ github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= -github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= @@ -34,11 +32,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8LFgLN4= github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= github.com/modelcontextprotocol/go-sdk v1.7.0 h1:yqjY2dsbKAC0LSuWZVBMrHgiG8ukXv6NRo0JiALay44= @@ -107,9 +100,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= diff --git a/third-party-licenses.darwin.md b/third-party-licenses.darwin.md index 5a3589110d..f1d33c5130 100644 --- a/third-party-licenses.darwin.md +++ b/third-party-licenses.darwin.md @@ -13,7 +13,6 @@ The following open source dependencies are used to build the [github/github-mcp- The following packages are included for the amd64, arm64 architectures. - [github.com/aymerick/douceur](https://pkg.go.dev/github.com/aymerick/douceur) ([MIT](https://github.com/aymerick/douceur/blob/v0.2.0/LICENSE)) - - [github.com/fatih/color](https://pkg.go.dev/github.com/fatih/color) ([MIT](https://github.com/fatih/color/blob/v1.18.0/LICENSE.md)) - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/fsnotify/fsnotify/blob/v1.9.0/LICENSE)) - [github.com/github/github-mcp-server](https://pkg.go.dev/github.com/github/github-mcp-server) ([MIT](https://github.com/github/github-mcp-server/blob/HEAD/LICENSE)) - [github.com/go-chi/chi/v5](https://pkg.go.dev/github.com/go-chi/chi/v5) ([MIT](https://github.com/go-chi/chi/blob/v5.3.2/LICENSE)) @@ -24,8 +23,6 @@ The following packages are included for the amd64, arm64 architectures. - [github.com/gorilla/css/scanner](https://pkg.go.dev/github.com/gorilla/css/scanner) ([BSD-3-Clause](https://github.com/gorilla/css/blob/v1.0.1/LICENSE)) - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/v2/LICENSE)) - [github.com/lithammer/fuzzysearch/fuzzy](https://pkg.go.dev/github.com/lithammer/fuzzysearch/fuzzy) ([MIT](https://github.com/lithammer/fuzzysearch/blob/v1.1.8/LICENSE)) - - [github.com/mattn/go-colorable](https://pkg.go.dev/github.com/mattn/go-colorable) ([MIT](https://github.com/mattn/go-colorable/blob/v0.1.13/LICENSE)) - - [github.com/mattn/go-isatty](https://pkg.go.dev/github.com/mattn/go-isatty) ([MIT](https://github.com/mattn/go-isatty/blob/v0.0.20/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([Apache-2.0](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) diff --git a/third-party-licenses.linux.md b/third-party-licenses.linux.md index a3d011b39b..bd98a92cb8 100644 --- a/third-party-licenses.linux.md +++ b/third-party-licenses.linux.md @@ -13,7 +13,6 @@ The following open source dependencies are used to build the [github/github-mcp- The following packages are included for the 386, amd64, arm64 architectures. - [github.com/aymerick/douceur](https://pkg.go.dev/github.com/aymerick/douceur) ([MIT](https://github.com/aymerick/douceur/blob/v0.2.0/LICENSE)) - - [github.com/fatih/color](https://pkg.go.dev/github.com/fatih/color) ([MIT](https://github.com/fatih/color/blob/v1.18.0/LICENSE.md)) - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/fsnotify/fsnotify/blob/v1.9.0/LICENSE)) - [github.com/github/github-mcp-server](https://pkg.go.dev/github.com/github/github-mcp-server) ([MIT](https://github.com/github/github-mcp-server/blob/HEAD/LICENSE)) - [github.com/go-chi/chi/v5](https://pkg.go.dev/github.com/go-chi/chi/v5) ([MIT](https://github.com/go-chi/chi/blob/v5.3.2/LICENSE)) @@ -24,8 +23,6 @@ The following packages are included for the 386, amd64, arm64 architectures. - [github.com/gorilla/css/scanner](https://pkg.go.dev/github.com/gorilla/css/scanner) ([BSD-3-Clause](https://github.com/gorilla/css/blob/v1.0.1/LICENSE)) - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/v2/LICENSE)) - [github.com/lithammer/fuzzysearch/fuzzy](https://pkg.go.dev/github.com/lithammer/fuzzysearch/fuzzy) ([MIT](https://github.com/lithammer/fuzzysearch/blob/v1.1.8/LICENSE)) - - [github.com/mattn/go-colorable](https://pkg.go.dev/github.com/mattn/go-colorable) ([MIT](https://github.com/mattn/go-colorable/blob/v0.1.13/LICENSE)) - - [github.com/mattn/go-isatty](https://pkg.go.dev/github.com/mattn/go-isatty) ([MIT](https://github.com/mattn/go-isatty/blob/v0.0.20/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([Apache-2.0](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) diff --git a/third-party-licenses.windows.md b/third-party-licenses.windows.md index e8c9984b1c..05086f41c2 100644 --- a/third-party-licenses.windows.md +++ b/third-party-licenses.windows.md @@ -13,7 +13,6 @@ The following open source dependencies are used to build the [github/github-mcp- The following packages are included for the 386, amd64, arm64 architectures. - [github.com/aymerick/douceur](https://pkg.go.dev/github.com/aymerick/douceur) ([MIT](https://github.com/aymerick/douceur/blob/v0.2.0/LICENSE)) - - [github.com/fatih/color](https://pkg.go.dev/github.com/fatih/color) ([MIT](https://github.com/fatih/color/blob/v1.18.0/LICENSE.md)) - [github.com/fsnotify/fsnotify](https://pkg.go.dev/github.com/fsnotify/fsnotify) ([BSD-3-Clause](https://github.com/fsnotify/fsnotify/blob/v1.9.0/LICENSE)) - [github.com/github/github-mcp-server](https://pkg.go.dev/github.com/github/github-mcp-server) ([MIT](https://github.com/github/github-mcp-server/blob/HEAD/LICENSE)) - [github.com/go-chi/chi/v5](https://pkg.go.dev/github.com/go-chi/chi/v5) ([MIT](https://github.com/go-chi/chi/blob/v5.3.2/LICENSE)) @@ -25,8 +24,6 @@ The following packages are included for the 386, amd64, arm64 architectures. - [github.com/inconshreveable/mousetrap](https://pkg.go.dev/github.com/inconshreveable/mousetrap) ([Apache-2.0](https://github.com/inconshreveable/mousetrap/blob/v1.1.0/LICENSE)) - [github.com/josephburnett/jd/v2](https://pkg.go.dev/github.com/josephburnett/jd/v2) ([MIT](https://github.com/josephburnett/jd/blob/v2.5.0/v2/LICENSE)) - [github.com/lithammer/fuzzysearch/fuzzy](https://pkg.go.dev/github.com/lithammer/fuzzysearch/fuzzy) ([MIT](https://github.com/lithammer/fuzzysearch/blob/v1.1.8/LICENSE)) - - [github.com/mattn/go-colorable](https://pkg.go.dev/github.com/mattn/go-colorable) ([MIT](https://github.com/mattn/go-colorable/blob/v0.1.13/LICENSE)) - - [github.com/mattn/go-isatty](https://pkg.go.dev/github.com/mattn/go-isatty) ([MIT](https://github.com/mattn/go-isatty/blob/v0.0.20/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([Apache-2.0](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.7.0/LICENSE)) diff --git a/third-party/github.com/fatih/color/LICENSE.md b/third-party/github.com/fatih/color/LICENSE.md deleted file mode 100644 index 25fdaf639d..0000000000 --- a/third-party/github.com/fatih/color/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Fatih Arslan - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/third-party/github.com/mattn/go-colorable/LICENSE b/third-party/github.com/mattn/go-colorable/LICENSE deleted file mode 100644 index 91b5cef30e..0000000000 --- a/third-party/github.com/mattn/go-colorable/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Yasuhiro Matsumoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/third-party/github.com/mattn/go-isatty/LICENSE b/third-party/github.com/mattn/go-isatty/LICENSE deleted file mode 100644 index 65dc692b6b..0000000000 --- a/third-party/github.com/mattn/go-isatty/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (c) Yasuhiro MATSUMOTO - -MIT License (Expat) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.