Data Platform MCP Server
Data Platform MCP Server
目前版本 / Current release: v0.2.0
繁體中文:這是一個面向 Data Engineering / DataOps 的 Model Context Protocol (MCP) Server 參考專案,讓 ChatGPT、Claude、Codex 或其他 MCP Host 能以標準 MCP Tool、Resource、Prompt 介面安全地查詢資料平台。
English: A production-oriented Model Context Protocol (MCP) server reference for Data Engineering and DataOps. It exposes data-platform capabilities through standardized MCP tools, resources, and prompts.
繁體中文:Repository 預設只使用 synthetic demo data,不包含任何公司、客戶、真實資料庫帳密、內部 URL 或正式環境資訊。
English: The repository defaults to synthetic demo data and contains no company/customer data, real credentials, internal URLs, or production environment information.
v0.2 重點 / v0.2 Highlights
Official MCP Python SDK v2 (
MCPServer)stdio and Streamable HTTP transports
11 MCP tools for catalog, SQL, DataOps, logs, and runbooks
MCP resources + resource templates
MCP prompts for incident triage and data discovery
Synthetic zero-dependency demo mode
Optional read-only PostgreSQL catalog adapter
Airflow 3 stable public REST API (
/api/v2) adapterOpenSearch ETL log search
Grafana Loki ETL log search
SQL read-only guardrails
Docker / Docker Compose
Protocol-level MCP tests + pytest + Ruff CI
pip-audit + Trivy security workflow
Traditional Chinese / English documentation
架構 / Architecture
ChatGPT / Claude / Codex / MCP Host
|
MCP (stdio / HTTP)
|
v
+---------------------------+
| Data Platform MCP Server |
| MCPServer v2 |
+-------------+-------------+
|
+-----------+-------------+----------------+
| | |
v v v
Catalog Adapter Operations Adapter Log Adapter
Demo / PostgreSQL Demo / Airflow 3 Demo/OpenSearch/Loki
| | |
+-------------------------+----------------+
|
v
Runbook KnowledgeMCP Primitives
Tools
Tool | Purpose / 用途 |
| Server health and version / 服務健康狀態 |
| List configured sources / 列出資料來源 |
| List schemas / 列出 Schema |
| List tables/views / 列出 Table/View |
| Column metadata / 欄位資訊 |
| Lightweight statistics / 輕量統計 |
| Read-only SQL explain / 唯讀 SQL 執行計畫 |
| List Airflow/demo DAGs / DAG 清單 |
| Latest DAG state / DAG 狀態 |
| Demo/OpenSearch/Loki log search / ETL Log 搜尋 |
| Operations knowledge / Runbook 搜尋 |
Resources
platform://capabilitiescatalog://{source}/{schema}/{table}
Prompts
incident_triage(dag_id, symptom)data_discovery(source, schema, question)
快速開始 / Quick Start
git clone https://github.com/kewinall/data-platform-mcp-server.git
cd data-platform-mcp-server
python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
cp .env.example .envstdio:
DPMCP_TRANSPORT=stdio data-platform-mcpStreamable HTTP:
DPMCP_TRANSPORT=streamable-http data-platform-mcpDefault MCP endpoint:
http://localhost:8000/mcpDocker:
cp .env.example .env
docker compose up --buildProduction Adapter Example
export DPMCP_MODE=postgres
export DPMCP_POSTGRES_DSN='postgresql://readonly_user:change-me@db:5432/analytics'
export DPMCP_OPERATIONS_MODE=airflow
export DPMCP_AIRFLOW_BASE_URL='https://airflow.example.internal'
export DPMCP_AIRFLOW_TOKEN='replace-me'
export DPMCP_LOGS_MODE=loki
export DPMCP_LOKI_URL='https://loki.example.internal'
export DPMCP_LOKI_TOKEN='replace-me'
data-platform-mcpSee docs/integrations.md.
Security Principles
All v0.2 platform integrations are read-only.
Use backend identities with minimum read permissions only.
PostgreSQL sessions enable
default_transaction_read_only=on.SQL write/DDL and multiple statements are rejected.
Airflow adapter uses GET endpoints only; it never triggers or clears DAGs.
OpenSearch adapter only searches indexes.
Loki adapter only uses
query_range.Secrets are supplied through environment variables and are not committed.
Application guardrails are defense-in-depth and do not replace backend-side least privilege.
Development
make install
make lint
make testCI validates Python 3.11/3.12, Ruff, pytest, compile, and Docker build. Security workflow runs pip-audit and Trivy.
Roadmap
v0.1 ✅ MCP foundation + PostgreSQL read-only adapter
v0.2 ✅ Airflow 3 + OpenSearch/Loki + MCP Resources/Prompts
v0.3 Vertica + metadata/lineage + parser-based SQL policy + RBAC/API token + audit
v0.4 Kubernetes/Helm + OIDC/multi-tenancy + OpenTelemetry + offline deployment
Documentation
docs/architecture.md— 架構 / Architecturedocs/tool-catalog.md— MCP Tool Catalogdocs/installation.md— 安裝 / Installationdocs/integrations.md— Airflow / OpenSearch / Lokidocs/security.md— Security Designdocs/v0.2.md— v0.2 Release Guidedocs/roadmap.md— RoadmapCHANGELOG.md— Release notes
License
MIT License. See LICENSE.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/kewinall/data-platform-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server