← Back to Leaderboard
UAnarkh-Lee

Anarkh-Lee/universal-db-mcp

MCP and REST gateway for AI-assisted queries across 17 database backends

View on GitHub ↗
Engineering Health (Methodology)
B · 53/100
Maintenance Activity
● Updated 8mo ago
Latest Release
v2.14.0
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance6/35
Fork Adoption16/25
Release Cadence11/20
License Clarity20/20
DockerSelf-HostedMCPCLIAPI
Total Stars
★ 942
24h Growth
+0
7d Growth
+1
Forks
90

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

Anarkh-Lee/universal-db-mcp Star History (2026-01-21 - 2026-12-03) ALL-TIME STAR HISTORY (2026-01 – 2026-12) +941 in 316d · avg +3/day 995 498 0 2026-01-21: ★ 12026-02-14: ★ 3692026-03-07: ★ 5422026-03-28: ★ 6692026-04-18: ★ 7182026-05-09: ★ 7552026-05-30: ★ 7932026-06-20: ★ 8322026-07-11: ★ 8592026-08-01: ★ 8862026-08-22: ★ 9042026-09-12: ★ 9162026-10-03: ★ 9252026-10-24: ★ 9332026-11-13: ★ 9402026-12-03: ★ 942 ★ 942 2026-01 2026-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Universal DB MCP is a TypeScript service for Node.js 20 or later. It sits between the AI client and the database: the assistant selects tools and formulates queries, while the connector retrieves metadata and executes requests through database drivers. Local clients launch the universal-db-mcp CLI over stdio; HTTP mode uses Fastify to serve Streamable HTTP at /mcp, legacy SSE at /sse, and a REST API.

The runtime combines @modelcontextprotocol/sdk with database-specific dependencies including pg, mysql2, mongodb, ioredis, better-sqlite3, and @clickhouse/client. The MCP tool surface includes execute_query, get_schema, get_table_info, get_enum_values, get_sample_data, and clear_cache. This standardizes how clients discover and invoke tools, not the underlying query dialect or metadata semantics.

Key Capabilities & Differentiators

The connector supports 17 backends, from PostgreSQL, MySQL, Oracle, and SQL Server to Redis, MongoDB, SQLite, ClickHouse, and engines such as Dameng and KingbaseES. Multi-schema discovery is available for engines including PostgreSQL, SQL Server, Oracle, and Dameng. Table comments, inferred relationships, enum values, and sample rows give assistants more context for query generation. Inferred relationships are useful hints, not substitutes for declared keys or verified joins.

Metadata retrieval combines batching with a configurable cache TTL. In the published 500-table example, batched discovery cuts retrieval from about 50 seconds to about 500 milliseconds; that is a schema retrieval example, not a query latency target. Connection pooling, TCP keep-alive, and automatic reconnection are intended for longer-lived sessions. Data masking covers common patterns such as phone numbers and email addresses, but it does not replace limiting which columns and rows the database account can read.

Trade-offs & Limitations

Compared with embedding a database driver in one application, this design adds another process and a protocol boundary, but makes schema and query tools reusable across AI clients and database engines. Compared with an engine-specific connector, breadth is the benefit; verify dialect handling, schema visibility, and permission behavior on the engines you plan to deploy rather than assuming identical behavior. For a single engine and a fixed query set, direct integration has fewer components to operate.

The default safe mode is read-only, but database-level least privilege remains the stronger boundary. Read access can still expose sensitive records or run expensive queries, so use scoped accounts and views and enforce workload limits on the database side. Legacy SSE accepts connection settings in the URL query string, where credentials can enter access logs; prefer Streamable HTTP for remote clients and redact sensitive headers from logs. Do not copy the sample root account into production.

Hardware & Deployment Guide

For local use, install with npm install -g universal-db-mcp or launch it via npx from the MCP client. For self-hosting, start with MODE=http and configure API_KEYS, or use Docker Compose, which builds from docker/Dockerfile, binds to 0.0.0.0, publishes port 3000, and checks /api/health. Replace the default API key and wildcard CORS policy before sharing the service, and put remote access behind TLS and network controls.

v2.14.0 makes --type optional in stdio mode: the process can start disconnected, then use connect_database, disconnect_database, and get_connection_status. A new connection replaces the existing one, so this is a switching workflow, not simultaneous multi-database querying in one stdio session. v2.13.0 fixed a shutdown hang by handling stdin closure and closing the MCP server transport.

Transports: Two startup modes expose MCP stdio, legacy SSE, Streamable HTTP, and REST.
Database coverage: 17 backends span relational, embedded, NoSQL, and OLAP systems, including Dameng and KingbaseES.
Connection lifecycle: v2.14.0 adds stdio connect, disconnect, and status tools; connecting again replaces the current connection.
Schema discovery: Configurable cache TTL, batched metadata retrieval, table comments, and inferred relationships support query generation.
Permissions: safe defaults to read-only, with readwrite, full, and custom modes for explicit write access.
Self-hosting: Docker Compose builds from docker/Dockerfile, publishes port 3000, and probes /api/health.
Best For

Engineering and data teams that want Claude Code, Cursor, or other MCP clients to inspect schemas and run controlled read-only analysis across several database engines.

Skip If

One application runs a fixed query set against one engine, or production access requires centrally enforced tenant isolation and approval workflows that this connector does not establish on its own.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedMCPCLI
npm install -g universal-db-mcp

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
universal-db-mcp ★942+1TypeScriptMITMCP and REST gateway for AI-assisted queries across 17 database backends
rea488.8k+7.6kTypeScriptMITA local CLI and MCP server for evidence-backed app and binary analysis
chrome-devtools-mcp60.4k+760TypeScriptApache-2.0Chrome DevTools via MCP and CLI for live browser debugging and performance analy
skills42.3k+1.1kTypeScriptMITTypeScript CLI for distributing and restoring skills across coding agents

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/Anarkh-Lee/universal-db-mcp.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

Anarkh-Lee/universal-db-mcp Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about universal-db-mcp

How should I connect Claude Code locally and a remote client?

Use stdio when the client can launch and manage a local subprocess. In v2.14.0, the process can start without --type; connect_database replaces the current connection, get_connection_status reports its state, and disconnect_database closes it. For remote MCP clients, use Streamable HTTP at /mcp where supported. REST is a separate option for clients that do not speak MCP.

What hardware does the connector need, and does it consume VRAM?

The connector requires Node.js 20 or later. It runs database drivers and protocol handlers, not a local model, so the connector itself has no GPU or VRAM requirement. Size it against concurrent sessions, open database connections, schema cache size, and query result volume. If the AI client runs a local model, size that separately.

Can we deploy it commercially, and does self-hosting keep all data on-premises?

The MIT license permits commercial use and self-hosting; preserve the applicable copyright and license notices when redistributing the software. Self-hosting the connector does not keep results local if the AI client forwards them to a hosted model. Review what data the client sends upstream, along with database permissions, credential handling, and query logs.

When is this a better fit than integrating a database driver directly?

Choose direct driver integration for predefined, application-controlled queries against one engine. Choose this connector when several AI clients need the same schema discovery and query tools across engines. For a shared remote deployment, budget for access controls and per-engine validation rather than treating broad driver support as equivalent to a governed data service.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining Anarkh-Lee/universal-db-mcp? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature Anarkh-Lee/universal-db-mcp on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare