Provides database access and management capabilities through Prisma ORM, including type-safe queries, database migrations, and data modeling for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, and CockroachDB databases.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Prisma MCP Servershow me the schema for the User model"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.

What is Prisma?
Prisma ORM is a next-generation ORM that consists of these tools:
Prisma Client: Auto-generated and type-safe query builder for Node.js & TypeScript
Prisma Migrate: Declarative data modeling & migration system
Prisma Studio: GUI to view and edit data in your database
Prisma Client can be used in any Node.js or TypeScript backend application (including serverless applications and microservices). This can be a REST API, a GraphQL API, a gRPC API, or anything else that needs a database.
If you need a database to use with Prisma ORM, check out
Related MCP server: SaaS database MCP
Getting started
Quickstart (5min)
The fastest way to get started with Prisma is by following the quickstart guides. You can choose either of two databases:
Bring your own database
If you already have your own database, you can follow these guides:
How Prisma ORM works
This section provides a high-level overview of how Prisma ORM works and its most important technical components. For a more thorough introduction, visit the Prisma documentation.
The Prisma schema
Every project that uses a tool from the Prisma toolkit starts with a Prisma schema file. The Prisma schema allows developers to define their application models in an intuitive data modeling language and configure generators.
In this schema, you configure three things:
Data source: Specifies your database type and thus defines the features and data types you can use in the schema
Generator: Indicates that you want to generate Prisma Client
Data model: Defines your application models
prisma.config.ts
Database connection details are defined via prisma.config.ts.
If you store the database connection string in process.env, an env function can help you access it in a type safe way and throw an error if it is missing at run time:
Prisma ORM does not load the .env files for you automatically. If you want to populate the environment variables from a .env file, consider using a package such as dotenv or @dotenvx/dotenvx.
The configuration file may look like this in that case:
To start a local PostgreSQL development server without using Docker and without any configuration, run prisma dev:
Alternatively, spin up an instant Prisma Postgres® database in the cloud:
The Prisma data model
On this page, the focus is on the data model. You can learn more about Data sources and Generators on the respective docs pages.
Functions of Prisma models
The data model is a collection of models. A model has two major functions:
Represent a table in the underlying database
Provide the foundation for the queries in the Prisma Client API
Getting a data model
There are two major workflows for "getting" a data model into your Prisma schema:
Generate the data model from introspecting a database
Manually writing the data model and mapping it to the database with Prisma Migrate
Once the data model is defined, you can generate Prisma Client which will expose CRUD and more queries for the defined models. If you're using TypeScript, you'll get full type-safety for all queries (even when only retrieving the subsets of a model's fields).
Accessing your database with Prisma Client
Step 1: Install Prisma
First, install Prisma CLI as a development dependency and Prisma Client:
Step 2: Set up your Prisma schema
Ensure your Prisma schema includes a generator block with an output path specified:
Step 3: Configure Prisma Config
Configure the Prisma CLI using a prisma.config.ts file. This file configures Prisma CLI subcommands like migrate and studio. Create a prisma.config.ts file in your project root:
Note: Environment variables from .env files are not automatically loaded when using prisma.config.ts. You can use dotenv by importing dotenv/config at the top of your config file. For Bun, .env files are automatically loaded.
Learn more about Prisma Config and all available configuration options.
Step 4: Generate Prisma Client
Generate Prisma Client with the following command:
This command reads your Prisma schema and generates the Prisma Client code in the location specified by the output path in your generator configuration.
After you change your data model, you'll need to manually re-generate Prisma Client to ensure the generated code gets updated:
Refer to the documentation for more information about "generating the Prisma client".
Step 5: Use Prisma Client to send queries to your database
Once the Prisma Client is generated, you can import it in your code and send queries to your database.
Import and instantiate Prisma Client
You can import and instantiate Prisma Client from the output path specified in your generator configuration:
Note: As of Prisma 7, you will need to use a driver adapter. For example, when using PostgreSQL with a driver adapter:
To load environment variables, you can use dotenv by importing dotenv/config, use tsx --env-file=.env, node --env-file=.env, or Bun (which loads .env automatically).
Now you can start sending queries via the generated Prisma Client API, here are a few sample queries. Note that all Prisma Client queries return plain old JavaScript objects.
Learn more about the available operations in the Prisma Client docs or watch this demo video (2 min).
Retrieve all User records from the database
Include the posts relation on each returned User object
Filter all Post records that contain "prisma"
Create a new User and a new Post record in the same query
Update an existing Post record
Usage with TypeScript
Note that when using TypeScript, the result of this query will be statically typed so that you can't accidentally access a property that doesn't exist (and any typos are caught at compile-time). Learn more about leveraging Prisma Client's generated types on the Advanced usage of generated types page in the docs.
Community
Prisma has a large and supportive community of enthusiastic application developers. You can join us on Discord and here on GitHub.
Badges
Built something awesome with Prisma? 🌟 Show it off with these badges, perfect for your readme or website.
Security
If you have a security issue to report, please contact us at security@prisma.io.
Support
Ask a question about Prisma
You can ask questions and initiate discussions about Prisma-related topics in the prisma repository on GitHub.
Create a bug report for Prisma
If you see an error message or run into an issue, please make sure to create a bug report! You can find best practices for creating bug reports (like including additional debugging output) in the docs.
Submit a feature request
If Prisma currently doesn't have a certain feature, be sure to check out the roadmap to see if this is already planned for the future.
If the feature on the roadmap is linked to a GitHub issue, please make sure to leave a 👍 reaction on the issue and ideally a comment with your thoughts about the feature!
Contributing
Refer to our contribution guidelines and Code of Conduct for contributors.
Tests Status
Prisma Tests Status:
Ecosystem Tests Status: