sap-b1-mcp-server
Version:
SAP Business One Service Layer MCP Server
81 lines (80 loc) • 2.04 kB
TypeScript
import { SAP_B1_Config } from '../sap/types.js';
export interface MCPServerConfig {
sap: SAP_B1_Config;
transport: {
type: 'stdio' | 'http' | 'streaming-http';
http?: {
port: number;
host: string;
apiKey?: string;
requireApiKey?: boolean;
cors?: boolean;
};
};
environment: 'development' | 'production' | 'test';
}
export declare class ConfigManager {
private config;
/**
* Load configuration from environment variables and config file
*/
loadConfig(configPath?: string): Promise<MCPServerConfig>;
/**
* Get current configuration
*/
getConfig(): MCPServerConfig;
/**
* Get SAP B1 configuration
*/
getSAPConfig(): SAP_B1_Config;
/**
* Validate configuration without loading
*/
static validateConfig(config: Partial<SAP_B1_Config>): {
valid: boolean;
errors: string[];
};
/**
* Create example configuration file
*/
static createExampleConfig(): SAP_B1_Config;
/**
* Load configuration from JSON file
*/
private loadConfigFromFile;
/**
* Load configuration from environment variables
*/
private loadConfigFromEnv;
/**
* Mask sensitive information in configuration for logging
*/
static maskSensitiveConfig(config: SAP_B1_Config): Partial<SAP_B1_Config>;
/**
* Get configuration summary for display
*/
getConfigSummary(): any;
/**
* Check if configuration is for production
*/
isProduction(): boolean;
/**
* Check if configuration is for development
*/
isDevelopment(): boolean;
/**
* Check if HTTP transport is enabled
*/
isHttpTransport(): boolean;
/**
* Check if streaming HTTP transport is enabled
*/
isStreamingHttpTransport(): boolean;
/**
* Get HTTP configuration if enabled
*/
getHttpConfig(): {
port: number;
host: string;
} | null;
}