Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
getEngineVersion.ts1.24 kB
import { getCliQueryEngineBinaryType } from '@prisma/engines' import { BinaryType } from '@prisma/fetch-engine' import { assertNodeAPISupported, getPlatformInfo } from '@prisma/get-platform' import { execa } from 'execa' import * as TE from 'fp-ts/TaskEither' import { resolveBinary } from '../resolveBinary' import { loadLibrary } from '../utils/load' type NodeAPILibrary = { version(): { commit: string } } export async function getEngineVersion(enginePath?: string, binaryName?: BinaryType): Promise<string> { if (!binaryName) { binaryName = getCliQueryEngineBinaryType() } enginePath = await resolveBinary(binaryName, enginePath) const platformInfo = await getPlatformInfo() if (binaryName === BinaryType.QueryEngineLibrary) { assertNodeAPISupported() const QE = loadLibrary<NodeAPILibrary>(enginePath, platformInfo) return `${BinaryType.QueryEngineLibrary} ${QE.version().commit}` } else { const { stdout } = await execa(enginePath, ['--version']) return stdout } } export function safeGetEngineVersion(enginePath?: string, binaryName?: BinaryType): TE.TaskEither<Error, string> { return TE.tryCatch( () => getEngineVersion(enginePath, binaryName), (error) => error as Error, ) }

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