Skip to main content

Configuration Reference

Complete reference for all MCP Auth Proxy configuration options.

Command Line Options

Required Options

OptionEnvironment VariableDefaultDescription
--external-urlEXTERNAL_URLhttp://localhostExternal URL for the proxy

TLS Options

OptionEnvironment VariableDefaultDescription
--no-auto-tlsNO_AUTO_TLSfalseDisable automatic TLS host detection from externalURL
--tls-accept-tosTLS_ACCEPT_TOSfalseAccept TLS terms of service
--tls-directory-urlTLS_DIRECTORY_URLhttps://acme-v02.api.letsencrypt.org/directoryACME directory URL for TLS certificates
--tls-hostTLS_HOST-Host name for TLS

Authentication Options

Password Authentication

OptionEnvironment VariableDefaultDescription
--no-provider-auto-selectNO_PROVIDER_AUTO_SELECTfalseDisable auto-redirect when only one OAuth/OIDC provider is configured and no password is set
--passwordPASSWORD-Plain text password for authentication (will be hashed with bcrypt)
--password-hashPASSWORD_HASH-Bcrypt hash of password for authentication

Google OAuth

OptionEnvironment VariableDefaultDescription
--google-client-idGOOGLE_CLIENT_ID-Google OAuth client ID
--google-client-secretGOOGLE_CLIENT_SECRET-Google OAuth client secret
--google-allowed-usersGOOGLE_ALLOWED_USERS-Comma-separated list of allowed Google users (emails)
--google-allowed-workspacesGOOGLE_ALLOWED_WORKSPACES-Comma-separated list of allowed Google workspaces

GitHub OAuth

OptionEnvironment VariableDefaultDescription
--github-client-idGITHUB_CLIENT_ID-GitHub OAuth client ID
--github-client-secretGITHUB_CLIENT_SECRET-GitHub OAuth client secret
--github-allowed-usersGITHUB_ALLOWED_USERS-Comma-separated list of allowed GitHub users (usernames)
--github-allowed-orgsGITHUB_ALLOWED_ORGS-Comma-separated list of allowed GitHub organizations. You can also restrict access to specific teams using the format Org:Team

Generic OIDC

OptionEnvironment VariableDefaultDescription
--oidc-configuration-urlOIDC_CONFIGURATION_URL-OIDC configuration URL
--oidc-client-idOIDC_CLIENT_ID-OIDC client ID
--oidc-client-secretOIDC_CLIENT_SECRET-OIDC client secret
--oidc-allowed-usersOIDC_ALLOWED_USERS-Comma-separated list of allowed OIDC users (exact match)
--oidc-allowed-users-globOIDC_ALLOWED_USERS_GLOB-Comma-separated list of glob patterns for allowed OIDC users
--oidc-provider-nameOIDC_PROVIDER_NAMEOIDCDisplay name for OIDC provider
--oidc-scopesOIDC_SCOPESopenid,profile,emailComma-separated list of OIDC scopes
--oidc-user-id-fieldOIDC_USER_ID_FIELD/emailJSON pointer to user ID field in userinfo endpoint response
OIDC User Matching

You can use both exact matching and glob patterns for OIDC user authorization:

  • Exact matching (--oidc-allowed-users): Users must match exactly
  • Glob patterns (--oidc-allowed-users-glob): Users are matched against glob patterns

Examples:

# Exact matching
--oidc-allowed-users "user1@example.com,admin@company.org"

# Glob patterns - allow all users from example.com
--oidc-allowed-users-glob "*@example.com"

# Combined exact and glob matching
--oidc-allowed-users "specific@user.com" \
--oidc-allowed-users-glob "*@example.com"

Server Options

OptionEnvironment VariableDefaultDescription
--listenLISTEN:80Address to listen on
--tls-listenTLS_LISTEN:443Address to listen on for TLS
--data-pathDATA_PATH./dataPath to the data directory

Proxy Options

OptionEnvironment VariableDefaultDescription
--proxy-bearer-tokenPROXY_BEARER_TOKEN-Bearer token to add to Authorization header when proxying requests
--proxy-headersPROXY_HEADERS-Comma-separated list of headers to add when proxying requests (format: Header1:Value1,Header2:Value2)
--trusted-proxiesTRUSTED_PROXIES-Comma-separated list of trusted proxies (IP addresses or CIDR ranges)

For practical configuration examples including environment variables, Docker Compose, and Kubernetes deployments, see the Configuration Examples page.