DB Connector MCP logo

DB Connector MCP

Connects AI clients to configured databases for guarded SQL execution, schema inspection, connection management, and audit logging.

Install DB Connector MCP

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

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

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y db-connector-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

db-connector-mcp exposes configured DM8, MySQL, Kingbase KADB, Oracle, and H2 connections through MCP over Streamable HTTP with SSE. Agents can inspect schemas, run parameterized read queries, execute explicitly enabled DML or DDL, and review SELECT execution plans. A local web console manages connections, access rules, connection pools, and audit records. Reach for it when an AI client needs controlled database access without embedding credentials in client configuration.

Use cases

  • Connect an AI coding client to approved development databases
  • Query application data with named SQL parameters
  • Inspect tables, columns, indexes, and sample rows
  • Review SELECT execution plans before changing queries
  • Audit database operations and blocked SQL attempts

Key features

  • MCP access over Streamable HTTP with SSE
  • Support for DM8, MySQL, Kingbase KADB, Oracle, and H2
  • Per-connection DML and DDL permissions
  • Parameterized read queries and SQL safety checks
  • Schema metadata and execution-plan tools
  • Persistent audit logging with encrypted credentials

Tools12

What DB Connector MCP lets your agent do. Expand a tool for its parameters.

Self-reported~176 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

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · db-connector-mcp (npm)

Adoption & maintenance

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

npm downloads72Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed12Callable tools this server registers over MCP.

How DB Connector MCP works

What db-connector-mcp does

db-connector-mcp acts as a local database sidecar, presenting configured JDBC connections as MCP tools. Supported connection types include Dameng DM8, MySQL, Kingbase KADB, Oracle, and H2. Its built-in web console provides connection CRUD operations, connectivity checks, connection-pool management, recent query statistics, and searchable audit logs with CSV export.

The service exposes its MCP endpoint at /mcp, while the web console runs separately on a local HTTP port. Credentials are stored in encrypted form using AES-256-GCM. A generated key is kept in the data directory unless DBCONNECTOR_CRYPTO_KEY is supplied.

How it works

Agents select a connection by ID or name when invoking database tools. Read queries accept named parameters such as :userId; values are bound rather than interpolated into SQL. Query and plan responses include columns, rows, row counts, truncation status, and execution time. DML responses report the operation, affected-row count, and duration.

SQL passes through a parser-based safety check that classifies statements and rejects multiple statements, unsupported forms, and prohibited query shapes. Query results are capped at 100 rows and queries have a 10-second timeout. Statements are committed automatically and cannot be rolled back through the service.

The default HTTP access policy permits loopback clients only. The console can add individual IP addresses or CIDR ranges, and the same allowlist protects both the web interface and MCP endpoint. Audit entries record successful, failed, and blocked calls in an H2-backed store that persists across restarts.

Setup and configuration

Run the packaged launcher with Node.js 16 or newer:

Terminal
npx db-connector-mcp

The process normally exposes MCP on http://127.0.0.1:63306/mcp and the console on http://127.0.0.1:63380. DBCONNECTOR_PORT and DBCONNECTOR_WEB_PORT change those ports; both choose an available port automatically if the default is occupied. DBCONNECTOR_DATA_DIR changes the location of the H2 data and encryption key. Binding addresses can be controlled with DBCONNECTOR_BIND_HOST and DBCONNECTOR_WEB_HOST.

Cursor, Claude Code, VS Code, Cline, and Roo Code can connect using the HTTP/SSE endpoint. For example, clients using an MCP URL can point to http://127.0.0.1:63306/mcp.

Tools and capabilities

  • Manage active connections with list_connections, create_connection, update_connection, delete_connection, and test_connection.
  • Run read-only SQL through query_database with named parameter binding.
  • Execute one INSERT, UPDATE, DELETE, or MERGE with execute_dml when DML is enabled for the selected connection.
  • Execute one CREATE, ALTER, DROP, or TRUNCATE statement with execute_ddl when DDL is enabled.
  • Obtain a SELECT execution plan through explain_sql; the tool adds the EXPLAIN operation itself.
  • Inspect schemas with list_tables, describe_table, and get_table_sample, which returns at most five rows.

Limitations and notes

Write access is disabled by default and must be enabled separately for DML and DDL on each connection in the web console. UPDATE and DELETE statements require a WHERE clause unless allowFullTable=true is explicitly supplied. Database accounts should still use the minimum required privileges.

Oracle connections use a service name rather than a SID or TNS form, and Oracle extraParams are ignored. Oracle positional bindings such as :1, PL/SQL anonymous blocks, multiple statements, and some legacy (+) joins are outside the supported SQL forms. Multi-user access, RBAC, and remote-deployment features are not part of the current scope.

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 DB Connector MCP

db-connector-mcp is an MCP server that connects AI clients to configured DM8, MySQL, Kingbase KADB, Oracle, and H2 databases. Its main tools manage connections, run parameterized read queries, execute permitted DML or DDL, inspect schema metadata, retrieve sample rows, and explain SELECT statements.

Install and start it with `npx db-connector-mcp` on Node.js 16 or newer. The package includes the required JRE, so a separate JDK installation is not needed. A shell installer and source-build path are also available.

Yes, db-connector-mcp works with Cursor through its MCP URL. Add an MCP server entry pointing to `http://127.0.0.1:63306/mcp` in the relevant `.cursor/mcp.json` file.

Enable DML or DDL separately for the target connection in the web console. Read queries remain available through `query_database`, while `execute_dml` and `execute_ddl` reject operations unless their corresponding connection permission is enabled.

Yes, Oracle is supported through a service-name JDBC URL such as `jdbc:oracle:thin:@//host:1521/service`. SID and TNS URL forms, Oracle positional bindings, PL/SQL anonymous blocks, and Oracle `extraParams` are not supported.

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 PreviewDB Connector MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/db-connector-mcp?style=directory)](https://allmcps.com/mcp/db-connector-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/db-connector-mcp"><img src="https://allmcps.com/api/badge/db-connector-mcp?style=directory" alt="DB Connector MCP on AllMCPs" /></a>