@auth0/auth0-mcp-server
Version:
Auth0 Model Context Protocol (MCP) Server (Beta) — A secure and extendable implementation of an MCP server that provides AI assistants with controlled access to the Auth0 Management API through natural language. This project is in beta and not intended fo
37 lines (36 loc) • 1.4 kB
TypeScript
/**
* Options for masking sensitive fields
*/
export interface MaskOptions {
sensitiveFields?: string[];
replacement?: string;
}
/**
* Masks sensitive fields in an object or array
*
* This function recursively traverses the data structure and replaces
* values of sensitive fields with a redaction message. This prevents
* secrets from appearing in MCP client logs while maintaining the
* structure of the response for AI consumption.
*
* @param data - The data to mask (object, array, or primitive)
* @param options - Optional configuration for which fields to mask and replacement text
* @returns A new object/array with sensitive fields masked
*/
export declare function maskSensitiveFields(data: any, options?: MaskOptions): any;
/**
* Checks if an object contains any sensitive fields
*
* @param data - The data to check
* @param sensitiveFields - Optional list of sensitive field names
* @returns True if sensitive fields are found, false otherwise
*/
export declare function containsSensitiveFields(data: any, sensitiveFields?: string[]): boolean;
/**
* Gets a list of sensitive field names found in the data
*
* @param data - The data to analyze
* @param sensitiveFields - Optional list of sensitive field names
* @returns Array of sensitive field names found
*/
export declare function getSensitiveFieldNames(data: any, sensitiveFields?: string[]): string[];