Dba Master logo

Dba Master

Introspects Oracle, PostgreSQL, MySQL/MariaDB, and SQL Server schemas, relationships, DDL, routines, jobs, and runtime activity over MCP.

Install Dba Master

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "dba-master": {
      "command": "npx",
      "args": [
        "-y",
        "dba-master@latest"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

dba-master is an MCP server for investigating database structure and runtime behavior through structured tools. It connects to Oracle, PostgreSQL, MySQL/MariaDB, and SQL Server, with engine-specific support for packages, jobs, monitoring, and DDL. Agents can inspect schemas, generate TypeScript interfaces, run read-only SQL by default, and diagnose active sessions. Reach for it when an agent needs database metadata and operational context without exposing connection credentials in tool results.

Use cases

  • Inspect an unfamiliar database schema and its relationships
  • Generate TypeScript interfaces from tables and views
  • Retrieve DDL and routine definitions for investigation
  • Diagnose database activity and active sessions
  • Run controlled SQL against read-only connections

Key features

  • Deep schema, view, routine, package, and job introspection
  • Cached TypeScript interface generation
  • Declared and inferred relationship analysis
  • Engine-specific Oracle, PostgreSQL, and MySQL monitoring
  • Read-only SQL defaults with opt-in write access
  • Credential references through environment variables

Tools21

What Dba Master lets your agent do. Expand a tool for its parameters.

Verified live~3.3k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 32d

What it can do

From the 21 tools this server returned when we ran it.

Can delete or modify data · 3Read-only tools · 18
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age124 days
Maintainers1

Observed 2026-11-02 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · dba-master@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads844Package downloads in the last 30 days.
Last commit20d agoMost recent push to the default branch.
Tools exposed21Callable tools this server registers over MCP.

How Dba Master works

What dba-master does

dba-master exposes database introspection and administration capabilities through MCP. It can enumerate connections, schemas, tables, views, procedures, functions, packages, schedulers, and object definitions. Table and view descriptions are materialized as cached TypeScript interface files, while relationship tools expose declared foreign keys and can infer likely links from naming conventions for legacy schemas.

The supported engines are Oracle, PostgreSQL, MySQL/MariaDB, and SQL Server. Engine-specific behavior is applied where relevant: Oracle supports packages, scheduled jobs, native metadata DDL, monitoring, and session control; PostgreSQL has monitoring and session control; MySQL has predefined diagnostic checks and session control. SQL Server supports metadata-oriented database inspection and object definitions.

How it works

Connections are named entries loaded from a connections.json file. The server uses those entries to open connection pools, but list_connections returns connection names and write capability rather than usernames, passwords, or connect strings. String fields can reference environment variables such as ${DBA_PROD_PASS}, keeping secrets outside the JSON file.

Most inspection operations return structured metadata. describe_table and describe_view instead write .ts interface files into the cache and return their paths for the agent to read. generate_interfaces performs the same work across all tables and views in a schema, incrementally updating the cache.

run_sql permits SELECT and WITH statements by default. Write operations, deployment scripts, object recompilation, and session termination require a connection configured with readOnly: false. Monitoring tools are read-oriented, while the *_kill_session tools deliberately cancel statements or terminate sessions and can roll back work.

Setup and configuration

The package can be installed and registered without cloning the repository:

Terminal
npx -y dba-master@latest install

The interactive setup creates or edits connections and can configure agents at project scope or globally. Connection data is stored under .dba-master/connections.json in the project, or under ~/.dba-master/connections.json globally. Use configure to manage connections separately, uninstall to remove configured agents, and generate to populate cached interfaces.

A manual MCP registration uses stdio:

config.json
{
  "command": "npx",
  "args": ["-y", "dba-master@latest"]
}

Oracle uses thin mode by default, which does not require Instant Client. Set thick: true and provide clientLibDir when native Oracle client features are needed. PostgreSQL connections use a URL; Oracle uses a host, port, and service-style connect string. Pool size, query timeout, read-only status, and schema filters are configurable per connection.

Tools and capabilities

  • Discover configured connections, tables, views, procedures, packages, scheduled jobs, and schema objects.
  • Describe tables with columns, primary keys, foreign keys, and indexes; describe views with their columns.
  • Retrieve DDL for tables, views, procedures, packages, triggers, sequences, and types.
  • Inspect declared foreign-key direction and infer probable undeclared relationships with evidence and confidence.
  • Execute read-focused SQL and generate or refresh TypeScript interfaces in batches.
  • Monitor PostgreSQL and Oracle activity, or run predefined MySQL checks for performance investigations.
  • Compile Oracle objects or execute deployment scripts with per-unit status and source error locations.
  • Cancel statements or terminate sessions on supported engines when the connection permits writes.

Limitations and notes

Write access is opt-in per connection. A connection remains read-only unless its readOnly value is explicitly set to false; this restriction applies to SQL writes, Oracle compilation or deployment, and session-control tools. Deployment scripts run by compile_object are not subject to the configured query timeout.

Some capabilities depend on the database engine. Oracle monitoring requires SELECT_CATALOG_ROLE, and Oracle session termination requires ALTER SYSTEM. PostgreSQL top_queries requires pg_stat_statements. Package and scheduler features are not available on engines that lack those concepts.

Environment-variable references reduce accidental credential disclosure, but they are not a hard security boundary: another process running as the same user may read the server process environment. Use an operating-system keychain or isolate the server under another user or container when stronger separation is needed. Passwords supplied directly as command-line flags can also remain in shell history.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Dba Master

dba-master is an MCP server that connects AI agents to Oracle, PostgreSQL, MySQL/MariaDB, and SQL Server databases. Its main tools inspect schemas, tables, views, relationships, DDL, routines, and jobs, while also supporting SQL execution, TypeScript interface generation, engine-specific monitoring, and controlled session management.

Install it with `npx -y dba-master@latest install`. The interactive setup configures connections and selected agents at project or global scope. You can manage connections separately with `npx -y dba-master@latest configure`, then reload the agent so it discovers the MCP tools.

Configure connections with `npx -y dba-master@latest configure` or place them in `.dba-master/connections.json` or the global `~/.dba-master/connections.json`. Use `${VAR}` references for sensitive fields so credentials come from environment variables instead of being stored directly in the JSON file.

Yes. Connections are read-only by default, allowing inspection and read SQL while blocking writes, deployment, and session termination. Set `readOnly: false` only for a connection that should permit those operations, including destructive session-control tools.

Yes. `generate_interfaces` creates or updates cached `.ts` interfaces for tables and views, and the command `npx -y dba-master@latest generate` performs the operation across the schema. Individual table or view descriptions can also refresh their cached interface files.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDba Master AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/dba-master?style=directory)](https://allmcps.com/mcp/dba-master)
HTML Embed
<a href="https://allmcps.com/mcp/dba-master"><img src="https://allmcps.com/api/badge/dba-master?style=directory" alt="Dba Master on AllMCPs" /></a>