import type { ServerConfig } from '../types.js'; /** * Parse Drive server configuration from CLI arguments and environment. * * CLI Arguments (all optional): * - --auth= Authentication mode (default: loopback-oauth) * Modes: loopback-oauth, service-account, dcr * - --headless Disable browser auto-open, return auth URL instead * - --redirect-uri= OAuth redirect URI (default: ephemeral loopback) * - --dcr-mode= DCR mode (self-hosted or external, default: self-hosted) * - --dcr-verify-url= External verification endpoint (required for external mode) * - --dcr-store-uri= DCR client storage URI (required for self-hosted mode) * - --port= Enable HTTP transport on specified port * - --stdio Enable stdio transport (default if no port) * - --log-level= Logging level (default: info) * - --resource-store-uri= Resource store URI for CSV file storage (default: file://~/.mcp-z/mcp-drive/files) * - --base-url= Base URL for HTTP file serving (optional) * * Environment Variables: * - GOOGLE_CLIENT_ID OAuth client ID (REQUIRED) * - GOOGLE_CLIENT_SECRET OAuth client secret (optional) * - AUTH_MODE Default authentication mode (optional) * - HEADLESS Disable browser auto-open (optional) * - DCR_MODE DCR mode (optional, same format as --dcr-mode) * - DCR_VERIFY_URL External verification URL (optional, same as --dcr-verify-url) * - DCR_STORE_URI DCR storage URI (optional, same as --dcr-store-uri) * - TOKEN_STORE_URI Token storage URI (optional) * - PORT Default HTTP port (optional) * - LOG_LEVEL Default logging level (optional) * - RESOURCE_STORE_URI Resource store URI (optional, file://) * - BASE_URL Base URL for HTTP file serving (optional) * * OAuth Scopes (from constants.ts): * openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/drive */ export declare function parseConfig(args: string[], env: Record): ServerConfig; /** * Build production configuration from process globals. * Entry point for production server. */ export declare function createConfig(): ServerConfig;