Skip to main content
Glama
HumanSamadian

Data Nexus MCP

Data Nexus MCP

Eine modulare, sichere Plattform zur Verbindung mit SQL- und NoSQL-Datenbanken über REST-API, MCP (Model Context Protocol) und eine Vue.js-Web-UI.

Architektur

┌─────────────┐     ┌──────────────┐     ┌─────────────────┐
│   Web UI    │────▶│  REST API    │────▶│ core-db-command │
│  (Vue.js)   │     │  (FastAPI)   │     │  (Python lib)   │
└─────────────┘     └──────┬───────┘     └────────┬────────┘
                           │                       │
                    ┌──────▼───────┐               │
                    │  MCP Server  │───────────────┘
                    └──────┬───────┘
                           │
                    ┌──────▼───────┐
                    │  MCP Client  │──▶ AI Agents / LLMs
                    └──────────────┘

Module

Modul

Paket

Beschreibung

core-db-command

core_db_command/

Plugin-basierte Python-Bibliothek für alle Datenbanktreiber

rest-api-command

rest_api_command/

FastAPI-REST-Schicht mit OAuth2/LDAP/Basic-Authentifizierung

mcp-server

mcp_server/

MCP-Tools: query_database, get_schema, list_tables, describe_table, execute_sql

mcp-client

mcp_client/

MCP-Client-Brücke für Agentenintegration

web-ui

web-ui/

Vue 3 + Pinia + Monaco Editor Abfragestudio

config

config/

YAML-Verbindungsdefinitionen mit ${ENV}-Substitution

Related MCP server: Database MCP Server

Unterstützte Datenbanktypen

Die Treiberregistrierung unterstützt über 50 Datenbanktypen in 13 Kategorien:

  • Relational: PostgreSQL, MySQL, MSSQL, Oracle, CockroachDB, TiDB, YugabyteDB, TimescaleDB, pgvector

  • Dokument: MongoDB, DocumentDB, Firestore, Couchbase (stub)

  • Schlüssel-Wert: Redis, DynamoDB, Memcached/etcd/RocksDB (stub)

  • Breitspalten: Cassandra, ScyllaDB, Bigtable/HBase (stub)

  • Graph: Neo4j, Neptune/JanusGraph/ArangoDB (stub)

  • Zeitreihen: InfluxDB, ClickHouse, Prometheus/QuestDB (stub)

  • Vektor: Qdrant, Weaviate, Milvus, Pinecone

  • Suche: Elasticsearch, OpenSearch, Splunk/Solr (stub)

  • Data Warehouse: BigQuery, Snowflake, Redshift/Databricks (stub)

  • Multi-Modell: Cosmos DB, OrientDB (stub)

  • Eingebettet: SQLite, DuckDB, Realm/LMDB (stub)

  • Ledger: QLDB/BigchainDB (stub)

  • NewSQL: Spanner (stub)

Vollständig implementierte Treiber umfassen PostgreSQL, MySQL, MSSQL, Oracle, MongoDB, Redis, SQLite, DuckDB, Elasticsearch, ClickHouse, Neo4j, InfluxDB, Cassandra, DynamoDB, BigQuery, Snowflake, Qdrant, Weaviate, Milvus, Pinecone, Cosmos DB und Firestore. Stub-Treiber sind registriert und erweiterbar.

Schnellstart

Voraussetzungen

  • Python 3.11+

  • Node.js 20+ (für die Web-UI-Entwicklung)

  • Docker & Docker Compose (optional)

1. Python-Abhängigkeiten installieren

cp .env.example .env
pip install -e ".[dev]"

2. Verbindungen konfigurieren

Bearbeiten Sie config/connections.yaml und setzen Sie Geheimnisse über Umgebungsvariablen:

connections:
  - name: postgres_prod
    type: postgresql
    host: localhost
    port: 5432
    database: mydb
    user: readonly_user
    password: ${PG_PASSWORD}

3. REST-API starten

db-rest-api
# or: uvicorn rest_api_command.app:app --reload

API-Dokumentation: http://localhost:8000/docs

4. Web-UI starten (Entwicklung)

cd web-ui
cp .env.example .env
npm install
npm run dev

Öffnen Sie http://localhost:5173 — Standard-Anmeldedaten: admin / changeme

5. Mit Docker Compose ausführen

docker compose up -d

Dienste:

REST-API-Endpunkte

Methode

Pfad

Beschreibung

GET

/api/connections

Verbindungen auflisten (keine Anmeldedaten)

