Skip to main content
Cursor with DBHub
  • MacOS/Linux
  • Windows
Edit ~/.cursor/mcp_config.json:
{
  "mcpServers": {
    "dbhub": {
      "command": "npx",
      "args": [
        "@bytebase/dbhub",
        "--transport",
        "stdio",
        "--dsn",
        "postgres://user:password@localhost:5432/dbname"
      ]
    }
  }
}

Project-Specific Configuration

For project-specific database connections, create .cursor/mcp_config.json in your project root:
{
  "mcpServers": {
    "project-db": {
      "command": "npx",
      "args": [
        "@bytebase/dbhub",
        "--transport",
        "stdio",
        "--config",
        "./dbhub.toml"
      ]
    }
  }
}