Neon VS Code Extension
The Neon extension lets you connect to any Neon branch and manage your database directly in your IDE. Available for VS Code, Cursor, and other VS Code compatible editors, you can browse schemas, run q...
The Neon extension lets you connect to any Neon branch and manage your database directly in your IDE. Available for VS Code, Cursor, and other VS Code-compatible editors, you can browse schemas, run queries, edit table data, and get connection strings, without leaving your editor.
What you can do
Section titled “What you can do”With the Neon extension, you can:
- Connect to projects and branches
The extension automatically detects valid Neon connection strings in your code. - Browse your database
Use a clean tree view showing databases, schemas, tables, views, sequences, and relationships. - Manage databases and tables
Create and manage databases, schemas, and tables directly in your IDE. - Run queries with SQL Editor
Write and execute queries against your selected database. View and sort results, and export data if needed. - Edit data with Table Data Editor
View, edit, insert, and delete rows in a spreadsheet-like interface. Import and export tables in CSV, JSON, or SQL formats. - Enable AI-powered features
Automatically configure the Neon MCP Server so you can manage projects, branches, and databases from your AI chat.
Requirements
Section titled “Requirements”- VS Code 1.85.0+, Cursor, or other VS Code-compatible editor.
- A Neon account.
Install the extension
Click one of the buttons below to install the extension directly, or search for "Neon - Serverless Postgres" in your editor's Extensions view (
Ctrl+Shift+XorCmd+Shift+Xon Mac).

