DBCode
Lets your AI agent query and explore your databases through the connections you already set up in DBCode.
363 stars on GitHubby DBCodeLicense NOASSERTIONUpdated 21 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add dbcode -- npx -y @dbcode/mcp
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Show me the tables in my Postgres database and how they connect.
Write a query that counts orders per customer for last month and run it.
What it is
DBCode is a database client for VS Code, Cursor, Windsurf and similar editors, and it includes built-in MCP tools. These give your AI agent access to your existing database connections, with permissions you set for each connection. It supports 100+ databases, from Postgres and MySQL to MongoDB and Snowflake.
What it can do
- Ask schema questions and get answers from your live database
- Generate and run SQL queries from plain language
- Create tables from a request
- Use your saved connections, with AI permissions set per connection
- Work with schema context for tables, views and procedures
When to use
- βΊWhen you want your AI agent to answer questions about your data without copying credentials into a chat.
- βΊWhen you need the agent to write SQL that matches your real schema.
- βΊWhen you want to limit what an AI agent can do on each database connection.
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
sql-database-assistantHelps your agent write and speed up SQL queries, explore a database schema, and create migrations for common database tools.databaseLets your agent work with SQL and NoSQL databases. It helps design, optimize, and manage data efficiently.supabase-automationHelps your agent automate tasks in the Supabase database. It can query data, manage tables, and execute SQL. Useful for developers using Supabase.Frequently asked questions
Is DBCode free?
The readme says it is free for everyone, including commercial use, and that this covers the MCP server for your AI agent. Pro and Team plans add more features.
How many databases does it support?
It lists 100+ databases, warehouses and file formats, including PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, Snowflake and BigQuery.
Which editors does it work in?
VS Code, Cursor, Windsurf, Antigravity and Kiro. It is on the VS Code Marketplace and on OpenVSX for forks.
How does an external agent like Claude Code connect?
Use the DBCode command named Connect an AI Agent. In VS Code and Cursor the MCP tools are registered automatically.
Can I limit what the AI does?
Yes. You set AI permissions per connection, and the readme also mentions read-only connections and missing-WHERE detection.
Does it collect data?
The readme says anonymous usage data is collected when VS Code telemetry is enabled, and nothing is collected if you turn it off.
If it does not work
- βΊRestart your editor after installing the extension so the MCP tools register.
- βΊIf an external agent cannot see your databases, run the DBCode command Connect an AI Agent again.
- βΊCheck that the connection works inside DBCode itself before asking the agent to use it.
5 new skills a week. 1 minute to read.