Skip to main content
Glama
mysql.ts472 B
import mysql from 'mysql2/promise'; import type { DB } from '../provider.js'; export default function createMysqlDb(): DB { const url = process.env.DATABASE_URL!; const pool = mysql.createPool(url); return { dialect: 'mysql', async query(sql, params) { const [rows] = await pool.query(sql, params); return { rows: rows as any[], rowCount: Array.isArray(rows) ? rows.length : 0 }; }, async close() { await pool.end(); } }; }

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/Muhammad-Idzhans/mcp-server'

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