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.
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., "@DataPilot AI MCP ServerWhat's the average order value per customer?"
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.
š« 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-csv-database
š ļø 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.
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
- Flicense-qualityDmaintenanceEnables interaction with SQLite databases through natural language, supporting SQL queries, CSV imports, and schema exploration.Last updated15
- 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.Last updated14MIT
- Flicense-qualityDmaintenanceEnables AI models to interact with local CSV and Parquet data through MCP tools, providing summarization and analysis capabilities.Last updated1
- AlicenseBqualityCmaintenanceEnables SQL querying over CSV and Excel files using DuckDB, providing tools to load files, inspect schemas, and run read-only queries via MCP.Last updated5MIT
Related MCP Connectors
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
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/drash3103/MCP_DataPilotAI'
If you have feedback or need assistance with the MCP directory API, please join our Discord server