@kaminaduck/scryfall-mcp-server
Version:
A Model Context Protocol (MCP) server that provides access to the Scryfall API for Magic: The Gathering card data
69 lines • 2.17 kB
TypeScript
/**
* Logging utility that respects MCP stdio protocol constraints.
*
* In MCP mode, all output must go to stderr to avoid interfering with
* the JSON protocol on stdout. This module provides consistent logging
* across different execution modes.
*/
export declare enum LogLevel {
DEBUG = 0,
INFO = 1,
WARN = 2,
ERROR = 3
}
declare class Logger {
private minLevel;
private originalLevel;
private isMcp;
private temporaryLevelTimeout;
constructor();
private formatMessage;
private formatTimestamp;
private log;
debug(message: string, ...args: any[]): void;
info(message: string, ...args: any[]): void;
warn(message: string, ...args: any[]): void;
error(message: string, ...args: any[]): void;
setLevel(level: LogLevel): void;
/**
* Check if running in MCP mode (useful for other modules)
*/
isMcpMode(): boolean;
/**
* Flush any pending stderr writes
*/
flush(): void;
/**
* Temporarily set a different log level for debugging
* @param level The temporary log level
* @param duration Duration in milliseconds (default: 30 seconds)
*/
setTemporaryLevel(level: LogLevel, duration?: number): void;
/**
* Reset log level to original value immediately
*/
resetLevel(): void;
/**
* Log environment diagnostics to help troubleshoot Claude Desktop integration issues.
*/
logEnvironmentDiagnostics(): void;
/**
* Log Windows-specific path information to help diagnose path-related issues.
*/
logWindowsPathInfo(): void;
/**
* Enhanced error logging with Windows-specific error codes and path information.
*/
logWindowsError(message: string, error: any, context?: string): void;
/**
* Log macOS-specific path information to help diagnose path-related issues.
*/
logMacOSPathInfo(): void;
/**
* Enhanced error logging with macOS-specific error codes and path information.
*/
logMacOSError(message: string, error: any, context?: string): void;
}
export declare const logger: Logger;
export { Logger };
//# sourceMappingURL=logger.d.ts.map