AA

apelogic-ai/db-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 3 forks 质量 69 趋势 14MIT

db-mcp is a desktop MCP server that connects Claude to databases and continuously improves data analytics by learning from each query through an LLM-native semantic layer.

概览

db-mcp is an open-source MCP server that connects Claude Desktop to your databases—with a self-improving semantic layer that gets smarter with every query. No infrastructure needed. Runs locally. Data never leaves your network. - — Stop waiting for reports. Query your data in natural language without SQL, copy-pasting schemas, or context-setting - — Auto-generates descriptions of your schema, then learns from every query to improve accuracy over time - — No cloud infrastructure, no data leaving your network. Uses your existing database credentials and access controls - — Data teams review and approve semantic layer improvements. You stay in control, users get accurate answers - — MIT licensed, fully transparent, no vendor lock-in 1. — Download db-mcp to your laptop. No infrastructure needed—runs locally in minutes 2. — Add data sources using your existing credentials. Your security posture stays intact 3. — Ask Claude questions across your connected data.

README

以下为原文 README 节选,完整内容请查看原文。

db-mcp

Your teams are copy-pasting company data into Claude. Give them a safe way to do it.

db-mcp is an open-source MCP server that connects Claude Desktop to your databases—with a self-improving semantic layer that gets smarter with every query.

No infrastructure needed. Runs locally. Data never leaves your network.

Installation

curl -fsSL https://download.apelogic.ai/db-mcp/install.sh | sh

Why db-mcp?

  • Ask Claude, get answers — Stop waiting for reports. Query your data in natural language without SQL, copy-pasting schemas, or context-setting
  • Self-improving semantic layer — Auto-generates descriptions of your schema, then learns from every query to improve accuracy over time
  • Runs on your desktop — No cloud infrastructure, no data leaving your network. Uses your existing database credentials and access controls
  • Git-style collaboration — Data teams review and approve semantic layer improvements. You stay in control, users get accurate answers
  • Open source & auditable — MIT licensed, fully transparent, no vendor lock-in

Who is db-mcp for?

Role Benefit
Business Teams Ask Claude questions about your data and get accurate answers instantly—no SQL required
Data Teams Turn your warehouse into an agent-ready platform with a semantic layer that builds itself
IT & Security Govern AI data access with full interaction history, read-only enforcement, and cost guards

How It Works

From install to insight in four steps:

  1. Install — Download db-mcp to your laptop. No infrastructure needed—runs locally in minutes
  2. Connect — Add data sources using your existing credentials. Your security posture stays intact
  3. Query — Ask Claude questions across your connected data. Every query is validated before execution
  4. Improve — The semantic layer learns from usage. Review and approve improvements with a git-style workflow

Quick Start

# Configure your database and Claude Desktop
db-mcp init

# Check configuration
db-mcp status

Supported Agents

Claude Desktop

The default setup works with Claude Desktop. Follow the Quick Start instructions above.

OpenClaw

db-mcp works with OpenClaw via mcporter:

# Install mcporter (MCP bridge for OpenClaw)
npm i -g mcporter

# Configure db-mcp for OpenClaw
db-mcp init

Or manually add to ~/.openclaw/workspace/config/mcporter.json:

{
  "mcpServers": {
    "db-mcp": {
      "command": "db-mcp",
      "args": ["start"]
    }
  }
}

Supported Databases

  • PostgreSQL
  • ClickHouse
  • Trino
  • MySQL
  • SQL Server

Security & Governance

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "db-mcp": { "command": "db-mcp", "args": ["start"] } } }