UNPKG

@grebyn/toolflow-mcp-server

Version:

MCP server for managing other MCP servers - discover, install, organize into bundles, and automate with workflows. Uses StreamableHTTP transport with dual OAuth/API key authentication.

38 lines 1.3 kB
/** * Shared Logging Utilities * * Centralized utilities for MCP logging to eliminate code duplication * and provide consistent sanitization and authentication handling */ import { UserContext } from '../tools/types.js'; /** * Sanitize sensitive data from any object * Enhanced to handle nested structures and more token patterns */ export declare function sanitizeData(data: any): any; /** * Calculate approximate size of JSON data in bytes */ export declare function calculateDataSize(data: any): number; /** * Extract client identifier from user agent string */ export declare function extractClientIdentifier(userAgent?: string): string | undefined; /** * Validate authentication from user context * Returns auth header or throws error */ export declare function getAuthHeader(context: UserContext): string; /** * Determine execution status from result/error */ export declare function determineExecutionStatus(error?: any): 'success' | 'failure' | 'error'; /** * Extract error message safely */ export declare function extractErrorMessage(error?: any): string | undefined; /** * Basic retry wrapper for database operations */ export declare function withRetry<T>(operation: () => Promise<T>, maxRetries?: number): Promise<T>; //# sourceMappingURL=shared-logging.d.ts.map