mcpbeat Sign in

Prisma Database Setup Sqlserver Skill for Cursor

SQL Server Setup. Reference when using this Prisma feature.

616 tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
8
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-database-setup-sqlserver

What comes with it

111 bytes besides the instruction
metadata.json

The instruction itself

10 sections, as written by the author

SQL Server Setup

Configure Prisma with Microsoft SQL Server.

Prerequisites

  • SQL Server 2017, 2019, 2022, or Azure SQL
  • TCP/IP enabled

1. Schema Configuration

In prisma/schema.prisma:

datasource db {
  provider = "sqlserver"
}

generator client {
  provider = "prisma-client"
  output   = "../generated"
}

2. Config Configuration (v7)

In prisma.config.ts:

import { defineConfig, env } from 'prisma/config'

export default defineConfig({
  schema: 'prisma/schema.prisma',
  datasource: {
    url: env('DATABASE_URL'),
  },
})

3. Environment Variable

In .env:

DATABASE_URL="sqlserver://localhost:1433;database=mydb;user=sa;password=Password123;encrypt=true;trustServerCertificate=true"

Connection String Format

sqlserver://HOST:PORT;database=DB;user=USER;password=PASS;encrypt=true;trustServerCertificate=true
  • encrypt: Required for Azure (true).
  • trustServerCertificate: True for self-signed certs (local dev).

Driver Adapter (Prisma ORM 7 required)

Prisma ORM 7 uses the query compiler by default, so you must use a driver adapter.

  • Install adapter and driver:
   npm install @prisma/adapter-mssql mssql
  • Instantiate Prisma Client with the adapter:
   import 'dotenv/config'
   import { PrismaClient } from '../generated/client'
   import { PrismaMssql } from '@prisma/adapter-mssql'

   const adapter = new PrismaMssql({
     server: 'localhost',
     port: 1433,
     database: 'mydb',
     user: process.env.SQLSERVER_USER,
     password: process.env.SQLSERVER_PASSWORD,
     options: {
       encrypt: true,
       trustServerCertificate: true,
     },
   })

   const prisma = new PrismaClient({ adapter })

Common Issues

"Login failed for user"

  • SQL Server auth vs Windows auth. Prisma typically uses SQL Server authentication (username/password).
  • Ensure TCP/IP is enabled in SQL Server Configuration Manager.

"Table not found" (dbo schema)

Prisma assumes dbo schema by default. If using another schema, update the model or connection string? SQL Server provider mostly sticks to default schema.

How to use it

Copy the folder

Take prisma/prisma-database-setup-sqlserver from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference npm. Without those the skill loads but fails at the first command.