We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kermitic/mcp-test'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
db.js•687 B
import { createClient } from '@supabase/supabase-js';
import { config } from '../config/config.js';
import { logger } from '../utils/logger.js';
let supabaseClient = null;
export function initDatabase() {
if (!config.supabase.url || !config.supabase.serviceKey) {
throw new Error('Supabase URL and Service Key must be provided');
}
supabaseClient = createClient(
config.supabase.url,
config.supabase.serviceKey
);
logger.info('Database (Supabase) initialized');
return supabaseClient;
}
export function getSupabaseClient() {
if (!supabaseClient) {
throw new Error('Database not initialized. Call initDatabase() first.');
}
return supabaseClient;
}