POST

/api/db/{name}/query

Parametrisierte Abfrage

POST

/api/db/{name}/sql

Rohes SQL / nativer Befehl

GET

/api/db/{name}/schema

Datenbankschema

GET

/api/db/{name}/tables

Tabellen/Sammlungen auflisten

GET

/api/db/{name}/tables/{table}/describe

Tabellenstruktur

GET/POST

/api/query-history

Abfrageverlauf

MCP-Server

Konfigurieren Sie in .env oder Cursor MCP env:

MCP_REST_API_URL=http://localhost:8000
# Option A: bearer token (when REST_API_AUTH_MODE=oauth2)
MCP_REST_API_TOKEN=<jwt-from-/api/auth/token>
# Option B: username/password (works with basic auth; auto-fetches JWT if oauth2)
MCP_REST_API_USER=admin
MCP_REST_API_PASSWORD=changeme

Ausführen:

db-mcp-server

Hinzufügen zur Cursor/Claude MCP-Konfiguration:

{
  "mcpServers": {
    "data-nexus-mcp": {
      "command": "db-mcp-server",
      "cwd": "/path/to/data_nexus_mcp",
      "env": {
        "MCP_REST_API_URL": "http://localhost:8000",
        "MCP_REST_API_USER": "admin",
        "MCP_REST_API_PASSWORD": "changeme"
      }
    }
  }
}

Hinweis: REST_API_*-Variablen gehören zum REST-API-Prozess (db-rest-api), nicht zur MCP-Server-Konfiguration.

MCP-Client

db-mcp-client                    # list available tools
db-mcp-client query local_sqlite "SELECT 1"

Authentifizierung

Setzen Sie REST_API_AUTH_MODE auf einen der folgenden Werte:

  • basic — HTTP-Basisauthentifizierung (Standard für Entwicklung)

  • oauth2 — JWT-Bearer-Tokens über /api/auth/token

  • ldap — LDAP-Bindung (erfordert REST_API_LDAP_SERVER und REST_API_LDAP_BASE_DN)

Hinzufügen eines neuen Treibers

  1. Erstellen Sie core_db_command/drivers/mydb.py

  2. Erben Sie von BaseDriver und setzen Sie driver_type

  3. Dekorieren Sie mit @DriverRegistry.register

  4. Importieren Sie in core_db_command/drivers/registry_loader.py

from core_db_command.base import BaseDriver, DriverRegistry

@DriverRegistry.register
class MyDBDriver(BaseDriver):
    driver_type = "mydb"

    async def connect(self): ...
    async def disconnect(self): ...
    async def query(self, query, params=None): ...
    async def execute(self, command, params=None): ...
    async def list_tables(self, schema=None): ...
    async def describe_table(self, table, schema=None): ...

Testen

pytest tests/ -v

Sicherheitshinweise

  • Anmeldedaten werden niemals von der REST-API oder dem MCP-Server zurückgegeben

  • Geheimnisse müssen ${ENV_VAR}-Platzhalter in der YAML-Konfiguration verwenden

  • Alle API-Endpunkte erfordern Authentifizierung

  • Abfrageeingaben werden validiert und in der Länge begrenzt

Projektstruktur

data-nexus-mcp/
├── core_db_command/       # Core library + drivers
├── rest_api_command/      # FastAPI REST API
├── mcp_server/            # MCP server
├── mcp_client/            # MCP client
├── web-ui/                # Vue.js frontend
├── config/                # YAML connection config
├── tests/                 # Unit tests
├── docker-compose.yml
├── Dockerfile
└── pyproject.toml

Lizenz

MIT

Install Server
A
license - permissive license
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    C
    maintenance
    Enables LLMs and agents to interact with relational databases (SQL Server, MySQL, PostgreSQL) through MCP tools. Supports executing queries, inserting records, listing tables, and exposing database schemas with secure credential management.
  • A
    license
    -
    quality
    D
    maintenance
    Provides universal database operations for AI assistants through MCP, supporting 40+ databases including PostgreSQL, MySQL, MongoDB, Redis, and SQLite with built-in introspection tools for schema exploration.
    29
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Give your AI agent safe, plain-English access to any database via MCP. Ask questions in natural language, get SQL queries and results, run read-only queries, and set up scheduled alerts.
    9
    60
    MIT

View all related MCP servers

Related MCP Connectors

  • Free public MCP for AI agents — 193 tools, 44 workflows. No API key.

  • Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.

  • Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HumanSamadian/data-nexus-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server