For other VS Code-compatible editors, install from the Open VSX Registry.
Sign in to Neon
- Open the Neon panel in the sidebar (look for the Neon logo).
- Click Sign in.
- Complete OAuth authorization in your browser.
Once signed in, the extension automatically configures the Neon MCP server for AI features.
Connect to a branch
The extension scans your workspace for existing Neon connection strings and can automatically detect your project and branch.
You can also manually select:
- Organization: your Neon organization.
- Project: the project containing your database.
- Branch: the branch to connect to.
Click Connect to establish the connection.
note
If you're new to Neon, this reflects our object hierarchy: organizations contain projects, and projects contain branches. Learn more about how Neon organizes your data.
Create a new branch
You can create a new branch for feature development, bug fixes, or collaborative work:
- Select your organization and project.
- Click Create new branch... in the branch dropdown.
- Enter a descriptive branch name (for example,
feature/user-authentication,bugfix/login-validation). - Choose the parent branch you want to branch from.
The extension creates the new branch and connects you immediately.
Use your connection string
After connecting, copy the connection string from the extension panel and add it to your
.envfile:Bash DATABASE_URL="postgresql://user:password@ep-example-123456.us-east-2.aws.neon.tech/neondb?sslmode=require"Start developing
Your application now connects directly to your Neon branch. See the quickstart for your language or framework for more details.
Database explorer
Section titled “Database explorer”Once connected, the extension provides a comprehensive Database Explorer in the sidebar that lets you browse your database structure with an intuitive tree view:
What you can see
Section titled “What you can see”- Databases: All available databases in your connected branch.
- Schemas: Database schemas organized in a tree structure.
- Tables & Views: All tables and views with their column definitions.
- Sequences: Database sequences.
- Data Types: Column data types, constraints, and relationships.
- Primary Keys: Clearly marked primary key columns.
- Foreign Keys: Visual indicators for foreign key relationships.
Schema view actions
Section titled “Schema view actions”-
Right-click any table to access quick actions:
- Query Table: Opens a pre-filled
SELECT *query in the SQL Editor. - View Table Data: Opens the table data in an editable spreadsheet view.
- Truncate Table: Remove all rows from a table.
- Drop Table: Delete the table entirely.
- Query Table: Opens a pre-filled
-
Right-click databases or schemas for management operations.
-
Refresh the schema view to see the latest structural changes.
-
Expand/collapse database objects to focus on what you need.
The schema view automatically updates when you switch between branches, so you always see the current state of your connected database.
Database management actions
Section titled “Database management actions”Right-click databases, schemas, or tables to access management operations:
- Create and drop databases and schemas: Add new databases or remove existing ones.
- Table designer: Create tables with columns, indexes, and constraints.
- Foreign key management: Set up relationships with referential integrity.
- View and sequence management: Create and manage database views and sequences.
- User and role management: Control database access and permissions.
- Data import/export: Transfer data in CSV, JSON, or SQL formats.
Access these features through the context menu (right-click) in the Database Explorer.
SQL Editor
Section titled “SQL Editor”Execute SQL queries directly in your IDE with the integrated SQL Editor:
Features
Section titled “Features”- Syntax Highlighting: Full SQL syntax support.
- Results Display: View query results in a tabular format with sorting and filtering.
- Export Options: Export results to CSV, JSON, or SQL formats.
- Query Statistics: View execution time and performance metrics.
- Error Highlighting: Detailed error messages for debugging.
How to use
Section titled “How to use”- From Schema View: Right-click any table and select "Query Table" for a pre-filled SELECT query.
- From Command Palette: Use
Ctrl+Shift+Pand search for "Neon: Open SQL Editor".
The SQL Editor connects directly to your database connection, so you can query any database in your current branch without additional setup.
Table data editor
Section titled “Table data editor”View and edit your table data with a spreadsheet-like interface:
Viewing data
Section titled “Viewing data”- Paginated Display: Navigate through large datasets with page controls.
- Column Management: Show/hide columns, sort by any column.
- Data Types: Visual indicators for different data types (primary keys, foreign keys, etc.).
- Null Handling: Clear visualization of NULL values.
Editing capabilities
Section titled “Editing capabilities”- Inline Editing: Edit field values directly in the table.
- Insert New Rows: Add new records with the "Add Row" button.
- Delete Rows: Remove records with confirmation dialogs.
- Real-time Validation: Data validation based on column types and constraints.
important
Section titled “important”Row editing and deletion require tables to have a primary key defined. This ensures data integrity by uniquely identifying rows for safe updates.
How to access
Section titled “How to access”- From Schema View: Right-click any table and select "View Table Data".
- The data opens in a new tab with full editing capabilities.
- Changes are immediately applied to your database.
- Use the refresh button to see updates from other sources.
Perfect for quick data inspection, testing, and small data modifications without writing SQL.
AI agent integration
Section titled “AI agent integration”The Neon extension includes built-in support for AI-powered database features through the Neon MCP Server:
Features
Section titled “Features”- Automatic MCP Server configuration: enables AI-powered database features with your coding agent.
- Chat with your database using natural language.
- AI-assisted SQL generation and schema understanding.
- View and manage MCP server status directly in the extension.
The MCP server is automatically configured when you sign in. You can view the status and manage the configuration from the extension panel.
Extension settings
Section titled “Extension settings”This extension contributes the following settings:
| Setting | Description | Default |
|---|---|---|
neon.mcpServer.autoConfigEnabled |
Automatically configure the Neon MCP server on sign-in | true |
Available commands
Section titled “Available commands”You can run any command by opening the Command Palette (Cmd+Shift+P or Ctrl+Shift+P) and typing "Neon".
| Command | Description |
|---|---|
| Neon: Sign In | Sign in to your Neon account |
| Neon: Sign Out | Sign out from your Neon account |
| Neon: Open SQL Editor | Open a new SQL editor tab |
| Neon: View Databases | Open the database tree view |
| Neon: Refresh Databases | Refresh the database tree view |
| Neon: Create Branches | Create Neon branches |
| Neon: Get Started | Automatically configure your project to work with Neon |
Troubleshooting
Section titled “Troubleshooting”Connection errors
Section titled “Connection errors”- Verify your Neon account is active.
- Ensure you have access to the selected project and branch.
- Check your network connection.
MCP Server not working
Section titled “MCP Server not working”- Check the MCP Server panel status in the extension.
- Try disabling and re-enabling the MCP server.
- Reload the window after configuration changes.
Database view not updating
Section titled “Database view not updating”- Use the refresh button in the Databases view title bar.
- Disconnect and reconnect to the branch.
Next steps & resources
Section titled “Next steps & resources”Need help?
Section titled “Need help?”Join our Discord Server to ask questions or see what others are doing with Neon. For paid plan support options, see Support.