Debuly
DBHub logo

DBHub

Minimal database MCP server that lets Claude, Cursor, VS Code and other MCP clients explore schemas and run SQL safely.

Open source

What is DBHub?

DBHub is an MCP server from the bytebase/dbhub project that connects AI coding assistants to relational databases. It loads only two tools by default, execute_sql and search_objects, and the docs put that at about 1.4k tokens of context, far less than larger database servers. One DBHub process can sit in front of PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite, and a TOML file lets you define several connections at once. Guardrails include a read-only mode, row limits, query timeouts, SSH tunneling and SSL/TLS. Opt-in extras add explain_sql, health_check and custom parameterized SQL tools, and a web workbench lets you run tools and view request traces without an MCP client. Clients such as Claude Desktop, Claude Code, Cursor, VS Code, Codex and Dify can connect. The documentation lists no paid plans; you run it yourself with npx or Docker.

Use cases

  • Let an AI assistant inspect database schemas
  • Run SQL from Claude Code or Cursor
  • Give non-technical staff read-only data access
  • Replace several database MCP servers with one
  • Troubleshoot production with query guardrails
  • Define reusable parameterized SQL tools

Who it's for

  • Developers
  • Data engineers
  • Claude Code and Cursor users

Why use DBHub

  • Only two tools load by default, so tool definitions take little of the model's context window and leave room for your actual task.
  • A single server covers six database engines, which replaces running a separate MCP server for each one.
  • Read-only mode, row limits and query timeouts let you expose production data with guardrails against runaway queries.
  • Per-source tool settings let you allow schema search only, or limit the assistant to a few approved custom queries.
  • The same setup works across Claude Code, Cursor, VS Code and Claude Desktop, so you configure it once.

DBHub features

  • Two tools by default: execute_sql and search_objects
  • Opt-in explain_sql and health_check tools
  • Custom parameterized SQL tools defined in dbhub.toml
  • Supports PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite
  • Multiple database connections through TOML configuration
  • Read-only mode, row limiting and query timeout
  • SSH tunneling and SSL/TLS encryption
  • Web workbench with tool execution and request traces
  • stdio and HTTP transports, via npx or Docker
  • Demo mode with a sample employee database

DBHub integrations

  • Claude Desktop
  • Claude Code
  • Cursor
  • VS Code
  • Codex
  • Dify
  • PostgreSQL
  • MySQL
  • MariaDB
  • SQL Server
  • Oracle
  • SQLite

How to get started with DBHub

  1. Install Node.js 22.5 or newer, or Docker, then start DBHub with npx or docker run, using --demo to try the sample database first.
  2. Provide your database connection through a DSN on the command line or in a dbhub.toml file.
  3. Add DBHub as an MCP server in your client, such as Claude Code, Claude Desktop, Cursor or VS Code.
  4. Ask the assistant to list schemas or run a query, and tighten access with readonly, max_rows and per-source tool settings.

DBHub limitations

  • You install, run and configure the server yourself
  • Needs Node.js 22.5 or newer, or Docker
  • Write access is possible unless you set readonly on execute_sql, so permissions need care

DBHub pricing

DBHub is open source, so you can use and self-host it for free.

Prices can change and may vary by country or exclude tax. Check the official pricing page.

DBHub alternatives

The main DBHub alternatives listed on Debuly are AI for Database, GitHub MCP Server, MCP Market, Claude Agent SDK, FastMCP and Formal. The table compares pricing and platforms; order is A–Z.

DBHub compared with its alternatives
ToolPricingStarting pricePlatforms
DBHubOpen source—CLI, Self-hosted, Web
AI for DatabaseFreemium$20/moWeb, API, Self-hosted
Claude Agent SDKPricing unknown—Python, CLI, macOS, Linux
FastMCPOpen source—Python, CLI, API
FormalContact sales—macOS, Linux, Windows, Self-hosted
GitHub MCP ServerOpen source—API, CLI, Self-hosted, Web
MCP MarketFreemium$19/moWeb, API
  1. AI for Database

    Ask your PostgreSQL, MySQL or Google Sheets data questions in plain English and get charts, dashboards and automated alerts.

  2. Claude Agent SDK

    Anthropic's Python SDK for building agents on the Claude Code runtime, with built-in tools, custom tools, hooks and MCP servers.

  3. FastMCP

    Python framework for building Model Context Protocol servers, clients and interactive apps, with managed hosting via Prefect Horizon.

  4. Formal

    Network security and access control proxy that enforces least privilege for AI agents and engineers across databases, APIs and MCP servers.

  5. GitHub MCP Server

    GitHub's official MCP server that lets AI assistants read repos, manage issues and pull requests, and watch Actions runs in plain language.

  6. MCP Market

    Directory and hosted hub for MCP servers and agent skills, with toolkits that connect Claude, Cursor and other AI clients to your tools.

DBHub FAQ

How much does DBHub cost?

The documentation shows no paid plans or prices. The project is published on GitHub as bytebase/dbhub and you run it yourself with npx or Docker.

Is DBHub open source?

The docs link to a public GitHub repository, bytebase/dbhub, but no license text is shown. Check the repository for exact license terms.

Which databases does DBHub support?

PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite, all through one interface. You can connect several databases at the same time using TOML configuration.

Can I stop an AI assistant from changing my data?

Yes. Set readonly = true on the execute_sql tool to allow only SELECT, SHOW, DESCRIBE and EXPLAIN, add max_rows, or expose only search_objects for a source.

Which AI clients work with DBHub?

The docs include setup for Claude Code, Claude Desktop, Codex, Dify and VS Code, and the introduction also names Cursor.

Does DBHub have a UI?

It includes a web workbench for running tools and viewing request traces without an MCP client. With HTTP transport it is served at the root of the server.

What are alternatives to DBHub?

The DBHub docs compare it with MCP Toolbox for Databases and the Supabase MCP server, which load many more tools by default. On Debuly, compare AI for Database, GitHub MCP Server and MCP Market.

Sources & verification

Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.

SourceTypeAccessed
dbhub.ai/official
dbhub.ai/pricingpricing
dbhub.ai/tools/overviewofficial
dbhub.ai/quickstartofficial

Image credits

  • Logo: from dbhub.ai · fetched · Vendor trademark, used only to identify the product; removed on request
  • Cover: none collected yet, so a generated tile is shown.

Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.