Skip to main content
Glama
client.ts•713 B
import { Kysely, PostgresDialect } from 'kysely'; import { Pool } from 'pg'; import type { DB } from '../types/database-generated.js'; export function createDatabase(connectionString: string): Kysely<DB> { return new Kysely<DB>({ dialect: new PostgresDialect({ pool: new Pool({ connectionString, max: 20, idleTimeoutMillis: 30000, connectionTimeoutMillis: 30000, }), }), }); } export class DatabaseClient { private db: Kysely<DB>; constructor(connectionString: string) { this.db = createDatabase(connectionString); } get instance(): Kysely<DB> { return this.db; } async destroy(): Promise<void> { await this.db.destroy(); } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scanadi/mcp-ai-memory'

If you have feedback or need assistance with the MCP directory API, please join our Discord server