UNPKG

bc-webclient-mcp

Version:

Model Context Protocol (MCP) server for Microsoft Dynamics 365 Business Central via WebUI protocol. Enables AI assistants to interact with BC through the web client protocol, supporting Card, List, and Document pages with full line item support and server

126 lines 3.03 kB
/** * Centralized Configuration Module * * Type-safe environment variable management for the BC MCP Server. * All environment variables should be accessed through this module. */ /** * Log levels supported by the application */ export type LogLevel = 'debug' | 'info' | 'warn' | 'error'; /** * Node environments */ export type NodeEnv = 'development' | 'production' | 'test'; /** * Debug logging channels */ export type DebugChannel = 'stdio' | 'tools' | 'websocket' | 'handlers' | 'session' | 'cache' | 'all'; /** * Debug logging configuration */ export interface DebugConfig { readonly enabled: boolean; readonly logDir: string; readonly maxSizeMB: number; readonly maxFiles: number; readonly channels: Set<DebugChannel>; readonly logFullHandlers: boolean; readonly logFullWsMessages: boolean; } /** * Business Central configuration */ export interface BCConfig { readonly baseUrl: string; readonly username: string; readonly password: string; readonly tenantId: string; readonly timeout: number; readonly searchTimingWindowMs: number; } /** * Application configuration */ export interface AppConfig { readonly nodeEnv: NodeEnv; readonly logLevel: LogLevel; readonly bc: BCConfig; readonly debug: DebugConfig; } /** * Parse and validate environment variables */ declare class Config { private readonly config; constructor(); /** * Parse environment variables with defaults */ private parseEnvironment; /** * Parse debug logging configuration */ private parseDebugConfig; /** * Get Node environment with validation */ private getNodeEnv; /** * Get log level with validation */ private getLogLevel; /** * Get numeric environment variable with default */ private getNumberEnv; /** * Get boolean environment variable with default */ private getBooleanEnv; /** * Validate configuration */ private validateConfig; /** * Get the full configuration */ getConfig(): Readonly<AppConfig>; /** * Get Node environment */ get nodeEnv(): NodeEnv; /** * Get log level */ get logLevel(): LogLevel; /** * Get BC configuration */ get bc(): Readonly<BCConfig>; /** * Get debug configuration */ get debug(): Readonly<DebugConfig>; /** * Check if running in development mode */ get isDevelopment(): boolean; /** * Check if running in production mode */ get isProduction(): boolean; /** * Check if running in test mode */ get isTest(): boolean; } export declare const config: Config; export declare const bcConfig: Readonly<BCConfig>; export declare const isDevelopment: boolean; export declare const isProduction: boolean; export declare const isTest: boolean; export declare const nodeEnv: NodeEnv; export declare const logLevel: LogLevel; export {}; //# sourceMappingURL=config.d.ts.map