Skip to main content
Glama
LucasSiqueiraSurreco

Database Bridge MCP Server

factory.ts784 B
import { log } from "../../utils/index.js"; import type { DatabaseAdapter, DatabaseType } from "./types.js"; import { MySQLAdapter } from "./mysql.adapter.js"; import { PostgreSQLAdapter } from "./postgresql.adapter.js"; import { SQLiteAdapter } from "./sqlite.adapter.js"; export class AdapterFactory { static createAdapter(type: DatabaseType): DatabaseAdapter { log("info", `Creating database adapter for type: ${type}`); switch (type) { case "mysql": return new MySQLAdapter(); case "postgresql": return new PostgreSQLAdapter(); case "sqlite": return new SQLiteAdapter(); default: throw new Error( `Unsupported database type: ${type}. Supported types: mysql, postgresql, sqlite`, ); } } }

Latest Blog Posts

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/LucasSiqueiraSurreco/mcp-db-bridge'

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