# DBCode

DBCode lets an AI agent query and inspect databases through your existing DBCode connections. It fits database work across PostgreSQL, MySQL, MongoDB, and more.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 360
- Author: dbcodeio
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dbcodeio/public/tree/HEAD/mcp
- Updated: 2026-10-20
- HTML: https://affpapa.org/en/nevibecode/mcp/dbcode

## What it does

This MCP server gives an AI agent access to the connections saved in DBCode. It can query and inspect databases such as PostgreSQL, MySQL, SQL Server, Oracle, SQLite, MongoDB, ClickHouse, and Snowflake. DBCode supports more than 100 databases.

The package finds the newest DBCode installation and starts its MCP server. With a DBCode editor open, the agent works through that editor; with no editor open, the server reads saved DBCode connections directly. If DBCode is open in more than one editor, pass `--app` to choose which editor’s connections the agent can use, such as `Cursor`.

Install the DBCode extension in VS Code, Cursor, Windsurf, Antigravity, or Kiro before configuring the server. Node.js 22.14 or newer is also required. The server will not start without Node.js 22.14.

## Requirements
- Needs: Node.js (commands run via npx)
- Works with: PostgreSQL

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add dbcode -- npx -y @dbcode/mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp -- npx -y @dbcode/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@dbcode/mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@dbcode/mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp npx -y @dbcode/mcp
```

## When to use it
- run queries against a connected database
- inspect a database schema through an AI agent
- work with PostgreSQL and other database systems through DBCode
- select connections from a specific editor

## Example prompts
- Show the tables and relationships in the connected database.
- Run this query against PostgreSQL through DBCode and explain the result.
- Use the `Cursor` connections and find records matching this condition.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
