Skip to content
MCP server

DB Mastermind

Free open-source database client and data modeler, with read-only AI access for coding

Runs locally

DB Mastermind 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
Windows, macOS, Linux
Runs
Locally
What it can do
Can change data (2 tools)
Version
1.5.4

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add dbmastermind-mcp -- npx -y dbmastermind-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": {
    "dbmastermind-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dbmastermind-mcp"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "dbmastermind-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dbmastermind-mcp"
      ]
    }
  }
}

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

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "dbmastermind-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dbmastermind-mcp"
      ]
    }
  }
}

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

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

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

{
  "mcpServers": {
    "dbmastermind-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "dbmastermind-mcp"
      ]
    }
  }
}

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 dbmastermind-mcp -- npx -y dbmastermind-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.dbmastermind-mcp]
command = "npx"
args = ["-y", "dbmastermind-mcp"]

Codex setup guide

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

{
  "mcpServers": {
    "dbmastermind-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dbmastermind-mcp"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "dbmastermind-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dbmastermind-mcp"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user dbmastermind-mcp npx -- -y dbmastermind-mcp

    Antigravity

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

    {
      "mcpServers": {
        "dbmastermind-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dbmastermind-mcp"
          ]
        }
      }
    }

    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": {
        "dbmastermind-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dbmastermind-mcp"
          ]
        }
      }
    }

    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": {
        "dbmastermind-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dbmastermind-mcp"
          ]
        }
      }
    }

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

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "dbmastermind-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dbmastermind-mcp"
          ]
        }
      }
    }

    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": {
        "dbmastermind-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dbmastermind-mcp"
          ]
        }
      }
    }

    Junie

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

    {
      "mcpServers": {
        "dbmastermind-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dbmastermind-mcp"
          ]
        }
      }
    }

    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": {
        "dbmastermind-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "dbmastermind-mcp"
          ]
        }
      }
    }

    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.

About DB Mastermind

Design a schema, browse and filter tables without writing SQL, and chart query results from one desktop app. It connects to PostgreSQL, SQL Server, Oracle, MySQL, SQLite, DuckDB, BigQuery and several more engines, and can open CSV, Parquet and Excel files as if they were tables.

The same connections can be exposed to Claude Code, Codex, Cursor and other agents through an MCP server, which handles schema exploration, join paths and read-only queries. Queries from AI and agents run in a transaction that is rolled back, so the database itself blocks writes. AI is off until a provider is configured, and it can be disabled per connection or company-wide.

The tool suits developers generating ORM models from a live schema, analysts exploring data, and teams that need a shared data dictionary and migration checks before schema changes run. It is MIT-licensed and free, with no account or telemetry.

Tools this server provides (13)

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

From the tool list in its README, going by the names, 2 of 13 tools change data; 1 name doesn't say.

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

list_connectionsName suggests: reads
List configured database connections.
list_tablesName suggests: reads
List tables in a connection.
describe_tableName suggests: reads
Show columns, keys, indexes, comments and incoming references for a table.
search_schemaName suggests: reads
Search the schema for names or terms.
get_relationshipsName suggests: reads
Show relationships between tables.
find_join_pathName suggests: reads
Find the shortest join chain between two tables, with ready SQL.
sample_rows
Return sample rows from a table.
run_queryName suggests: changes
Run a read-only query and return results as compact CSV.
explain_queryName suggests: reads
Return the execution plan of a query as a tree.
get_definitionName suggests: reads
Return the SQL of a view, function, procedure or table CREATE statement.
search_knowledgeName suggests: reads
Search the knowledge base of Markdown notes.
read_knowledgeName suggests: reads
Read a knowledge base note.
write_knowledgeName suggests: changes
Create or update a knowledge base note when writes are allowed.

What it does

Schema design and migrations
Draw tables and relationships, then generate DDL or a migration script that is checked against existing data first.
Filters without SQL
Build nested AND/OR filters and more than 25 operators, or write a raw WHERE clause.
Query editor with schema awareness
Autocomplete writes JOINs from foreign keys and warns about missing tables or UPDATE statements without WHERE.
Files as tables
Drop CSV, Parquet, JSON or Excel files onto the window and query them with SQL.
Read-only safety defaults
Read-only connections, a production guard and confirmation before destructive statements.
Read-only AI access for agents
An MCP server lets coding agents explore schemas and run read-only queries through your existing connections.
Code generation from models
Export Prisma, Drizzle, SQLAlchemy or TypeScript types from a model or a live database.

Good for

  • Explore an unfamiliar production database before writing application code
  • Let a coding agent answer questions from live data without write access
  • Generate ORM schemas from an existing database
  • Compare a schema model with a live database and produce a migration
  • Share a documented data dictionary with a team
  • Query CSV or Excel exports with SQL and chart the results

Pricing

Open source

Free and open source (MIT), no paid tier

Prices change. Check dbmastermind.app before you buy.

DB Mastermind FAQ

Is DB Mastermind free?

Yes. It is free and MIT-licensed, with no paid tier, no feature limits and no account.

Which databases are supported?

PostgreSQL, SQL Server, Oracle, MySQL, MariaDB, SQLite, DuckDB, ClickHouse, CockroachDB, BigQuery and Trino, plus hosted services that run these engines.

Can an AI agent change my data?

Not by default. Agent queries run in a read-only transaction that is rolled back. Writes require allowing them explicitly with --allow-writes.

Does DB Mastermind send data anywhere?

The app has no telemetry. Its only own network access is the update check with GitHub. Passwords are stored encrypted in the system keychain.

How do I add DB Mastermind to Claude Code?

Run this command in your terminal: claude mcp add dbmastermind-mcp -- npx -y dbmastermind-mcp

What are the best alternatives to DB Mastermind?

The closest alternatives to DB Mastermind are DB MCP, DataLink, DBCode, AdoMcp and Custom MCP Database.

Where this comes from

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

How AIPoweredBot checks servers