# Prisma ORM 6.6.0: ESM Support, D1 Migrations & MCP Server URL: https://www.prisma.io/blog/prisma-orm-6-6-0-esm-support-d1-migrations-and-prisma-mcp-server Published: 2025-04-08 Authors: Nikolas Burk Tags: announcement, orm Description: The v6.6.0 Prisma ORM release is packed with exciting features: ESM support, migrations on Cloudflare D1, an MCP server to manage DBs & a lot more. > Blog posts describe Prisma as it was on the date shown and are not kept current. Before implementing from a post, check the documentation index at https://www.prisma.io/docs/llms.txt and the changelog at https://www.prisma.io/changelog.md. > For an index of every published post, fetch https://www.prisma.io/blog/llms.txt. The [v6.6.0 Prisma ORM release](https://github.com/prisma/orm/releases/tag/6.6.0) comes packed with exciting features: ESM support via a new generator, Early Access support for Cloudflare D1 and Turso migrations, an MCP server for managing databases directly in your favorite AI tools, and more. ## Prisma ORM v6.6.0 is out [#prisma-orm-v660-is-out] Since publishing our [ORM manifesto](https://www.prisma.io/blog/prisma-orm-manifesto), we've been shipping meaningful improvements to Prisma ORM at a steady pace. In v6.6.0, we are bringing long-awaited features like [ESM support](https://github.com/prisma/orm/issues/5030) and an initial version of pushing schemas changes to D1 and Turso databases to life. ## ESM support with more flexible `prisma-client` generator (Early Access) [#esm-support-with-more-flexible-prisma-client-generator-early-access] We are excited to introduce a new `prisma-client` generator that's more flexible, comes with ESM support and removes any magic behaviours that can cause friction with the current `prisma-client-js` generator. Here are the main differences: * Requires an `output` path; no β€œmagic” generation into `node_modules` any more * Supports ESM and CommonJS via the `moduleFormat` field * **Outputs plain TypeScript that's bundled just like the rest of your application code**; this gives you more control and flexibility about your application bundling If you've had problems with Prisma ORM in your project setup before (e.g. monorepos, Next.js, Vite, ...), we think that this new generator will greatly improve your workflow β€” try it out and let us know what you think! Here's how you can use the new `prisma-client` generator in your Prisma schema: ```prisma // prisma/schema.prisma generator client { provider = "prisma-client" // no `-js` at the end output = "../src/generated/prisma" // `output` is required moduleFormat = "esm" // or `"cjs"` for CommonJS } ``` The generator also has more [fields](https://www.prisma.io/docs/orm/v7/prisma-schema/overview/generators#field-reference-2) like `runtime`, `generatedFileExtension` and `importFileExtension` that help you adapt the generated Prisma Client code to your specific project needs. In your application, you can then import the `PrismaClient` constructor (and anything else) from the generated folder: ```ts // src/index.ts import { PrismaClient } from './generated/prisma/client' ``` As of now, we recommend keeping the generated `'./generated/prisma'` folder out of version control by adding it to `.gitignore` because the compiled query engine binary may cause compatibility issues when running the app on another machine (with a different OS): ```shell # .gitignore ./src/generated/prisma ``` We see the `prisma-client` generator as the more modern version compared to `prisma-client-js` and will make it the default generator with the next major version increment in Prisma 7. Here are some more exciting features we're planning to add: * splitting the generated generated Prisma Client file to avoid [slowing down code editors](https://github.com/prisma/orm/issues/4807) due to long generated files * no more need for the Accelerate extension when using Prisma Postgres ## MCP server to manage Prisma Postgres via LLMs (Preview) [#mcp-server-to-manage-prisma-postgres-via-llms-preview] [Prisma Postgres](https://www.prisma.io/blog/prisma-postgres-the-future-of-serverless-databases) is the first serverless database without cold starts. Designed for optimal efficiency and high performance, it's the perfect database to be used alongside AI tools like Cursor, Windsurf, Lovable or co.dev. In this release, we're adding a command to start a Prisma MCP server that you can integrate in your favorite AI development environment. Thanks to that MCP server, you can now: * tell your AI agent to create new DB instances * design your data model * chat through a database migration … and much more. To get started, [add this snippet](https://www.prisma.io/docs/ai/tools/mcp-server) to the MCP configuration of your favorite AI tool: ```json { "mcpServers": { "Prisma": { "command": "npx", "args": ["-y", "prisma", "mcp"] } } } ``` ## Cloudflare D1 & Turso/LibSQL migrations (Early Access) [#cloudflare-d1--tursolibsql-migrations-early-access] [Cloudflare D1](https://www.prisma.io/docs/orm/v6/overview/databases/cloudflare-d1) and [Turso](https://www.prisma.io/docs/orm/v7/core-concepts/supported-databases/sqlite) are popular database providers that are both based on SQLite. While you can query them with Prisma ORM using the respective driver adapter, previous versions of Prisma ORM weren't able to make *schema changes* against these databases. With today's release, we're sharing the first [Early Access](https://www.prisma.io/docs/orm/v7/more/releases#early-access) version of native migration support for D1 and Turso and these commands: * `prisma db push`: Updates the schema of the remote database based on your Prisma schema * `prisma db pull`: Introspects the schema of the remote database and updates your local Prisma schema * `prisma migrate diff`: Outputs the difference between the schema of the remote database and your local Prisma schema > **Note**: Support for `prisma migrate dev` and `prisma migrate deploy` is underway and will come very soon! To use these commands, you need to connect the Prisma CLI to your D1 or Turso instance by using the driver adapter in your [`prisma.config.ts`](https://www.prisma.io/docs/orm/v7/reference/prisma-config-reference) file. Here is an example for D1: ```ts import path from 'node:path' import type { PrismaConfig } from 'prisma' import { PrismaD1HTTP } from '@prisma/adapter-d1' // import your .env file import 'dotenv/config' type Env = { CLOUDFLARE_D1_TOKEN: string CLOUDFLARE_ACCOUNT_ID: string CLOUDFLARE_DATABASE_ID: string } export default { earlyAccess: true, schema: path.join('prisma', 'schema.prisma'), migrate: { async adapter(env) { return new PrismaD1HTTP({ CLOUDFLARE_D1_TOKEN: env.CLOUDFLARE_D1_TOKEN, CLOUDFLARE_ACCOUNT_ID: env.CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_DATABASE_ID: env.CLOUDFLARE_DATABASE_ID, }) }, }, } satisfies PrismaConfig ``` With that setup, you can now execute schema changes against your D1 instance by running: ``` npx prisma db push ``` You can learn more details in the docs: * [Cloudflare D1](https://www.prisma.io/docs/orm/v6/overview/databases/cloudflare-d1) * [Turso / LibSQL](https://www.prisma.io/docs/orm/v7/core-concepts/supported-databases/sqlite) ## New `--prompt` option on `prisma init` [#new---prompt-option-on-prisma-init] You can now pass a `--prompt` option to the `prisma init` command to have it scaffold a Prisma schema for you and deploy it to a fresh Prisma Postgres instance: ``` npx prisma init --prompt "Simple habit tracker application" ``` For everyone, following social media trends, we also created an alias called `--vibe` for you 😎 ``` npx prisma init --vibe "Cat meme generator" ``` ## The future of Prisma ORM is exciting [#the-future-of-prisma-orm-is-exciting] This is just the beginning, we have a lot more exciting things coming to Prisma ORM in the next weeks and months β€” check out our [3-months roadmap](https://github.com/prisma/orm/issues/26592) to get a glimpse of what's next or catch up on the most recent developments in our [changelog](https://www.prisma.io/changelog) (such as the [performance improvements gained from our move from Rust to TypeScript](https://www.prisma.io/blog/rust-to-typescript-update-boosting-prisma-orm-performance)). If you want to try the new workflows from this release, explore [Prisma ORM](https://www.prisma.io/orm), configure [Prisma's MCP tooling](https://www.prisma.io/mcp), or spin up [Prisma Postgres](https://www.prisma.io/postgres) for the database side of the experience. Let us know on [X](https://pris.ly/x?utm_source=blog\&utm_medium=conclusion) and our [Discord](https://pris.ly/discord?utm_source=blog\&utm_medium=conclusion) what you think of this release β€” and follow us to stay in the loop with all the exciting things coming your way!