Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,232
  • Linux
  • Apple
capture.ts1.08 kB
export interface EventCapture { capture(id: string, name: string, payload: unknown): Promise<void> } export class EventCaptureError extends Error { constructor(event: string, status: string) { super(`Failed to submit Posthog event '${event}': ${status}`) } } const posthogCaptureUrl = new URL('https://proxyhog.prisma-data.net/capture') const posthogKey = 'phc_gr2e9OTFh5iwE6IOuHPngwVm9jDtbC04nBjb8gcVG9a' type PosthogCapture<Props> = { api_key: string event: string distinct_id: string properties: Props } export class PosthogEventCapture implements EventCapture { async capture(id: string, name: string, payload: unknown) { const capture: PosthogCapture<unknown> = { api_key: posthogKey, event: name, distinct_id: id, properties: payload, } const resp = await fetch(posthogCaptureUrl.href, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(capture), }) if (!resp.ok) { throw new EventCaptureError(name, resp.statusText) } } }

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