Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,210
  • Linux
  • Apple
_steps.ts1.43 kB
import fs from 'fs' import path from 'path' import { $ } from 'zx' import { executeSteps } from '../_utils/executeSteps' void executeSteps({ setup: async () => { await $`pnpm install` await $`pnpm prisma db push` }, test: async () => { // ensure that we already have an engine, as expected if ((await hasEngineFile()) === false) { throw new Error('libquery_engine-debian.so should be found') } // we change the schema to make sure that our unique naming of the generated // package json "name" field (via hash) does not interfere with the deletion await $`echo "// change the schema" >> ./prisma/schema.prisma` await $`pnpm prisma generate` // generate with no engine and ensure that it is gone await $`pnpm prisma generate --no-engine` if ((await hasEngineFile()) === true) { throw new Error('libquery_engine-debian.so should not be found') } // generate again without no engine and make a query await $`pnpm prisma generate` await $`pnpm jest` }, finish: async () => { await $`echo "done"` }, }) async function hasEngineFile() { const prismaPath = path.dirname( require.resolve('.prisma/client', { paths: [path.dirname(require.resolve('@prisma/client'))], }), ) const folderFilePaths = await fs.promises.readdir(prismaPath) return folderFilePaths.includes('libquery_engine-debian-openssl-3.0.x.so.node') }

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