UNPKG

mcp-ts-template

Version:

A production-grade TypeScript template for building robust Model Context Protocol (MCP) servers, featuring built-in observability with OpenTelemetry, advanced error handling, comprehensive utilities, and a modular architecture.

25 lines 1.06 kB
/** * @fileoverview Initializes and exports a singleton Supabase client instance. * This module ensures that the Supabase client is initialized once and shared * across the application, using credentials from the central configuration. * It handles both the standard client and the admin client (using the service role key). * * @module src/services/supabase/supabaseClient */ import { SupabaseClient } from "@supabase/supabase-js"; type Database = Record<string, unknown>; /** * Returns the singleton Supabase client instance. * Throws an McpError if the client is not initialized. * @returns The Supabase client. */ export declare const getSupabaseClient: () => SupabaseClient<Database>; /** * Returns the singleton Supabase admin client instance. * This client uses the service role key and bypasses RLS. * Throws an McpError if the admin client is not initialized. * @returns The Supabase admin client. */ export declare const getSupabaseAdminClient: () => SupabaseClient<Database>; export {}; //# sourceMappingURL=supabaseClient.d.ts.map