Skip to content
MCP server

Dbhawk

Governed database access for agents: schemas, queries and text-to-SQL via DBHawk

Runs locally

Dbhawk is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted, macOS
Runs
Locally
What it can do
Can change data (2 tools)
Access
Needs a secret key or token

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add dbhawk --env DBHAWK_BASE_URL='<DBHAWK_BASE_URL>' --env DBHAWK_TOKEN='<DBHAWK_TOKEN>' -- npx -y @dbhawk/mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "dbhawk": {
      "command": "npx",
      "args": [
        "-y",
        "@dbhawk/mcp"
      ],
      "env": {
        "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
        "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "dbhawk": {
      "command": "npx",
      "args": [
        "-y",
        "@dbhawk/mcp"
      ],
      "env": {
        "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
        "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "dbhawk": {
      "command": "npx",
      "args": [
        "-y",
        "@dbhawk/mcp"
      ],
      "env": {
        "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
        "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "dbhawk": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dbhawk/mcp"
      ],
      "env": {
        "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
        "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add dbhawk --env DBHAWK_BASE_URL='<DBHAWK_BASE_URL>' --env DBHAWK_TOKEN='<DBHAWK_TOKEN>' -- npx -y @dbhawk/mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.dbhawk]
command = "npx"
args = ["-y", "@dbhawk/mcp"]
env = { DBHAWK_BASE_URL = "<DBHAWK_BASE_URL>", DBHAWK_TOKEN = "<DBHAWK_TOKEN>" }

Codex setup guide

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

{
  "mcpServers": {
    "dbhawk": {
      "command": "npx",
      "args": [
        "-y",
        "@dbhawk/mcp"
      ],
      "env": {
        "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
        "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "dbhawk": {
          "command": "npx",
          "args": [
            "-y",
            "@dbhawk/mcp"
          ],
          "env": {
            "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
            "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e DBHAWK_BASE_URL='<DBHAWK_BASE_URL>' -e DBHAWK_TOKEN='<DBHAWK_TOKEN>' dbhawk npx -- -y @dbhawk/mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "dbhawk": {
          "command": "npx",
          "args": [
            "-y",
            "@dbhawk/mcp"
          ],
          "env": {
            "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
            "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "dbhawk": {
          "command": "npx",
          "args": [
            "-y",
            "@dbhawk/mcp"
          ],
          "env": {
            "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
            "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "dbhawk": {
          "command": "npx",
          "args": [
            "-y",
            "@dbhawk/mcp"
          ],
          "env": {
            "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
            "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "dbhawk": {
          "command": "npx",
          "args": [
            "-y",
            "@dbhawk/mcp"
          ],
          "env": {
            "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
            "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "dbhawk": {
          "command": "npx",
          "args": [
            "-y",
            "@dbhawk/mcp"
          ],
          "env": {
            "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
            "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "dbhawk": {
          "command": "npx",
          "args": [
            "-y",
            "@dbhawk/mcp"
          ],
          "env": {
            "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
            "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "dbhawk": {
          "command": "npx",
          "args": [
            "-y",
            "@dbhawk/mcp"
          ],
          "env": {
            "DBHAWK_BASE_URL": "<DBHAWK_BASE_URL>",
            "DBHAWK_TOKEN": "<DBHAWK_TOKEN>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • DBHAWK_BASE_URLDBHawk base URL, e.g. https://dbhawk.example.com (no trailing /api)Required
  • DBHAWK_TOKENMCP-scoped personal token (dbh_...) from DBHawk User Profile > API TokenRequired
  • DBHAWK_DEFAULT_DATASOURCEDatasource used when a request doesn't name one

About Dbhawk

This server is a thin bridge to the DBHawk database access platform, so an assistant can work with the datasources a user has been assigned. DBHawk stays in control: each statement is classified and checked against the MCP tier of the user's groups, with access control and column masking applied, and the default tier is read-only.

Tools list datasources, catalogs, schemas, objects and columns, show the caller's permissions, run read-only queries with a row cap, and explain a query plan without executing it. Depending on tier it can also list or kill database sessions and execute data or schema changes through a confirm flow, plus DBHawk AI features such as text-to-SQL, optimize and format.

Sign-in works either through the browser on first use (DBHawk 7.0.1 or later) or with a personal token exchanged for a short-lived JWT. It installs as a Claude Code plugin, a Claude Desktop .mcpb extension, or the npm package @dbhawk/mcp, and needs the base URL of your DBHawk instance.

Tools this server provides (15)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 2 of 15 tools change data; 4 names don't say.

From the server's own tool labels and tool names; not verified by us.

list_datasourcesName suggests: reads
List datasources assigned to the user.
get_datasourceName suggests: reads
Get one datasource.
list_catalogsName suggests: reads
List catalogs for MSSQL or Snowflake.
list_schemasName suggests: reads
List schemas.
list_objectsName suggests: reads
List objects in a schema.
list_columnsName suggests: reads
List columns of an object.
get_permissionsName suggests: reads
Show the user's MCP tiers and limits.
run_queryName suggests: changes
Run a read-only query with row caps.
explain_planName suggests: reads
Show an execution plan without executing.
list_sessionsName suggests: reads
List active database sessions.
kill_session
End one listed session.
execute_statementName suggests: changes
Run a data or schema change if the tier allows.
text_to_sql
Generate SQL from a question.
optimize_sql
Optimize a SQL statement.
format_sql
Format a SQL statement.

What it does

Schema browsing
Lists datasources, catalogs, schemas, objects and columns.
Governed queries
Runs queries under the user's tier, access control and masking.
Query plans
Explains a statement without running it.
AI SQL helpers
Offers text-to-SQL, optimization and formatting.
Tiered writes
Writes need a tier that allows them and a confirm step.
Browser or token sign-in
Supports interactive login or a personal token.

Good for

  • Ask an assistant to describe tables in a datasource
  • Draft SQL from a plain-language question
  • Inspect an execution plan before running a query
  • Review active sessions on a database

Pricing

Open source

Free connector; requires a DBHawk instance

Dbhawk FAQ

Is Dbhawk read-only by default?

Yes, the default MCP tier is read-only.

What do I need to connect?

The DBHawk base URL, plus a token or browser sign-in.

Which DBHawk version supports browser login?

The README says 7.0.1 with the MCP connector.

Can Dbhawk change data?

Only when the user's MCP tier allows it, and with confirmation.

Is Dbhawk free?

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

How do I add Dbhawk to Claude Code?

Run this command in your terminal: claude mcp add dbhawk --env DBHAWK_BASE_URL='<DBHAWK_BASE_URL>' --env DBHAWK_TOKEN='<DBHAWK_TOKEN>' -- npx -y @dbhawk/mcp

What are the best alternatives to Dbhawk?

The closest alternatives to Dbhawk are REA, AiSOC, x64dbg-mcp-server, redamon and Treasure Map.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers