Enterprise Big Data Copilot
Provides tools for interacting with Trino, enabling metadata retrieval, SQL query validation, and best-effort execution of validated queries on Trino clusters.
Click on "Install 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., "@Enterprise Big Data CopilotAnalyze our sales data by region for the last quarter"
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.
Enterprise Big Data Copilot
An AI copilot that turns natural-language questions into validated, schema-aware Trino SQL, using RAG, MCP tools, and local LLM inference.
Overview
Enterprise Big Data Copilot lets users query Big Data platforms in plain English. A LangGraph pipeline retrieves relevant documentation (RAG) and live schema metadata (MCP), generates SQL with a local LLM (Ollama), validates it against safety and schema rules, and — when the platform is reachable — executes it on Trino and returns real rows.
Related MCP server: Doris MCP Server
Features
Natural-language Text-to-SQL generation for Trino
Local LLM inference with Ollama (no cloud API required)
RAG retrieval over Trino / Hive / Iceberg documentation (Qdrant)
Schema-aware generation grounded in live catalog metadata
SQL validation (read-only SELECT enforcement, parse check, schema grounding) with an automatic regeneration loop
Best-effort query execution and result retrieval from Trino
Model Context Protocol (MCP) server exposing metadata, query, and profiling tools
OpenAI-compatible API for Open WebUI
End-to-end pipeline tracing with LangSmith
Architecture
flowchart LR
User --> API
API --> Agent
Agent --> RAG
RAG --> Qdrant
Agent --> LLM
Agent --> MCP
MCP --> Trino
Agent --> Validation
Agent --> Response
Response --> UserTech Stack
Technology | Purpose |
Python + FastAPI | Backend and REST/OpenAI-compatible API |
LangGraph | Pipeline orchestration (RAG → schema → SQL → validate → execute) |
Ollama | Local LLM ( |
LangChain + Qdrant | RAG document retrieval |
FastMCP | Model Context Protocol server (tools) |
LangSmith | Pipeline tracing and monitoring |
Trino | SQL query engine (TPCH demo catalog) |
Open WebUI | Chat UI (optional) |
Docker | Containerized infrastructure |
Project Structure
app/
├── agent/ # SQL agent + prompts (Ollama)
├── api/ # REST + OpenAI-compatible endpoints
├── core/ # Config, models, exceptions, logging
├── formatter/ # Response formatting
├── mcp/ # MCP server, client, catalog services
├── orchestrator/ # LangGraph pipeline
├── rag/ # Ingestion and retrieval (Qdrant)
├── services/ # Trino client
└── validator/ # SQL validation
tests/ # pytest suite
docker/ # App image + Trino config
docs/ # RAG knowledge base
scripts/ # Document ingestion CLIGetting Started
Prerequisites
Python 3.11 or 3.12 (3.13 is not supported)
Docker + Docker Compose
GPU optional (Ollama can run on CPU)
Installation
git clone https://github.com/hani-ben-dhaou/Enterprise-Big-Data-Copilot.git
cd entreprise-bigdata-copilot
python -m venv .venv
# Windows: .venv\Scripts\activate | macOS/Linux: source .venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt # pytestConfiguration
cp .env.example .envKey variables (defaults work for local dev):
Variable | Description |
| LLM server and model ( |
| Embedding model ( |
| Qdrant vector database |
| Trino (default catalog |
|
|
|
|
| Run validated SQL on Trino |
| Set |
| Your LangSmith API key (tracing stays off if empty) |
| LangSmith project name (default |
Run
# 1. Start infrastructure (Ollama, Qdrant, Trino)
docker compose up -d
# 2. Pull models and ingest documentation (Qdrant must be up)
docker exec -it copilot-ollama ollama pull llama3.2
docker exec -it copilot-ollama ollama pull mxbai-embed-large
python scripts/ingest_docs.py
# 3. Start the API
uvicorn app.main:app --reload --port 8000
# 4. Optional: standalone MCP server (SSE on :8001)
python -m app.mcp.serverUsage
Ask a question in natural language:
curl -X POST http://localhost:8000/api/v1/query \
-H "Content-Type: application/json" \
-d '{"question":"Show me the top 10 customers by total revenue last month"}'The response includes the generated SQL, an explanation, a confidence score, warnings, and — when execution is enabled — the result rows:
{
"question": "Show me the top 10 customers by total revenue last month",
"sql": "SELECT ...",
"explanation": "...",
"confidence": 0.92,
"warnings": [],
"dialect": "trino",
"results": [["42", "Acme", 98765.00]],
"execution": {"status": "ok", "columns": ["id", "name", "revenue"], "row_count": 1, "truncated": false}
}Other endpoints: GET /api/v1/schema (list catalog), GET /api/v1/health, and POST /v1/chat/completions (OpenAI-compatible, used by Open WebUI).
Testing
pytestThe suite is hermetic and runs without a live stack (146 tests).
Tracing & Monitoring
Every pipeline query (RAG retrieval, schema lookup, SQL generation, validation
loops, execution) can be traced with LangSmith.
Create a free account, grab an API key, and set:
LANGCHAIN_TRACING_V2=true, LANGCHAIN_API_KEY=<your key>, and optionally
LANGCHAIN_PROJECT=copilot. Tracing stays off while no key is configured.

Docker
docker compose runs the full stack:
Service | Container | Port |
Ollama |
| 11434 |
Qdrant |
| 6333 |
Trino |
| 8080 |
Open WebUI |
| 3000 |
Copilot API |
| 8000 |
MCP Server |
| 8001 |
Named volumes persist Ollama models, Qdrant data, and Open WebUI data. The ollama volume is declared external — create it once if not present:
docker volume create ollama
docker compose up -d
docker compose ps
docker compose logs -f copilot-api
docker compose downWindows note: MCP over real SSE can be flaky on the Windows event loop. Keep
MCP_TRANSPORT=inprocessfor local development on Windows; use SSE on Linux/Docker.
This server cannot be installed
Maintenance
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
- AlicenseBqualityDmaintenanceProvides AI models with structured access to Trino's distributed SQL query engine, enabling LLMs to directly query and analyze data stored in Trino databases.310MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language querying of Apache Doris databases via LLM-powered SQL generation, execution, and metadata management through the MCP protocol.9Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables listing and querying Trino tables via MCP, supporting arbitrary SQL queries against a Trino cluster.MIT
- FlicenseAqualityAmaintenanceNatural language to SQL engine with multi-connector support (PostgreSQL, MySQL, Snowflake, BigQuery, DuckDB), document QA, semantic caching, and self-hosted MCP server.92
Related MCP Connectors
The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
GibsonAI MCP server: manage your databases with natural language
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/hani-ben-dhaou/Enterprise-Big-Data-Copilot'
If you have feedback or need assistance with the MCP directory API, please join our Discord server