Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
hashes.ts879 B
import crypto from 'crypto' import { getSchemaWithPath } from './getSchema' /** * Get a unique identifier for the project by hashing * the directory with `schema.prisma` */ export async function getProjectHash( schemaPathFromArgs: string | undefined, schemaPathFromConfig: string | undefined, ): Promise<string> { // Default to cwd if the schema couldn't be found const projectPath = (await getSchemaWithPath(schemaPathFromArgs, schemaPathFromConfig))?.schemaPath ?? process.cwd() return crypto.createHash('sha256').update(projectPath).digest('hex').substring(0, 8) } /** * Get a unique identifier for the CLI installation path * which can be either global or local (in project's node_modules) */ export function getCLIPathHash(): string { const cliPath = process.argv[1] return crypto.createHash('sha256').update(cliPath).digest('hex').substring(0, 8) }

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