Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,213
  • Linux
  • Apple
show.ts1.54 kB
import type { PrismaConfigInternal } from '@prisma/config' import { Command } from '@prisma/internals' import { green } from 'kleur/colors' import { argOrThrow, getOptionalParameter } from '../_lib/cli/parameters' import { messages } from '../_lib/messages' import { requestOrThrow } from '../_lib/pdp' import { getTokenOrThrow, platformParameters } from '../_lib/utils' export class Show implements Command { public static new() { return new Show() } public async parse(argv: string[], _config: PrismaConfigInternal): Promise<string | Error> { const args = argOrThrow(argv, { ...platformParameters.global, '--sensitive': Boolean, }) const token = await getTokenOrThrow(args) const { me } = await requestOrThrow<{ me: { user: { __typename: string id: string email: string displayName: string } } }>({ token, body: { query: /* graphql */ ` query { me { __typename user { __typename id email displayName } } } `, }, }) const data = { ...me.user, token: getOptionalParameter(args, ['--sensitive']) ? token : null, } return messages.sections([ messages.info(`Currently authenticated as ${green(me.user.email)}`), messages.resource(data, { email: true, token: true, }), ]) } }

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