@emit-ia/gdrive-mcp-server
Version:
Google Drive MCP Server - Model Context Protocol server for Google Drive and Gmail APIs
70 lines • 2.74 kB
TypeScript
/**
* Configuration management for Google Drive & Gmail MCP Server
*
* This module handles environment variable loading, validation, and provides
* type-safe configuration for the application. It uses Zod for schema validation
* and supports multiple .env file locations for flexibility.
*/
import { z } from "zod";
/**
* Configuration schema using Zod for type safety and validation
*
* This schema supports both OAuth2 and Service Account authentication,
* allowing for flexible deployment options while maintaining security.
*/
declare const configSchema: z.ZodObject<{
googleClientId: z.ZodOptional<z.ZodString>;
googleClientSecret: z.ZodOptional<z.ZodString>;
googleRedirectUri: z.ZodDefault<z.ZodString>;
googleRefreshToken: z.ZodOptional<z.ZodString>;
googleServiceAccountEmail: z.ZodOptional<z.ZodString>;
googlePrivateKey: z.ZodOptional<z.ZodString>;
serverName: z.ZodDefault<z.ZodString>;
serverVersion: z.ZodDefault<z.ZodString>;
defaultFolderId: z.ZodOptional<z.ZodString>;
maxFileSize: z.ZodDefault<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
googleRedirectUri: string;
serverName: string;
serverVersion: string;
maxFileSize: number;
googleClientId?: string | undefined;
googleClientSecret?: string | undefined;
googleRefreshToken?: string | undefined;
googleServiceAccountEmail?: string | undefined;
googlePrivateKey?: string | undefined;
defaultFolderId?: string | undefined;
}, {
googleClientId?: string | undefined;
googleClientSecret?: string | undefined;
googleRedirectUri?: string | undefined;
googleRefreshToken?: string | undefined;
googleServiceAccountEmail?: string | undefined;
googlePrivateKey?: string | undefined;
serverName?: string | undefined;
serverVersion?: string | undefined;
defaultFolderId?: string | undefined;
maxFileSize?: number | undefined;
}>;
export declare const config: {
googleRedirectUri: string;
serverName: string;
serverVersion: string;
maxFileSize: number;
googleClientId?: string | undefined;
googleClientSecret?: string | undefined;
googleRefreshToken?: string | undefined;
googleServiceAccountEmail?: string | undefined;
googlePrivateKey?: string | undefined;
defaultFolderId?: string | undefined;
};
export type Config = z.infer<typeof configSchema>;
/**
* Validates that the required credentials are present for the hybrid authentication system
*
* This function checks for both OAuth2 and Service Account credentials, providing
* helpful error messages and warnings to guide users through the setup process.
*/
export declare function validateCredentials(): void;
export {};
//# sourceMappingURL=config.d.ts.map