UNPKG

ntfy-mcp-server

Version:

An MCP (Model Context Protocol) server designed to interact with the ntfy push notification service. It enables LLMs and AI agents to send notifications to your devices with extensive customization options.

69 lines (68 loc) 2.37 kB
import { RequestContext } from './rateLimiter.js'; /** * 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; } /** * Request context utilities class */ export declare class RequestContextService { private static instance; private config; /** * Private constructor to enforce singleton pattern */ private constructor(); /** * Get the singleton RequestContextService instance * @returns RequestContextService instance */ static getInstance(): RequestContextService; /** * 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; /** * Generate a secure random string * @param length Length of the string * @param chars Character set to use * @returns Random string */ generateSecureRandomString(length?: number, chars?: string): string; } export declare const requestContextService: RequestContextService; export declare const configureContext: (config: Partial<ContextConfig>) => ContextConfig; export declare const createRequestContext: (additionalContext?: Record<string, unknown>) => RequestContext; export declare const generateSecureRandomString: (length?: number, chars?: string) => string; declare const _default: { requestContextService: RequestContextService; configureContext: (config: Partial<ContextConfig>) => ContextConfig; createRequestContext: (additionalContext?: Record<string, unknown>) => RequestContext; generateSecureRandomString: (length?: number, chars?: string) => string; }; export default _default;