Data Nexus MCP
This server exposes MCP tools for interacting with configured database connections through querying and schema inspection.
query_database: Run parameterized queries against a named connection, with optional params.
get_schema: Retrieve overall schema information for a connection.
list_tables: List tables or collections in a connection, optionally filtered by schema.
describe_table: Show structure of a specific table or collection, with optional schema.
execute_sql: Execute raw SQL or native database commands on a connection, with optional params.
Provides a driver for ArangoDB, a multi-model database, enabling querying and schema management (stub driver, extensible).
Provides a fully implemented driver for ClickHouse, a time-series database, enabling query execution and schema exploration.
Provides a stub driver for Couchbase, a document database, enabling integration and extensibility.
Provides a stub driver for Databricks, a warehousing service, enabling integration and extensibility.
Provides a fully implemented driver for DuckDB, an embedded database, enabling query execution and schema management.
Provides a fully implemented driver for Elasticsearch, a search engine, enabling query execution and schema exploration.
Provides a stub driver for etcd, a key-value store, enabling integration and extensibility.
Provides a fully implemented driver for InfluxDB, a time-series database, enabling query execution and schema management.
Provides a fully implemented driver for Milvus, a vector database, enabling query execution and schema exploration.
Provides a fully implemented driver for MongoDB, a document database, enabling querying and collection management.
Provides a fully implemented driver for MySQL, a relational database, enabling SQL queries and schema inspection.
Provides a fully implemented driver for Neo4j, a graph database, enabling querying and schema exploration.
Provides a stub driver for Neptune, a graph database, enabling integration and extensibility.
Provides a fully implemented driver for OpenSearch, a search engine, enabling query execution and schema exploration.
Provides a fully implemented driver for PostgreSQL, a relational database, enabling SQL queries and schema inspection.
Provides a stub driver for Prometheus, a time-series database, enabling integration and extensibility.
Provides a fully implemented driver for Redis, a key-value store, enabling query execution and key management.
Provides a stub driver for RocksDB, an embedded key-value store, enabling integration and extensibility.
Provides a fully implemented driver for ScyllaDB, a wide-column database, enabling query execution and schema management.
Provides a fully implemented driver for Snowflake, a cloud data warehouse, enabling query execution and schema exploration.
Provides a stub driver for Splunk, a search engine, enabling integration and extensibility.
Provides a fully implemented driver for SQLite, an embedded database, enabling SQL queries and table management.
Provides support for TimescaleDB, a time-series relational database, enabling query execution and schema management.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Data Nexus MCP show me the schema of the users table in postgres_prod"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Data Nexus MCP
A modular, secure platform for connecting to SQL and NoSQL databases via REST API, MCP (Model Context Protocol), and a Vue.js Web UI.
Architecture
┌─────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Web UI │────▶│ REST API │────▶│ core-db-command │
│ (Vue.js) │ │ (FastAPI) │ │ (Python lib) │
└─────────────┘ └──────┬───────┘ └────────┬────────┘
│ │
┌──────▼───────┐ │
│ MCP Server │───────────────┘
└──────┬───────┘
│
┌──────▼───────┐
│ MCP Client │──▶ AI Agents / LLMs
└──────────────┘Modules
Module | Package | Description |
core-db-command |
| Plugin-based Python library for all database drivers |
rest-api-command |
| FastAPI REST layer with OAuth2/LDAP/basic auth |
mcp-server |
| MCP tools: |
mcp-client |
| MCP client bridge for agent integration |
web-ui |
| Vue 3 + Pinia + Monaco Editor query studio |
config |
| YAML connection definitions with |
Related MCP server: AI-Orchestrator-MCP
Supported Database Types
The driver registry supports 50+ database types across 13 categories:
Relational: PostgreSQL, MySQL, MSSQL, Oracle, CockroachDB, TiDB, YugabyteDB, TimescaleDB, pgvector
Document: MongoDB, DocumentDB, Firestore, Couchbase (stub)
Key-Value: Redis, DynamoDB, Memcached/etcd/RocksDB (stub)
Wide-Column: Cassandra, ScyllaDB, Bigtable/HBase (stub)
Graph: Neo4j, Neptune/JanusGraph/ArangoDB (stub)
Time-Series: InfluxDB, ClickHouse, Prometheus/QuestDB (stub)
Vector: Qdrant, Weaviate, Milvus, Pinecone
Search: Elasticsearch, OpenSearch, Splunk/Solr (stub)
Warehouse: BigQuery, Snowflake, Redshift/Databricks (stub)
Multi-Model: Cosmos DB, OrientDB (stub)
Embedded: SQLite, DuckDB, Realm/LMDB (stub)
Ledger: QLDB/BigchainDB (stub)
NewSQL: Spanner (stub)
Fully implemented drivers include PostgreSQL, MySQL, MSSQL, Oracle, MongoDB, Redis, SQLite, DuckDB, Elasticsearch, ClickHouse, Neo4j, InfluxDB, Cassandra, DynamoDB, BigQuery, Snowflake, Qdrant, Weaviate, Milvus, Pinecone, Cosmos DB, and Firestore. Stub drivers are registered and extensible.
Quick Start
Prerequisites
Python 3.11+
Node.js 20+ (for Web UI development)
Docker & Docker Compose (optional)
1. Install Python dependencies
cp .env.example .env
pip install -e ".[dev]"2. Configure connections
Edit config/connections.yaml and set secrets via environment variables:
connections:
- name: postgres_prod
type: postgresql
host: localhost
port: 5432
database: mydb
user: readonly_user
password: ${PG_PASSWORD}3. Start the REST API
db-rest-api
# or: uvicorn rest_api_command.app:app --reloadAPI docs: http://localhost:8000/docs
4. Start the Web UI (development)
cd web-ui
cp .env.example .env
npm install
npm run devOpen http://localhost:5173 — default credentials: admin / changeme
5. Run with Docker Compose
docker compose up -dServices:
REST API: http://localhost:8000
Web UI: http://localhost:5173
PostgreSQL, MySQL, MongoDB, Redis, Elasticsearch
REST API Endpoints
Method | Path | Description |
GET |
| List connections (no credentials) |
POST |
| Parameterized query |
POST |
| Raw SQL / native command |
GET |
| Database schema |
GET |
| List tables/collections |
GET |
| Table structure |
GET/POST |
| Query history |
MCP Server
Configure in .env or 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=changemeRun:
db-mcp-serverAdd to Cursor/Claude MCP config:
{
"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"
}
}
}
}Note: REST_API_* variables belong on the REST API process (db-rest-api), not in the MCP server config.
MCP Client
db-mcp-client # list available tools
db-mcp-client query local_sqlite "SELECT 1"Authentication
Set REST_API_AUTH_MODE to one of:
basic— HTTP Basic Auth (default for development)oauth2— JWT bearer tokens via/api/auth/tokenldap— LDAP bind (requiresREST_API_LDAP_SERVERandREST_API_LDAP_BASE_DN)
Adding a New Driver
Create
core_db_command/drivers/mydb.pySubclass
BaseDriverand setdriver_typeDecorate with
@DriverRegistry.registerImport 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): ...Testing
pytest tests/ -vSecurity Notes
Credentials are never returned by the REST API or MCP server
Secrets must use
${ENV_VAR}placeholders in YAML configAll API endpoints require authentication
Query input is validated and length-limited
Project Structure
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.tomlLicense
Apache 2.0
Available Tools
5 toolsdescribe_tableA
Describe the structure of a specific table or collection.
Inputs: table (required), connection_name (required), schema. Returns: result
execute_sqlB
Execute raw SQL or native database command on a named connection.
Inputs: command (required), connection_name (required), params. Returns: result
get_schemaC
Retrieve schema information for a named database connection.
Inputs: connection_name (required). Returns: result
list_tablesC
List all tables or collections in a named database connection.
Inputs: connection_name (required), schema. Returns: result
query_databaseD
Run a parameterized query on a named database connection.
Inputs: query (required), connection_name (required), params. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Tools are mostly distinct: query_database and execute_sql both run queries but one is parameterized and the other raw; get_schema, list_tables, describe_table each target different metadata. Minor potential for confusion between the two query tools, but descriptions clarify the difference.
All tool names follow a consistent verb_noun pattern with lowercase and underscores: query_database, get_schema, list_tables, describe_table, execute_sql. No mixed conventions or irregularities.
5 tools are well-scoped for a database MCP server. The set covers core operations—querying, schema retrieval, table listing, structure description, raw execution—without being overwhelming or too sparse.
The tool surface covers essential query and schema exploration operations. The execute_sql tool can handle DDL, but there are no dedicated create/alter/drop tools; transaction commands are also missing. Overall, it's nearly complete for a typical read-heavy interaction pattern.
Maintenance
Related MCP Connectors
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
An agent-native database over MCP: shared, validated, structured records in every AI chat.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Governed app access for AI agents: 1,000+ apps & 12,000+ tools via Code Mode MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides 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.34 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with heterogeneous databases (MySQL, MongoDB, BigQuery) through MCP tools, allowing natural language queries and database operations.-
- AlicenseAqualityCmaintenanceEnables AI agents to inspect real databases through MCP with tools for listing tables, describing schemas, sampling rows, running queries, and explaining execution plans, all with engine-enforced read-only access to SQLite and MySQL.512 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables LLM agents to connect to and retrieve data from PostgreSQL, MySQL, SQLite, BigQuery, Oracle, MS SQL, and Redshift via a unified MCP API, with schema normalization, query optimization, and secure connections.-