From 3d53374e4ec13e7406b0cdc5823ca5a980a20582 Mon Sep 17 00:00:00 2001 From: tonytrg Date: Mon, 26 Jan 2026 15:44:28 +0100 Subject: [PATCH 1/2] adding correct insiders-mode name --- README.md | 6 +++--- cmd/github-mcp-server/main.go | 6 +++--- docs/remote-server.md | 2 +- internal/ghmcp/server.go | 12 ++++++------ internal/ghmcp/server_test.go | 2 +- pkg/github/feature_flags.go | 2 +- pkg/github/feature_flags_test.go | 10 +++++----- pkg/github/server_test.go | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index d3220f2e6..76ee007ee 100644 --- a/README.md +++ b/README.md @@ -530,13 +530,13 @@ The local GitHub MCP Server offers an insiders version with early access to new 1. **Using Command Line Argument**: ```bash - ./github-mcp-server --insider-mode + ./github-mcp-server --insiders-mode ``` 2. **Using Environment Variable**: ```bash - GITHUB_INSIDER_MODE=true ./github-mcp-server + GITHUB_INSIDERS_MODE=true ./github-mcp-server ``` When using Docker: @@ -544,7 +544,7 @@ When using Docker: ```bash docker run -i --rm \ -e GITHUB_PERSONAL_ACCESS_TOKEN= \ - -e GITHUB_INSIDER_MODE=true \ + -e GITHUB_INSIDERS_MODE=true \ ghcr.io/github/github-mcp-server ``` diff --git a/cmd/github-mcp-server/main.go b/cmd/github-mcp-server/main.go index 27bffaff8..d34795957 100644 --- a/cmd/github-mcp-server/main.go +++ b/cmd/github-mcp-server/main.go @@ -83,7 +83,7 @@ var ( LogFilePath: viper.GetString("log-file"), ContentWindowSize: viper.GetInt("content-window-size"), LockdownMode: viper.GetBool("lockdown-mode"), - InsiderMode: viper.GetBool("insider-mode"), + InsidersMode: viper.GetBool("insiders-mode"), RepoAccessCacheTTL: &ttl, } return ghmcp.RunStdioServer(stdioServerConfig) @@ -109,7 +109,7 @@ func init() { rootCmd.PersistentFlags().String("gh-host", "", "Specify the GitHub hostname (for GitHub Enterprise etc.)") rootCmd.PersistentFlags().Int("content-window-size", 5000, "Specify the content window size") rootCmd.PersistentFlags().Bool("lockdown-mode", false, "Enable lockdown mode") - rootCmd.PersistentFlags().Bool("insider-mode", false, "Enable insider features") + rootCmd.PersistentFlags().Bool("insiders-mode", false, "Enable insiders features") rootCmd.PersistentFlags().Duration("repo-access-cache-ttl", 5*time.Minute, "Override the repo access cache TTL (e.g. 1m, 0s to disable)") // Bind flag to viper @@ -124,7 +124,7 @@ func init() { _ = viper.BindPFlag("host", rootCmd.PersistentFlags().Lookup("gh-host")) _ = viper.BindPFlag("content-window-size", rootCmd.PersistentFlags().Lookup("content-window-size")) _ = viper.BindPFlag("lockdown-mode", rootCmd.PersistentFlags().Lookup("lockdown-mode")) - _ = viper.BindPFlag("insider-mode", rootCmd.PersistentFlags().Lookup("insider-mode")) + _ = viper.BindPFlag("insiders-mode", rootCmd.PersistentFlags().Lookup("insiders-mode")) _ = viper.BindPFlag("repo-access-cache-ttl", rootCmd.PersistentFlags().Lookup("repo-access-cache-ttl")) // Add subcommands diff --git a/docs/remote-server.md b/docs/remote-server.md index b305271cf..9f851c1b0 100644 --- a/docs/remote-server.md +++ b/docs/remote-server.md @@ -68,7 +68,7 @@ The Remote GitHub MCP server has optional headers equivalent to the Local server - Equivalent to `GITHUB_LOCKDOWN_MODE` env var for Local server. - If this header is empty, "false", "f", "no", "n", "0", or "off" (ignoring whitespace and case), it will be interpreted as false. All other values are interpreted as true. - `X-MCP-Insiders`: Enables insiders mode for early access to new features. - - Equivalent to `GITHUB_INSIDER_MODE` env var or `--insider-mode` flag for Local server. + - Equivalent to `GITHUB_INSIDERS_MODE` env var or `--insiders-mode` flag for Local server. - If this header is empty, "false", "f", "no", "n", "0", or "off" (ignoring whitespace and case), it will be interpreted as false. All other values are interpreted as true. > **Looking for examples?** See the [Server Configuration Guide](./server-configuration.md) for common recipes like minimal setups, read-only mode, and combining tools with toolsets. diff --git a/internal/ghmcp/server.go b/internal/ghmcp/server.go index 4f68cfd49..37aabb0a6 100644 --- a/internal/ghmcp/server.go +++ b/internal/ghmcp/server.go @@ -64,8 +64,8 @@ type MCPServerConfig struct { // LockdownMode indicates if we should enable lockdown mode LockdownMode bool - // Insider indicates if we should enable experimental features - InsiderMode bool + // InsidersMode indicates if we should enable experimental features + InsidersMode bool // Logger is used for logging within the server Logger *slog.Logger @@ -227,7 +227,7 @@ func NewMCPServer(cfg MCPServerConfig) (*mcp.Server, error) { cfg.Translator, github.FeatureFlags{ LockdownMode: cfg.LockdownMode, - InsiderMode: cfg.InsiderMode, + InsidersMode: cfg.InsidersMode, }, cfg.ContentWindowSize, featureChecker, @@ -331,8 +331,8 @@ type StdioServerConfig struct { // LockdownMode indicates if we should enable lockdown mode LockdownMode bool - // InsiderMode indicates if we should enable experimental features - InsiderMode bool + // InsidersMode indicates if we should enable experimental features + InsidersMode bool // RepoAccessCacheTTL overrides the default TTL for repository access cache entries. RepoAccessCacheTTL *time.Duration @@ -390,7 +390,7 @@ func RunStdioServer(cfg StdioServerConfig) error { Translator: t, ContentWindowSize: cfg.ContentWindowSize, LockdownMode: cfg.LockdownMode, - InsiderMode: cfg.InsiderMode, + InsidersMode: cfg.InsidersMode, Logger: logger, RepoAccessTTL: cfg.RepoAccessCacheTTL, TokenScopes: tokenScopes, diff --git a/internal/ghmcp/server_test.go b/internal/ghmcp/server_test.go index 7854cb77f..2139aa280 100644 --- a/internal/ghmcp/server_test.go +++ b/internal/ghmcp/server_test.go @@ -23,7 +23,7 @@ func TestNewMCPServer_CreatesSuccessfully(t *testing.T) { Translator: translations.NullTranslationHelper, ContentWindowSize: 5000, LockdownMode: false, - InsiderMode: false, + InsidersMode: false, } // Create the server diff --git a/pkg/github/feature_flags.go b/pkg/github/feature_flags.go index dbaa8cec2..fd06a659b 100644 --- a/pkg/github/feature_flags.go +++ b/pkg/github/feature_flags.go @@ -3,5 +3,5 @@ package github // FeatureFlags defines runtime feature toggles that adjust tool behavior. type FeatureFlags struct { LockdownMode bool - InsiderMode bool + InsidersMode bool } diff --git a/pkg/github/feature_flags_test.go b/pkg/github/feature_flags_test.go index fb50448af..498c6e487 100644 --- a/pkg/github/feature_flags_test.go +++ b/pkg/github/feature_flags_test.go @@ -45,7 +45,7 @@ func HelloWorldTool(t translations.TranslationHelperFunc) inventory.ServerTool { if deps.IsFeatureEnabled(ctx, RemoteMCPEnthusiasticGreeting) { greeting += " Welcome to the future of MCP! 🎉" } - if deps.GetFlags().InsiderMode { + if deps.GetFlags().InsidersMode { greeting += " Experimental features are enabled! 🚀" } @@ -140,17 +140,17 @@ func TestHelloWorld_ConditionalBehavior_Config(t *testing.T) { tests := []struct { name string - insiderMode bool + insidersMode bool expectedGreeting string }{ { name: "Experimental disabled - default greeting", - insiderMode: false, + insidersMode: false, expectedGreeting: "Hello, world!", }, { name: "Experimental enabled - experimental greeting", - insiderMode: true, + insidersMode: true, expectedGreeting: "Hello, world! Experimental features are enabled! 🚀", }, } @@ -163,7 +163,7 @@ func TestHelloWorld_ConditionalBehavior_Config(t *testing.T) { deps := NewBaseDeps( nil, nil, nil, nil, translations.NullTranslationHelper, - FeatureFlags{InsiderMode: tt.insiderMode}, + FeatureFlags{InsidersMode: tt.insidersMode}, 0, nil, ) diff --git a/pkg/github/server_test.go b/pkg/github/server_test.go index e91fc851e..f4ae5f831 100644 --- a/pkg/github/server_test.go +++ b/pkg/github/server_test.go @@ -84,7 +84,7 @@ func stubRepoAccessCache(client *githubv4.Client, ttl time.Duration) *lockdown.R func stubFeatureFlags(enabledFlags map[string]bool) FeatureFlags { return FeatureFlags{ LockdownMode: enabledFlags["lockdown-mode"], - InsiderMode: enabledFlags["insider-mode"], + InsidersMode: enabledFlags["insiders-mode"], } } From b9ba32aa8f2f249d0e814d856f7335d9a4fb120a Mon Sep 17 00:00:00 2001 From: tonytrg Date: Mon, 26 Jan 2026 16:02:25 +0100 Subject: [PATCH 2/2] fix naming --- README.md | 6 +++--- cmd/github-mcp-server/main.go | 6 +++--- docs/remote-server.md | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 76ee007ee..ce0ecf823 100644 --- a/README.md +++ b/README.md @@ -530,13 +530,13 @@ The local GitHub MCP Server offers an insiders version with early access to new 1. **Using Command Line Argument**: ```bash - ./github-mcp-server --insiders-mode + ./github-mcp-server --insiders ``` 2. **Using Environment Variable**: ```bash - GITHUB_INSIDERS_MODE=true ./github-mcp-server + GITHUB_INSIDERS=true ./github-mcp-server ``` When using Docker: @@ -544,7 +544,7 @@ When using Docker: ```bash docker run -i --rm \ -e GITHUB_PERSONAL_ACCESS_TOKEN= \ - -e GITHUB_INSIDERS_MODE=true \ + -e GITHUB_INSIDERS=true \ ghcr.io/github/github-mcp-server ``` diff --git a/cmd/github-mcp-server/main.go b/cmd/github-mcp-server/main.go index d34795957..c361a4d5a 100644 --- a/cmd/github-mcp-server/main.go +++ b/cmd/github-mcp-server/main.go @@ -83,7 +83,7 @@ var ( LogFilePath: viper.GetString("log-file"), ContentWindowSize: viper.GetInt("content-window-size"), LockdownMode: viper.GetBool("lockdown-mode"), - InsidersMode: viper.GetBool("insiders-mode"), + InsidersMode: viper.GetBool("insiders"), RepoAccessCacheTTL: &ttl, } return ghmcp.RunStdioServer(stdioServerConfig) @@ -109,7 +109,7 @@ func init() { rootCmd.PersistentFlags().String("gh-host", "", "Specify the GitHub hostname (for GitHub Enterprise etc.)") rootCmd.PersistentFlags().Int("content-window-size", 5000, "Specify the content window size") rootCmd.PersistentFlags().Bool("lockdown-mode", false, "Enable lockdown mode") - rootCmd.PersistentFlags().Bool("insiders-mode", false, "Enable insiders features") + rootCmd.PersistentFlags().Bool("insiders", false, "Enable insiders features") rootCmd.PersistentFlags().Duration("repo-access-cache-ttl", 5*time.Minute, "Override the repo access cache TTL (e.g. 1m, 0s to disable)") // Bind flag to viper @@ -124,7 +124,7 @@ func init() { _ = viper.BindPFlag("host", rootCmd.PersistentFlags().Lookup("gh-host")) _ = viper.BindPFlag("content-window-size", rootCmd.PersistentFlags().Lookup("content-window-size")) _ = viper.BindPFlag("lockdown-mode", rootCmd.PersistentFlags().Lookup("lockdown-mode")) - _ = viper.BindPFlag("insiders-mode", rootCmd.PersistentFlags().Lookup("insiders-mode")) + _ = viper.BindPFlag("insiders", rootCmd.PersistentFlags().Lookup("insiders")) _ = viper.BindPFlag("repo-access-cache-ttl", rootCmd.PersistentFlags().Lookup("repo-access-cache-ttl")) // Add subcommands diff --git a/docs/remote-server.md b/docs/remote-server.md index 9f851c1b0..149667393 100644 --- a/docs/remote-server.md +++ b/docs/remote-server.md @@ -68,7 +68,7 @@ The Remote GitHub MCP server has optional headers equivalent to the Local server - Equivalent to `GITHUB_LOCKDOWN_MODE` env var for Local server. - If this header is empty, "false", "f", "no", "n", "0", or "off" (ignoring whitespace and case), it will be interpreted as false. All other values are interpreted as true. - `X-MCP-Insiders`: Enables insiders mode for early access to new features. - - Equivalent to `GITHUB_INSIDERS_MODE` env var or `--insiders-mode` flag for Local server. + - Equivalent to `GITHUB_INSIDERS` env var or `--insiders` flag for Local server. - If this header is empty, "false", "f", "no", "n", "0", or "off" (ignoring whitespace and case), it will be interpreted as false. All other values are interpreted as true. > **Looking for examples?** See the [Server Configuration Guide](./server-configuration.md) for common recipes like minimal setups, read-only mode, and combining tools with toolsets.