Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

VS Code (/docs/guides/postgres/vscode)

For the complete Prisma documentation index, see llms.txt. A markdown version of any docs page is available by appending .md to its URL.

The Prisma VS Code extension provides a management UI for Prisma Postgres and agent-mode support for GitHub Copilot

Location: Guides > Postgres > VS Code

The Prisma VS Code extension adds Prisma Postgres management, an embedded Prisma Studio, and agent-mode support to Visual Studio Code, so you can create databases, edit data, and run migrations without leaving the editor.

[!NOTE] Be sure to update the VS Code extension regularly in order to maintain functionality and take advantage of new features in the latest release of Prisma ORM

The Prisma VS Code extension includes a dedicated UI to manage Prisma Postgres instances (local and remote).

The UI enables the following workflows:

  • Authenticate with the Prisma Console
  • View, create and delete Prisma Postgres instances (local & remote)
  • "Push to cloud": deploy a local Prisma Postgres instance to a remote one
  • View and edit data via an embedded Prisma Studio
  • Visualize your database schema

To manage Prisma Postgres instances via the UI in the Prisma VS Code extension:

  1. Ensure you have the latest version of the Prisma VS Code extension installed
  2. Find the Prisma logo in the Activity Bar
  3. Click the Sign in to get started button
  4. Authenticate with the Prisma Console via the popup and select a target workspace

The Prisma Extension can support both version 6 and version 7 of Prisma ORM. If you open a project using either version, you can set the supported version by the command palette or the diagnostics prompt.

VS Code command palette showing Prisma ORM version selection between version 6 and version 7.

Beyond managing your database instances, the Prisma VS Code extension embeds Prisma Studio directly in your editor, so you can create, update, and delete records without leaving VS Code. See the setup steps to get started.

Prisma provides its own Model Context Protocol (MCP) server that lets you manage Prisma Postgres databases, model database schemas and chat through migrations.

You can add the Prisma MCP server to VS Code using the one-click installation by clicking on the following link:

VS CODE

INSTALL PRISMA MCP SERVER

This will prompt you to open VS Code. Once opened, you'll be guided to install the Prisma MCP server directly into your VS Code configuration.

If your browser blocks the link, you can set it up manually by creating a .vscode/mcp.json file in your workspace and adding:

.vscode/mcp.json
{
  "servers": {
    "Prisma": {
      "url": "https://mcp.prisma.io/mcp"
    }
  }
}

Learn more about the MCP server in our MCP server documentation.

VS Code includes an agent mode (powered by GitHub Copilot) that automatically performs code changes and executes Prisma CLI commands based on your prompts.

The Prisma VS Code extension enables support for VS Code agent mode.

VS Code agent mode can perform the following tasks:

  • Check migration status (e.g. Flag unapplied migrations)
  • Create and apply schema migrations automatically
  • Sign in to the Prisma Data Platform
  • Provision Prisma Postgres instances

The latest version of the Prisma VS Code extension fully supports agent mode. Since extensions update automatically, no manual action is required to enable it.

[!NOTE] We recommend you to use the latest version of Prisma ORM.

To use the agent mode:

  1. Open GitHub Copilot Chat in VS Code and switch to Agent mode.
  2. With GitHub Copilot Chat open and the Prisma extension updated, type a request such as: "Create a new database for me and add the connection string to the .env file".
  3. The agent will request permission to make changes in your workspace.
  4. It automatically handles login to your Prisma Data Platform account before proceeding.
  5. Upon approval, the agent creates the new database and adds the connection string to your .env file.
  6. You can also use agent mode to run migrations, generate the Prisma Client, and perform other tasks.

[!NOTE] Currently, the agent mode uses your default workspace in the Prisma Data Platform.

Querying Prisma docs from VS Code using GitHub Copilot

Section titled “Querying Prisma docs from VS Code using GitHub Copilot”

Complementing the agent, the Prisma Copilot extension allows you to query Prisma documentation directly within VS Code.

You need to install the Prisma for Copilot extension from the GitHub marketplace.

Then, switch to Ask mode in GitHub Copilot Chat and type your question using the @prisma-for-github-copilot namespace.

For more details, refer to our GitHub Copilot documentation.

  • Firebase Studio: Learn how to use Prisma Postgres in the online Firebase Studio
  • Fly.io: Learn how to deploy applications using Prisma Postgres to Fly.io
  • Netlify: Learn how to create Prisma Postgres databases via the official Netlify extension and deploy your applications with it
  • Vercel: Learn how to create Prisma Postgres databases via the Vercel Marketplace and deploy your Next.js, Nuxt, and SvelteKit applications.
  • Viewing data: Viewing and editing data in Prisma Postgres via Prisma Studio or other database GUIs
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu