Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,213
  • Linux
  • Apple
database.ts782 B
import { PrismaMariaDb } from '@prisma/adapter-mariadb' import { PrismaPg } from '@prisma/adapter-pg' import { PrismaClient as MySQLClient } from '../generated/mysql-client/client' import { PrismaClient as PostgresClient } from '../generated/postgres-client/client' // PostgreSQL client const postgresClient = new PostgresClient({ adapter: new PrismaPg({ connectionString: process.env.POSTGRES_URL! }, { schema: 'public' }), }) // MySQL client const mysqlUrl = new URL(process.env.MYSQL_URL!) const mysqlClient = new MySQLClient({ adapter: new PrismaMariaDb({ host: mysqlUrl.hostname, user: mysqlUrl.username, password: mysqlUrl.password, database: mysqlUrl.pathname.slice(1), port: Number(mysqlUrl.port), }), }) export { mysqlClient, postgresClient }

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/prisma/prisma'

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