UNPKG

perplexity-mcp-server

Version:

A Perplexity API Model Context Protocol (MCP) server that unlocks Perplexity's search-augmented AI capabilities for LLM agents. Features robust error handling, secure input validation, and transparent reasoning with the showThinking parameter. Built with

48 lines (47 loc) 1.47 kB
/** * Defines the structure for context information associated with a request or operation. */ export interface RequestContext { /** Unique identifier generated for the request context instance. */ requestId: string; /** ISO 8601 timestamp indicating when the context was created. */ timestamp: string; /** Allows for additional, arbitrary key-value pairs for specific context needs. */ [key: string]: any; } /** * Configuration interface for request context utilities */ export interface ContextConfig { /** Custom configuration properties */ [key: string]: unknown; } /** * Operation context with request data */ export interface OperationContext { /** Request context data */ requestContext?: RequestContext; /** Custom context properties */ [key: string]: unknown; } export declare const requestContextService: { config: ContextConfig; /** * Configure service settings * @param config New configuration * @returns Updated configuration */ configure(config: Partial<ContextConfig>): ContextConfig; /** * Get current configuration * @returns Current configuration */ getConfig(): ContextConfig; /** * Create a request context with unique ID and timestamp * @param additionalContext Additional context properties * @returns Request context object */ createRequestContext(additionalContext?: Record<string, unknown>): RequestContext; };