Documentation
¶
Overview ¶
Package config loads and validates server configuration from environment variables.
Index ¶
Constants ¶
View Source
const ( DefaultMaxFileSize = 2 * 1024 * 1024 * 1024 // 2 GB MaxFileSize = 1024 * 1024 * 1024 * 1024 // 1 TB upper bound )
Upload size defaults.
View Source
const ( DefaultMaxHTTPClients = 100 DefaultSessionTimeout = 30 * time.Minute DefaultRevalidateInterval = 15 * time.Minute MaxHTTPClients = 10000 MaxSessionTimeout = 24 * time.Hour MaxRevalidateInterval = 24 * time.Hour )
HTTP pool defaults.
View Source
const ( DefaultOAuthCacheTTL = 15 * time.Minute MinOAuthCacheTTL = 1 * time.Minute MaxOAuthCacheTTL = 2 * time.Hour )
OAuth defaults.
View Source
const ( DefaultAutoUpdateRepo = "jmrplens/gitlab-mcp-server" DefaultAutoUpdateInterval = 1 * time.Hour DefaultAutoUpdateTimeout = 15 * time.Second )
Auto-update defaults.
View Source
const EnvFileName = ".gitlab-mcp-server.env"
EnvFileName is the name of the env file where the setup wizard stores secrets.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
GitLabURL string
GitLabToken string
SkipTLSVerify bool
MetaTools bool
Enterprise bool
ReadOnly bool
SafeMode bool
UploadMaxFileSize int64
MaxHTTPClients int // Maximum unique tokens in the server pool (HTTP mode only)
SessionTimeout time.Duration // Idle MCP session timeout (HTTP mode only)
RevalidateInterval time.Duration // Token re-validation interval (HTTP mode only)
AutoUpdate string // Auto-update mode: "true" (auto), "check" (log-only), "false" (disabled)
AutoUpdateRepo string // GitLab project path for update checks
AutoUpdateInterval time.Duration // How often to check for updates (HTTP mode)
AutoUpdateTimeout time.Duration // Timeout for pre-start update check (stdio mode)
AuthMode string // Auth mode for HTTP: "legacy" (default) or "oauth"
OAuthCacheTTL time.Duration // OAuth token cache TTL (HTTP mode, oauth auth mode)
}
Config holds all configuration values for the MCP server.
Click to show internal directories.
Click to hide internal directories.