Query and manage databases directly from your IDE
VS Code extension that auto-loads your project database and exposes it as MCP tools, so AI assistants like Claude Code and Cursor can query it directly.
Why it matters
Connect to and interact with multiple database systems (MySQL, Postgres, SQLite, MSSQL) without leaving your development environment, enabling seamless database operations during coding workflows.
Outcomes
What it gets done
Connect to MySQL databases from within the IDE
Query Postgres tables and retrieve results inline
Execute SQL commands against SQLite databases
Manage MSSQL database connections and operations
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/mcp-devdb | bash Overview
DevDb
A VS Code extension that auto-loads a project's database, giving developers a rich in-editor database client and exposing the same database to AI-powered IDEs and MCP clients like Claude Code, Cursor, and Windsurf through tools such as get-tables, get-schema, and run-query. Use it to browse, edit, and query a project's database from inside VS Code, or let an AI assistant query it directly via MCP, once configured. Zero-config auto-discovery covers Laravel, Django, Rails, Adonis, DDEV, and local Supabase projects out of the box.
What it does
DevDb is a VS Code extension that auto-loads a project's database and gives developers a rich in-editor database client - browsing, editing, and exporting data - built on a deep understanding of the database schema. Beyond the editor UI, it exposes that same database to AI-powered IDEs and MCP clients: once configured, an AI assistant can query the database naturally through MCP tools like get-tables, get-schema, get-database-type, and run-query, instead of the developer manually copying schema into a prompt.
When to use - and when NOT to
Use it in a VS Code project working against SQLite, MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, or Supabase, especially in a zero-config-supported framework such as DDEV, local Supabase, Adonis, Django, Ruby on Rails, or Laravel with default connection settings, where the database loads automatically with no setup at all. It is also useful specifically for the MCP integration: giving Claude Code, Cursor, Windsurf, or Cline the ability to inspect schema and run queries against a real project database rather than a schema pasted into context. MongoDB support, SSH-tunneled MySQL/MariaDB and PostgreSQL, and Supabase Cloud direct connections all require a paid Pro license - the free tier covers the core local databases and zero-config discovery, so a project needing remote or NoSQL connections should budget for that upgrade. It is a VS Code-specific tool, not usable outside that editor.
Inputs and outputs
For zero-config environments, input is just an already-configured application, its own .env, database.yml, settings.py, or docker-compose.yml is read directly; everywhere else, input is a .devdbrc JSON file in the project root listing database connection objects (name, type, host, port, credentials), with IntelliSense, JSON Schema validation, and quick snippets for each supported database type. Output is the DevDb view panel inside VS Code for browsing and editing tables, plus, once the MCP server script path is registered with an MCP client, live query results returned to that AI assistant through the get-tables, get-schema, get-database-type, and run-query tool set. Table data can also be exported as formatted JSON or SQL INSERT statements.
Integrations
A context menu entry opens any database table in DevDb by right-clicking its name, model, or entity directly from the editor, in any framework or programming language, not only the frameworks with zero-config support - the Adonis, Django, Rails, and Laravel detection additionally covers containerized Laravel Sail setups and VS Code dev containers. Laravel gets extra Code Lens integrations: viewing an Eloquent model's underlying table, generating a model factory pre-filled with real data, and a Query Explainer that sends a selected SQL query to MySQL Visual Explain for execution-plan analysis. MCP setup is documented per client: claude mcp add for Claude Code, and each IDE's own mcp.json for the rest. A custom vscode://devdb/open/table URI handler lets other tools deep-link directly into a specific table view.
Who it's for
Developers who want their project's real database data available both in a rich VS Code panel and to an AI coding assistant via MCP, particularly in Laravel, Django, Rails, or Adonis projects where zero-config auto-discovery removes setup entirely.
Source README
DevDb
VS Code Marketplace page β Open VSX Registry page
A lightweight VS Code extension that auto-loads your database and provides affordances from your database to aid development and debugging.
Built with π for developers.
Featured In
|
|
|
|
|
Latest Features
- Zero-config auto-detection for local Supabase projects
- Fix issues with Django projects zero-config support
- Correctly report MariaDB in DDEV projects
- [Pro] MongoDB support with automatic schema inference
- [Pro] MySQL/MariaDB over SSH tunnel
- [Pro] PostgreSQL over SSH tunnel
Sponsors
We are genuinely grateful to the following sponsors of DevDb:
- DevWorkspace Pro - Easily build and manage web apps, with conveniences that supercharge your productivity
- Traycer AI - A Powerful AI assistance, natively integrated into your VS Code workflow.
Features
MCP Server: Provide your database information to AI-powered IDEs and MCP clients like Cursor, Windsurf, etc.
Quick table open command: Press
Cmd+K Cmd+G(Mac) orCtrl+K Ctrl+G(Windows/Linux) to quickly open any table.Zero-config Database Auto-discovery: Automatically discover and load your database β no manual configuration required. Supports environments like DDEV, Adonis, Laravel, containerized setups (Laravel Sail), etc.
Database affordances for Local Development: Because of a deep understanding of your database schema, DevDb is able to provide affordances that aid development and debugging, such as one-click generation of Eloquent Model factories, etc.
Powerful IDE Integrations: DevDb nicely integrates your database with your IDE to provide very useful IDE-powered features like Context Menu & CodeLens Integrations directly in your editor, providing features like opening tables from code, invoking SQL query explainer when working on query optimization tasks, etc.
Rich Database Client with Intuitive UX: Dedicated database client view with one-click data browsing, inline editing, deletion, one-click reconnection, etc. Easily modify, set values to null, preview complex JSON data, all within a responsive interface.
Data Export: Export table data as well-formatted JSON or SQL INSERT statements copied to your clipboard or saved to file.
Comprehensive Multi-database Support: Seamlessly interface with SQLite, MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, and MongoDB. Connect to remote databases securely via SSH tunnels.
Intuitive Configuration System: In environments where automatic zero-config is unavailable, DevDb provides quick snippets that produce well-formatted templates, as well as JSON Schema validation IntelliSense, which altogether makes creating configuration file for connecting to your database an awesome experience.
Integrated Framework & Tool Support: Tailored support for popular frameworks and tools including Laravel, DDEV, Ruby on Rails, and Adonis ensures a seamless development experience. Need special feature(s) for your environment? We're listening!.
Cross-platform Compatibility: Engineered to perform consistently on Linux, macOS, and Windows, ensuring maximum flexibility as you can carry on your work across all these platforms.
Screenshots
Requirements
- VS Code 1.83 or newer
- A VS Code project using any of the supported databases
OS/Platform Support
- Linux *(Linux-x64, Linux-arm64, Linux-arm, Alpine-x64)
- macOS (Darwin-x64, Darwin-arm64 Apple Silicon)
- Windows (Win32-x64)
Ubuntu 20.04 (including equivalent distors) and below are not supported because they have reached EOL and no longer supported runners in GitHub Actions. See https://github.com/actions/runner-images/issues/11101
Quick Start
- In a VS Code project using any of the supported databases, ensure your database is properly configured and accessible from your application code.
- For zero-config environments, DevDb automatically discovers and auto-loads your database. View your database by opening the DevDb view like in the screenshot shown, or by using the shortcut.
UI Actions and Key Map
Cmd + K + Dto toggle the view panelCmd + K + Gto go to a tableCmd + Clicktable name in the sidebar to open the table in the current tabCmd + Clickon a database value to edit it- Click any value to preview it in the pane (useful for viewing prettified JSON string values)
- The right pane offers options to view the current table schema or selected value
- During edit sessions (activated during data edit/delete), the control box appears as shown in the screenshot
- During edit sessions:
Cmd + Zto undo changes,Cmd + Yto redo changes, andCmd + Sto save changes - Added new "Suggest New Feature" button
One-click Actions (Data Manipulation)
- Click the trash icon on a table row to delete it
- Click the
Set nullbutton on a database value to set the value tonull
Supported Databases
Currently supported databases:
- SQLite
- MySQL
- MariaDB
- PostgreSQL
- Microsoft SQL Server
- Supabase
- MongoDB [Pro]
- MySQL over SSH [Pro] (also supports MariaDB)
- PostgreSQL over SSH [Pro]
- Supabase Cloud [Pro]
Loading Databases
DevDb can automatically discover and load your database using connection details from your VS Code workspace (zero-config mode). When this zero-config auto-discovery isn't available, a configuration file option is provided.
1. Zero-config (Automatic Database Discovery)
No configuration file is needed when the workspace root contains any of the following:
- Applications managed by DDEV
- Local Supabase projects (detected via
supabase/config.toml) - Adonis using default .env config for MySQL and PostgreSQL (with Lucid ORM)
- Django with settings.py for SQLite, MySQL, and PostgreSQL
- Ruby on Rails with config/database.yml for SQLite, MySQL, and PostgreSQL
- Laravel with default local SQLite database
- Laravel with default .env config for MySQL/MariaDB, PostgreSQL, and Microsoft SQL Server
- Containerized Laravel MySQL (Laravel Sail) with default .env/docker-compose.yml config (including dev containers support)
2. Config-based Database Loading
If zero-config support isn't available for your environment, create a .devdbrc file in your project root with your database connection details.
The configuration file should contain a single array of database connection objects. DevDb provides rich editing features for .devdbrc:
- JSON Schema Validation: Automatic configuration validation
- IntelliSense: Autocompletion for all fields, including
type - Snippets: Quick configuration templates:
devdb mysql: MySQL configurationdevdb mariadb: MariaDB configurationdevdb postgres: PostgreSQL configurationdevdb sqlite: SQLite configurationdevdb mssql: Microsoft SQL Server configuration
Configuration File Example
[
{
"name": "My test MySQL database",
"type": "mysql",
"host": "127.0.0.1",
"port": "3306",
"username": "root",
"password": "12345",
"database": "test" // <-- the database to show in VS Code DevDb view
},
{
"type": "sqlite",
"path": "/path/to/database.sqlite"
},
{
"name": "My MSSQL database",
"type": "mssql",
"host": "localhost",
"port": "1433",
"username": "sa",
"password": "YourPassword123",
"database": "master",
"options": {
"trustServerCertificate": true
}
}
]
3. Remote & NoSQL Connections [Pro]
With DevDb Pro License, you can connect to remote databases and NoSQL databases directly from your editor.
SSH Tunnel Connections (MySQL/MariaDB & PostgreSQL)
Connects to a remote database by forwarding traffic through an SSH tunnel. Authentication supports:
- Private key (recommended): Provide the path to your SSH private key (e.g.
~/.ssh/id_rsaor~/.ssh/id_ed25519). If the key is passphrase-protected, you will be prompted for it on first connection. - Password: If no private key is provided, you will be prompted for the SSH password.
MongoDB
Connects via either individual fields (host, port, username, database) or a full connection string URI (mongodb://... or mongodb+srv://...). When using authentication, provide credentials and set the authSource (defaults to admin).
Supabase Cloud
Connect to your Supabase cloud project using the Direct Connection type. Use the connection details from your Supabase dashboard (Settings > Database):
- Host: Your project's database host (e.g.
db.<project-ref>.supabase.co) - Port:
5432 - Username:
postgres - Password: Your database password
- Database:
postgres
Troubleshooting Remote Connections
SSH Tunnels
AllowTcpForwardingmust beyesorlocalin/etc/ssh/sshd_configon the remote server- You may need to change private key permissions to
600(e.g.chmod 600 ~/.ssh/id_rsa) - DB host/port fields refer to the address on the remote machine (e.g.
127.0.0.1:3306), not your local machine - SSH logs:
/var/log/auth.log(Debian/Ubuntu) or/var/log/secure(RHEL/CentOS)
MongoDB
authSourcemust match the database where the user was created (typicallyadmin)- Credentials in connection string URIs must be URL-encoded if they contain special characters
Supabase Cloud
- Use Direct Connection details from Supabase dashboard, not the connection pooler
- Check Settings > Database > Network Bans if connections are refused
Tools and Framework Integrations
Context Menu Entry
Open any database table in DevDb by right-clicking its name/model/entity from the editor in any framework/programming language.
Example from a Node.js app
Laravel
Eloquent Model Code Lens
DevDb provides Code Lens features for:
- Viewing the underlying table for the Eloquent model
- Generating a factory for the model (automatically pre-filled with real data from the underlying table)
Query Explainer
The Query Explainer integrates with MySQL Visual Explain to optimize SQL queries by analyzing MySQL's query execution plan. Usage:
- Open a Laravel PHP file containing SQL query (Eloquent or
DBfacade) - Select the SQL query to analyze
- Click the
Explain queryCode Lens or selectExplain queryfrom the context menu - View the explanation in your browser or copy the URL
MCP Integration
DevDb exposes your database to AI-powered IDEs and MCP clients. You only need to configure once, and then you can query your database naturally through AI.
For Claude Code
Open your project in VS Code with DevDb active
Click the hammer icon in DevDb view to copy the server script path
Add the MCP server using CLI (substitute the path you copied in step 2):
claude mcp add --transport stdio devdb-mcp-server node "<paste-script-path-here>"
- Claude Code can now query your database using tools like
get-tables,get-schema,get-database-type, andrun-query
For VS Code-based IDEs (Cursor, Windsurf, Cline, etc.)
- Click the hammer icon in DevDb view to copy the MCP configuration JSON
- Open your IDE's MCP config file:
- Paste the copied JSON under the appropriate key and reload your IDE
Your AI assistant can now access your database schema and run queries.
URI Handler
DevDb provides a custom URI handler that allows you to open specific database tables directly from external applications or links. This is useful for integrating DevDb with other tools or creating shortcuts to frequently accessed tables.
URI Format
The URI format follows this pattern:
vscode://devdb/open/table?connectionId=123&database=main&table=users&workspace=...
Parameters:
connectionId: The ID of the database connectiondatabase: The database nametable: The table name to openworkspace: (Optional) The workspace path
FAQ
Common questions
Discussion
Questions & comments Β· 0
Sign In Sign in to leave a comment.