Skip to main content
Glama

DevDb

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.

Related MCP server: JDBCX MCP Server

Latest Features

  1. Allow IDEs (VS Code, Cursor, Windsurf, etc.) to run SQL queries against your application database

  2. New zero-config support: applications running in DDEV

  3. New zero-config support: Django, Ruby on Rails, and Adonis (Lucid ORM)

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) or Ctrl+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, and Microsoft SQL Server; with more to come!

  • 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

image image

Requirements

OS/Platform Support

  • Linux *(Linux-x64, Linux-arm64, Linux-arm, Alpine-x64)

  • macOS (Darwin-x64, Darwin-arm64 Apple Silicon)

  • Windows (Win32-x64)



Quick Start

NOTE

DevDb also provides severalLanguage and Framework Integrations

UI Actions and Key Map

  • Cmd + K + D to toggle the view panel

  • Cmd + K + G to go to a table

  • Cmd + Click table name in the sidebar to open the table in the current tab

  • Cmd + Click on 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 + Z to undo changes, Cmd + Y to redo changes, and Cmd + S to 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 null button on a database value to set the value to null

image

Supported Databases

Currently supported databases:

  • SQLite

  • MySQL

  • MariaDB

  • PostgreSQL

  • Microsoft SQL Server

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:

  1. Applications managed by DDEV

  2. Adonis using default .env config for MySQL and PostgreSQL (with Lucid ORM)

  3. Django with settings.py for SQLite, MySQL, and PostgreSQL

  4. Ruby on Rails with config/database.yml for SQLite, MySQL, and PostgreSQL

  5. Laravel with default local SQLite database

  6. Laravel with default .env config for MySQL/MariaDB, PostgreSQL, and Microsoft SQL Server

  7. 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.

WARNING

Exclude the.devdbrc config file from version control by adding it to .gitignore. This protects sensitive information and allows team members to use different database configurations.

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 configuration

    • devdb mariadb: MariaDB configuration

    • devdb postgres: PostgreSQL configuration

    • devdb sqlite: SQLite configuration

    • devdb 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 } } ]

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

image

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)

image

NOTE

Factory Generation is also available via the context menu

Query Explainer

The Query Explainer integrates with MySQL Visual Explain to optimize SQL queries by analyzing MySQL's query execution plan. Usage:

  1. Open a Laravel PHP file containing SQL query (Eloquent or DB facade)

  2. Select the SQL query to analyze

  3. Click the Explain query Code Lens or select Explain query from the context menu

  4. View the explanation in your browser or copy the URL

image

NOTE

VS Codemulti-root workspaces support is in development. Track progress here.

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

  1. Open your project in VS Code with DevDb active

  2. Click the hammer icon in DevDb view to copy the server script path Copy MCP settings

  3. 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>"
  1. Claude Code can now query your database using tools like get-tables, get-schema, get-database-type, and run-query

For VS Code-based IDEs (Cursor, Windsurf, Cline, etc.)

  1. Click the hammer icon in DevDb view to copy the MCP configuration JSON

  2. Open your IDE's MCP config file:

  3. Paste the copied JSON under the appropriate key and reload your IDE

Your AI assistant can now access your database schema and run queries.

MCP Usage

NOTE

You should update the config when you update to a new version of DevDb because the version number may change.

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 connection

  • database: The database name

  • table: The table name to open

  • workspace: (Optional) The workspace path

Support

You can support the development of DevDb by contributing features and submitting PRs, or by sponsoring the development. We appreciate your DevDb sponsorships with perks and you can check the sponsorship page for available sponsorship options.

You can also support this project by using the services offered by our sponsors:

Please do check out other projects by Damilola Olowookere for other sponsorship options.

Contribution

IMPORTANT

Contributions are currently limited to the extension core code. UI code is not available for public contribution.

  1. Fork this repository and clone your fork locally

  2. Run bun install to install dependencies

  3. Make your contributions to the codebase

  4. Press F5 to launch the debugger and test changes locally

  5. Run test suites with bun run test-services and ensure all tests pass

  6. Push changes to your fork

  7. Open a PR to this repository

  8. Take your flowers! πŸ’πŸŒΊπŸŒΉ

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/damms005/devdb-vscode'

If you have feedback or need assistance with the MCP directory API, please join our Discord server