Skip to main content
Glama
HumanSamadian

Data Nexus MCP

Data Nexus MCP

モジュール式でセキュアなプラットフォーム。REST API、MCP(Model Context Protocol)、Vue.js Web UI を介して SQL および NoSQL データベースに接続します。

アーキテクチャ

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

モジュール

モジュール

パッケージ

説明

core-db-command

core_db_command/

すべてのデータベースドライバ向けのプラグインベースの Python ライブラリ

rest-api-command

rest_api_command/

OAuth2/LDAP/基本認証を備えた FastAPI REST レイヤー

mcp-server

mcp_server/

MCP ツール: query_database, get_schema, list_tables, describe_table, execute_sql

mcp-client

mcp_client/

エージェント統合のための MCP クライアントブリッジ

web-ui

web-ui/

Vue 3 + Pinia + Monaco Editor クエリスタジオ

config

config/

${ENV} 置換を使用した YAML 接続定義

Related MCP server: Database MCP Server

サポートされているデータベースタイプ

ドライバレジストリは 13 カテゴリ、50 以上のデータベースタイプ をサポートしています:

  • リレーショナル: PostgreSQL, MySQL, MSSQL, Oracle, CockroachDB, TiDB, YugabyteDB, TimescaleDB, pgvector

  • ドキュメント: MongoDB, DocumentDB, Firestore, Couchbase (スタブ)

  • キー・バリュー: Redis, DynamoDB, Memcached/etcd/RocksDB (スタブ)

  • ワイドカラム: Cassandra, ScyllaDB, Bigtable/HBase (スタブ)

  • グラフ: Neo4j, Neptune/JanusGraph/ArangoDB (スタブ)

  • 時系列: InfluxDB, ClickHouse, Prometheus/QuestDB (スタブ)

  • ベクトル: Qdrant, Weaviate, Milvus, Pinecone

  • 検索: Elasticsearch, OpenSearch, Splunk/Solr (スタブ)

  • ウェアハウス: BigQuery, Snowflake, Redshift/Databricks (スタブ)

  • マルチモデル: Cosmos DB, OrientDB (スタブ)

  • 組み込み: SQLite, DuckDB, Realm/LMDB (スタブ)

  • 台帳: QLDB/BigchainDB (スタブ)

  • NewSQL: Spanner (スタブ)

完全実装されたドライバには、PostgreSQL、MySQL、MSSQL、Oracle、MongoDB、Redis、SQLite、DuckDB、Elasticsearch、ClickHouse、Neo4j、InfluxDB、Cassandra、DynamoDB、BigQuery、Snowflake、Qdrant、Weaviate、Milvus、Pinecone、Cosmos DB、Firestore が含まれます。スタブドライバは登録されており、拡張可能です。

クイックスタート

前提条件

  • Python 3.11+

  • Node.js 20+(Web UI 開発用)

  • Docker & Docker Compose(オプション)

1. Python 依存関係のインストール

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

2. 接続の設定

config/connections.yaml を編集し、環境変数でシークレットを設定します:

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

3. REST API の起動

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

API ドキュメント: http://localhost:8000/docs

4. Web UI の起動(開発)

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

http://localhost:5173 を開く — デフォルトの認証情報: admin / changeme

5. Docker Compose で実行

docker compose up -d

サービス:

REST API エンドポイント

メソッド

パス

説明

GET

/api/connections

接続一覧(認証情報なし)

POST

/api/db/{name}/query

パラメータ化クエリ

POST

/api/db/{name}/sql

生 SQL / ネイティブコマンド

GET

/api/db/{name}/schema

データベーススキーマ

GET

/api/db/{name}/tables

テーブル/コレクション一覧

GET

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

テーブル構造

GET/POST

/api/query-history

クエリ履歴

MCP サーバー

.env または 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

実行:

db-mcp-server

Cursor/Claude MCP 設定に追加:

{
  "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"
      }
    }
  }
}

注: REST_API_* 変数は REST API プロセス(db-rest-api)に属し、MCP サーバー設定には含めません。

MCP クライアント

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

認証

REST_API_AUTH_MODE を次のいずれかに設定:

  • basic — HTTP 基本認証(開発時のデフォルト)

  • oauth2/api/auth/token 経由の JWT ベアラートークン

  • ldap — LDAP バインド(REST_API_LDAP_SERVERREST_API_LDAP_BASE_DN が必要)

新しいドライバの追加

  1. core_db_command/drivers/mydb.py を作成

  2. BaseDriver をサブクラス化し、driver_type を設定

  3. @DriverRegistry.register でデコレート

  4. 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): ...

テスト

pytest tests/ -v

セキュリティに関する注意

  • 認証情報は REST API や MCP サーバーによって 決して返されません

  • シークレットは YAML 設定で ${ENV_VAR} プレースホルダーを使用する必要があります

  • すべての API エンドポイントは認証を必要とします

  • クエリ入力は検証され、長さ制限があります

プロジェクト構造

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

ライセンス

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