Connect to AI
Database & ORM API Key

Prisma REST API

Type-safe database ORM with auto-generated queries

Prisma is a next-generation ORM that makes database access easy with an auto-generated and type-safe query builder for Node.js and TypeScript. It supports PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, and CockroachDB, providing developers with intuitive data modeling, automated migrations, and a powerful query engine for building scalable applications.

Base URL https://api.prisma.io/v1

API Endpoints

MethodEndpointDescription
POST/projectsCreate a new Prisma project with database configuration
GET/projects/{projectId}Retrieve project details including database configuration and connection settings for the specified projectId.
GET/projects/{projectId}/schemaGet the current Prisma schema for a project
PUT/projects/{projectId}/schemaUpdate the Prisma schema and trigger migration generation
POST/projects/{projectId}/migrationsCreate and apply a new database migration
GET/projects/{projectId}/migrationsList all migrations for a project with their status
POST/projects/{projectId}/migrations/{migrationId}/applyApply a specific migration to the database using the migrationId, updating the schema to match the migration definition.
POST/projects/{projectId}/migrations/{migrationId}/rollbackRollback a specific migration identified by migrationId, reverting the database to its previous state.
GET/projects/{projectId}/modelsList all data models defined in the Prisma schema
POST/projects/{projectId}/introspectIntrospect an existing database to generate Prisma schema
POST/projects/{projectId}/generateGenerate Prisma Client based on the current schema
GET/projects/{projectId}/seedGet the current database seeding configuration including script paths and execution settings.
POST/projects/{projectId}/seed/executeExecute database seeding scripts to populate the database with initial or test data.
GET/projects/{projectId}/metricsRetrieve query performance metrics and statistics
DELETE/projects/{projectId}Delete a Prisma project and its configuration

Code Examples

curl -X POST https://api.prisma.io/v1/projects/proj_123/migrations \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "add_user_table",
    "action": "create"
  }'

Use Prisma from Claude / Cursor / ChatGPT

Get a hosted MCP endpoint for Prisma. Paste your Prisma API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Prisma directly with your credentials — no local install, works on mobile.

prisma_generate_schema Generate or update Prisma schema based on natural language model descriptions and relationships
prisma_create_migration Create database migrations by analyzing schema changes and generating appropriate SQL
prisma_introspect_database Introspect an existing database and generate corresponding Prisma schema models
prisma_optimize_queries Analyze query patterns and suggest schema optimizations for better performance
prisma_seed_generator Generate realistic seed data based on Prisma schema definitions and constraints

Connect in 60 seconds

Paste your Prisma key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.

Connect Prisma to your AI →

Related APIs