DataPilot AI MCP Server
Provides tools to interact with a SQLite database, allowing users to list tables, describe table schemas, and run read-only SQL queries.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐ซ DataPilot AI
DataPilot AI is a production-quality, AI-powered database assistant that allows users to upload CSV files, automatically converts them into an isolated SQLite database, and enables natural language data analysis using an Ollama LLM Agent (qwen3:8b) communicating strictly through Model Context Protocol (MCP) tools.
๐๏ธ Architecture & Clean Isolation
+-----------------------------------------------------------------------+
| Streamlit UI |
| - CSV Upload & Table Data Preview |
| - Natural Language Query Interface |
| - Render SQL Queries, Results & Dynamic Plotly Charts |
+-----------------------------------+-----------------------------------+
|
v
+-----------------------------------+-----------------------------------+
| AI Agent |
| - Ollama (`qwen3:8b`) Agent Loop |
| - Translates user questions into MCP tool calls |
| - STRICTLY NO direct database access |
+-----------------------------------+-----------------------------------+
|
| (MCP JSON-RPC Protocol)
v
+-----------------------------------+-----------------------------------+
| MCP Server |
| - Built with FastMCP / MCP Python SDK |
| - Exposes isolated tools: |
| * list_tables() |
| * describe_table(table_name) |
| * run_sql(query) |
+-----------------------------------+-----------------------------------+
|
v
+-----------------------------------+-----------------------------------+
| Database & Storage Layer |
| - SQLite Database (`database/datapilot.db`) |
| - SQLAlchemy ORM & Engine abstraction |
| - Ingestion Layer (`database/csv_loader.py`) |
+-----------------------------------------------------------------------+Key Architectural Principles
Strict MCP Tool Isolation: The AI Model never opens SQLite files or executes SQL directly. It interacts with data solely through registered MCP server tools.
Security Guard:
run_sqlblocks write operations (DROP,DELETE,INSERT,UPDATE,ALTER).Type Hints & Clean Code: Type annotations (
typing), modern Python practices (pathlib), modular functions under 30 lines, proper logging, and exception handling.
Related MCP server: mcp-server
๐ ๏ธ Tech Stack
Frontend: Streamlit
Backend: Python 3.10+
Database: SQLite, SQLAlchemy
AI / LLM: Ollama (
qwen3:8b)Protocol: Official MCP Python SDK / FastMCP
Data Visualization: Plotly
Data Processing: Pandas
Configuration:
python-dotenv, Pydantic
๐ Project Structure
DataPilot-AI/
โโโ app/
โ โโโ __init__.py
โ โโโ main.py # Streamlit Web UI application
โโโ database/
โ โโโ __init__.py
โ โโโ database.py # SQLAlchemy database engine management
โ โโโ csv_loader.py # CSV parsing & SQL table ingestion
โโโ agent/
โ โโโ __init__.py
โ โโโ agent.py # Ollama AI agent & MCP tool dispatcher
โโโ mcp_server/
โ โโโ __init__.py
โ โโโ server.py # FastMCP server transport
โ โโโ tools.py # MCP database tool implementations
โโโ charts/
โ โโโ __init__.py
โ โโโ chart_generator.py # Automated Plotly chart generator
โโโ uploads/ # Storage for raw CSV uploads
โโโ database/ # SQLite database directory (`datapilot.db`)
โโโ scratch/ # Verification test scripts
โโโ .env.example # Environment variables template
โโโ requirements.txt # Pinned project dependencies
โโโ README.md # Project documentationโ๏ธ Quickstart Guide
1. Clone & Setup Virtual Environment
git clone https://github.com/taneeshk12/hcai_project.git DataPilotAI
cd DataPilotAI
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install --upgrade pip
pip install -r requirements.txt2. Configure Environment Variables
Copy .env.example to .env:
cp .env.example .env3. Setup & Start Ollama
Make sure Ollama is installed and running locally with the target model:
# Start Ollama server
ollama serve
# Pull target model in a separate terminal
ollama pull qwen3:8b4. Run the Application
Launch the Streamlit interface:
streamlit run app/main.pyOpen http://localhost:8501 in your browser.
๐ MCP Tools Specification
The MCP server exposes three database tools:
Tool Name | Parameters | Description |
| None | Returns a JSON list of all active tables in the SQLite database. |
|
| Returns schema, column types, total row count, and 3 sample records. |
|
| Executes a read-only SQL query and returns matching records. |
๐ก Usage Example
Upload CSV: Drag and drop
amazon.csv(or any CSV dataset) into the uploader.Automatic SQL Ingestion: DataPilot AI sanitizes the filename into a table name (e.g.
amazon) and creates a SQLite table with full row insertion.Ask Natural Language Questions:
"How many rows are in the database?"
"Show all columns for table amazon"
"What are the top 5 highest rated items?"
"Show average price by category"
Inspect Output:
Generated SQL Query displayed first in a code block.
AI Answer in clean natural language text.
MCP Execution Trace showing tool calls.
Automated Plotly Chart generated automatically for numerical data.
๐ License
MIT License. Created for AI Product Engineering portfolio.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Ask questions about a CSV in plain English and get answers, charts and cleaned data back.
ParseHub.dev is a hosted document-to-records service with a remote MCP server. Agents can upload a CSV, PDF, or Word file, summarize and analyze CSV data (filter, sort, group_by, and more), read text from PDF and Word files, extract attendees, agenda items, and action items from meeting notes, ask a question about an uploaded document, and store files as database records to list and read later. Each account sees only its own files and records. **Endpoint:** `https://parsehub.dev/mcp` (Streamable HTTP, stateless) **Auth:** API key in the `X-API-Key` header (keys start with `mcp_`), or `Authorization: Bearer <API key or JWT>`. Every request without credentials returns 401. **Plans:** Free (100 API requests/month, 1 document upload), or 5,000 requests/month on the $9/month or $42/year plan. Every MCP request counts toward the allowance. **Tools:** upload_csv, summarize_csv, analyze_csv, upload_document, read_document, extract_meeting_notes, ask_document, database_status, list_database_documents, get_database_document, store_document, extract_stored_meeting_notes, export_database (administrators only). Not affiliated with ParseHub (parsehub.com), the web-scraping tool. ParseHub.dev does not scrape websites. By Poietes LLC. Docs: https://parsehub.dev/guide#connect-via-mcp
Related MCP Servers
- AlicenseBqualityDmaintenanceLoads CSV files into a temporary SQLite database and provides comprehensive data analysis tools via MCP, enabling AI assistants to query, analyze, and export data using natural language.14MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI models to interact with local CSV and Parquet data through MCP tools, providing summarization and analysis capabilities.-
- AlicenseBqualityDmaintenanceEnables SQL querying over CSV and Excel files using DuckDB, providing tools to load files, inspect schemas, and run read-only queries via MCP.5MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying CSV or Excel data using natural language through MCP tools, running pandas operations on an uploaded dataset.-