NM

nam088/mcp-db-server

Database management

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

80 stars 81 forks 品質 85 トレンド 8MIT

nam088/mcp-db-server は [https://github.com/nam088/mcp-db-server.] からインポートされた MCP サーバーの候補です

概要

nam088/mcp-db-server は [https://github.com/nam088/mcp-db-server.] からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

mcp-server-db は、AI アシスタントがPostgres、Redis、Elasticsearch、MySQL、MongoDB、LDAP と対話することを可能にする、ユニバーサルで生産レベルのモデルコンテキストプロトコル(MCP)サーバーです。

責任を念頭に置いて構築された、それは背景の怠惰な接続管理、指数関数的なバックオフレトリー、回路ブレーカパターン、厳格な読み取り専用セキュリティの執行、およびオンデマンドダイナミックドライバのロードを備えています。

お問い合わせ

#mcp-server-dbの理由

-マルチデータベースサポート:Postgres、Redis、Elasticsearch(v7、v8、v9)、MySQL、MongoDB、およびLDAPのディレクトリに同時に接続します。

  • オンデマンドライトドライバ:ゼロブラット。 ioredis, [mongodb], [mysql2]], [@elastic/elasticsearch]]], [ldapts])は、そのデータベースエンジンの初期化時にのみ動的にロードされます。 -Ironclad Safety:リレーショナルデータベースとクエリ結果のトランジションガードのセッションレベルの執行による独立した接続ごとの読み取り専用モード。LM文脈の流出を防ぐ。
  • 防腐剤建築: データベースの可用性に関係なく、サーバーは即座に起動します.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

mcp-server-db

mcp-server-db is a universal, production-grade Model Context Protocol (MCP) server that empowers AI assistants to interact with Postgres, Redis, Elasticsearch, MySQL, MongoDB, and LDAP through a unified suite of 113+ high-performance tools.

Built with resilience in mind, it features background lazy connection management, exponential backoff retries, circuit breaker patterns, strict read-only security enforcement, and on-demand dynamic driver loading.


Why mcp-server-db?

  • Multi-Database Support: Connect to Postgres, Redis, Elasticsearch (v7, v8 & v9), MySQL, MongoDB, and LDAP directories simultaneously.
  • On-Demand Light Drivers: Zero bloat. Drivers (pg, ioredis, mongodb, mysql2, @elastic/elasticsearch, ldapts) are dynamically loaded only when a connection to that database engine is initialized.
  • Ironclad Safety: Independent per-connection read-only mode with session-level enforcement for relational databases and query result truncation guards to prevent LLM context overflows.
  • Fault-Tolerant Architecture: Server starts instantly regardless of database availability. Dead or unreachable databases fail gracefully without crashing the MCP process or blocking other connections.
  • Multi-Connection Routing: Query multiple environments (e.g., production read-only replica + local scratch cache) in parallel within the same session.

Supported Database Engines

Database Engine Default Driver Supported Versions Key Features & Guardrails
PostgreSQL pg (optional) 10+ Table/Index stats, Health diagnostics, Session-level read_only, Statement timeouts
Redis ioredis (optional) 5+ Key/String/Hash/Set/List operations, Automatic 1000-item result truncation cap
Elasticsearch @elastic/elasticsearch / es7-client 7.x, 8.x, 9.x Dual-API version facade (v7 legacy & v8/v9 modern), Cluster health, Query DSL
MySQL / MariaDB mysql2 (optional) 5.7+, 8.0+ DDL extraction (SHOW CREATE), Processlist management, Indexes & Triggers, Session read-only
MongoDB mongodb (optional) 4.4+ Aggregation pipelines, Distinct queries, Index management, Execution plan explain
LDAP ldapts (optional) v3 directories (OpenLDAP, AD, etc.) Search/compare, Add/modify/delete entries, Bulk entry seeding

Quick Start

1. Installation & Optional Drivers

GitHub で README 全文を見る

インストール

npx -y mcp-server-db
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "mcp-server-db": { "type": "stdio", "command": "npx", "args": ["-y", "mcp-server-db"], "env": { "POSTGRES_URL": "postgresql://user:password@localhost:5432/mydb", "REDIS_URL": "redis://localhost:6379", "MONGODB_URL": "mongodb://localhost:27017", "LDAP_URL": "ldap://localhost:389", "LDAP_BIND_DN": "cn=admin,dc=example,dc=com", "LDAP_BIND_PASSWORD": "admin-password" } } } }