Skip to content
MCP server

DBCode

Let AI agents list connections, read schemas and query 100+ databases through DBCode

Runs locallyStatus and history
Pricing
Freemium
Platforms
vscode, CLI
Runs
Locally
Version
1.0.1
Listing updated
1 day ago

About DBCode

DBCode is a freemium MCP server for databases. It runs locally on your machine and is started by your AI client.

This server reuses the database connections already saved in the DBCode editor extension instead of asking for credentials again. An agent can list connections, read schemas and run queries; the site names PostgreSQL, MySQL, SQL Server, Oracle, SQLite, MongoDB, ClickHouse and Snowflake among 100+ supported databases.

In VS Code and Cursor the extension registers itself with the editor's MCP host, with one-click setup in Antigravity, Windsurf and Kiro. Outside editors, Claude Code, Codex, Copilot CLI, Gemini CLI and Claude Desktop use the npx package @dbcode/mcp, which needs Node 22.14 or newer. A --app option picks which editor's connections to use.

Access is bounded by each connection's role and read-only mode, and missing-WHERE detection catches destructive queries. The default AI access setting asks before changing data or schema, while AI access roles need DBCode Pro. The MCP server itself is free.

Install

Run in a terminal

claude mcp add dbcode -- npx -y @dbcode/mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "dbcode": {
      "command": "npx",
      "args": [
        "-y",
        "@dbcode/mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "dbcode": {
      "command": "npx",
      "args": [
        "-y",
        "@dbcode/mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "dbcode": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dbcode/mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "dbcode": {
      "command": "npx",
      "args": [
        "-y",
        "@dbcode/mcp"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "dbcode": {
      "command": "npx",
      "args": [
        "-y",
        "@dbcode/mcp"
      ]
    }
  }
}

What it does

Reuses connections
Works from the connections you already saved in DBCode.
Schema and queries
Agents list connections, read schemas and run queries.
Editor auto-registration
VS Code and Cursor register it with no config.
CLI for external agents
npx @dbcode/mcp serves Claude, Codex, Copilot CLI and Gemini CLI.
Guardrails
Roles, read-only mode, missing WHERE detection and ask-before-changes.
Multi-editor choice
Pick whose connections to use with --app.

Good for

  • Ask an agent about a table's schema in your Postgres database
  • Run exploratory queries from chat
  • Give Claude Code read-only access to a staging database
  • Reuse editor connections across several agents

Pricing

Freemium

MCP server free; Pro adds AI access roles and more; Team $72/yr per user

Prices change. Check dbcode.io before you buy.

DBCode FAQ

Is the MCP server free?

Yes, the site says it is free for everyone.

What do I need installed?

The DBCode extension in a supported editor and Node.js 22.14 or newer for the npm package.

Can an agent change my data?

By default it asks before changes; read-only connections and roles can restrict it further.

Is DBCode free?

DBCode has a free plan, with paid plans for more usage or features.

How do I add DBCode to Claude Code?

Run this command in your terminal: claude mcp add dbcode -- npx -y @dbcode/mcp

What are the best alternatives to DBCode?

The closest alternatives to DBCode are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to DBCode

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools