Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ Complete reference for all MCP Auth Proxy configuration options.
| Option | Environment Variable | Default | Description |
| -------------- | -------------------- | -------- | ---------------------------- |
| `--listen` | `LISTEN` | `:80` | Address to listen on |
| `--listen-tls` | `TLS_LISTEN` | `:443` | Address to listen on for TLS |
| `--data` | `DATA_PATH` | `./data` | Path to the data directory |
| `--tls-listen` | `TLS_LISTEN` | `:443` | Address to listen on for TLS |
| `--data-path` | `DATA_PATH` | `./data` | Path to the data directory |

### Proxy Options

Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func getEnvBoolWithDefault(key string, defaultValue bool) bool {

func main() {
var listen string
var listenTLS string
var tlsListen string
var noAutoTLS bool
var tlsHost string
var tlsDirectoryURL string
Expand Down Expand Up @@ -100,7 +100,7 @@ func main() {

if err := mcpproxy.Run(
listen,
listenTLS,
tlsListen,
!noAutoTLS,
tlsHost,
tlsDirectoryURL,
Expand Down Expand Up @@ -132,12 +132,12 @@ func main() {
}

rootCmd.Flags().StringVar(&listen, "listen", getEnvWithDefault("LISTEN", ":80"), "Address to listen on")
rootCmd.Flags().StringVar(&listenTLS, "listen-tls", getEnvWithDefault("TLS_LISTEN", ":443"), "Address to listen on for TLS")
rootCmd.Flags().StringVar(&tlsListen, "tls-listen", getEnvWithDefault("TLS_LISTEN", ":443"), "Address to listen on for TLS")
rootCmd.Flags().BoolVar(&noAutoTLS, "no-auto-tls", getEnvBoolWithDefault("NO_AUTO_TLS", false), "Disable automatic TLS host detection from externalURL")
rootCmd.Flags().StringVarP(&tlsHost, "tls-host", "H", getEnvWithDefault("TLS_HOST", ""), "Host name for TLS")
rootCmd.Flags().StringVar(&tlsDirectoryURL, "tls-directory-url", getEnvWithDefault("TLS_DIRECTORY_URL", "https://acme-v02.api.letsencrypt.org/directory"), "ACME directory URL for TLS certificates")
rootCmd.Flags().BoolVar(&tlsAcceptTOS, "tls-accept-tos", getEnvBoolWithDefault("TLS_ACCEPT_TOS", false), "Accept TLS terms of service")
rootCmd.Flags().StringVarP(&dataPath, "data", "d", getEnvWithDefault("DATA_PATH", "./data"), "Path to the data directory")
rootCmd.Flags().StringVarP(&dataPath, "data-path", "d", getEnvWithDefault("DATA_PATH", "./data"), "Path to the data directory")
rootCmd.Flags().StringVarP(&externalURL, "external-url", "e", getEnvWithDefault("EXTERNAL_URL", "http://localhost"), "External URL for the proxy")

// Google OAuth configuration
Expand Down
6 changes: 3 additions & 3 deletions pkg/mcp-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var ServerShutdownTimeout = 5 * time.Second

func Run(
listen string,
listenTLS string,
tlsListen string,
autoTLS bool,
tlsHost string,
tlsDirectoryURL string,
Expand Down Expand Up @@ -258,7 +258,7 @@ func Run(
})),
}
httpsServer := &http.Server{
Addr: listenTLS,
Addr: tlsListen,
Handler: router,
TLSConfig: m.TLSConfig(),
}
Expand Down Expand Up @@ -344,7 +344,7 @@ func Run(
}

if tlsHost != "" {
logger.Info("Starting server", zap.Strings("listen", []string{listen, listenTLS}))
logger.Info("Starting server", zap.Strings("listen", []string{listen, tlsListen}))
} else {
logger.Info("Starting server", zap.Strings("listen", []string{listen}))
}
Expand Down