Skip to main content
Glama
prisma

Prisma MCP Server

Official
by prisma
hashes.ts810 B
import crypto from 'crypto' import { getSchemaWithPath, SchemaPathInput } from './getSchema' /** * Get a unique identifier for the project by hashing * the directory with `schema.prisma` */ export async function getProjectHash(schemaPath: SchemaPathInput): Promise<string> { // Default to cwd if the schema couldn't be found const projectPath = (await getSchemaWithPath({ schemaPath }))?.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) }

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

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