MCP Data Analysis Agent
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.
๐ Autonomous Data Analysis System (MCP)
An AI data analyst that answers natural-language questions over CSV / Excel / SQL data. The language model plans and interprets โ all computation (SQL, stats, cleaning, charts) runs in deterministic MCP tools, so results are exact, reproducible, and auditable.
Core principle: the LLM never does arithmetic. It reads schemas, chooses which tool to call with which arguments, and turns the returned numbers into business insight.
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Streamlit UI (upload ยท chat ยท charts ยท report ยท switch) โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Agent host โ
โ โข Provider switch (LiteLLM): Ollama ยท Groq ยท Gemini โ
โ โข MCP client: MCP tool schemas โ OpenAI function calls โ
โ โข Loop: plan โ call tool โ observe โ answer โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP protocol (stdio)
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP analysis server โ
โ load ยท profile ยท sql ยท eda ยท clean ยท stats ยท viz ยท reportโ
โ Dataset registry ยท Pandas ยท DuckDB ยท SciPy ยท matplotlib โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโSee DESIGN.md for the full design and milestone tracker.
Related MCP server: xtai-mcp-data-analysis
Features
Upload CSV / Excel; DuckDB SQL over your files with no database server.
Automated profiling & EDA โ schema, nulls, cardinality, correlations, group aggregates.
Non-destructive cleaning โ missing values, duplicates, type casts, outliers (each returns a new versioned dataset).
Statistics โ t-test / ANOVA / chi-square, correlation tests, trend analysis, distribution/normality.
Charts โ bar, line, scatter, histogram, box, correlation heatmap (PNG).
Self-contained HTML reports with embedded charts.
Pluggable LLM โ local Ollama by default, switch to Groq or Gemini free tiers.
Setup
python3 -m venv .venv
source .venv/bin/activate # fish: source .venv/bin/activate.fish
pip install -r requirements.txt
cp .env.example .env # then fill in the provider you wantChoosing a provider (edit .env)
Provider | Setup | Notes |
Ollama (default, local) |
| Free & private; smaller models plan tools less reliably |
Groq (free tier) |
| Fast, strong tool-calling โ best for reliable planning |
Gemini (free tier) |
| Large context, strong function-calling |
You can also switch provider live from the sidebar dropdown in the UI.
Run the app
streamlit run ui/streamlit_app.pyThen upload one of the samples in data/ (e.g. sample_sales.csv) and ask
things like "Which region sells the most units, and is the trend rising?" or
"Which plan has the highest churn โ build me a report."
Use the MCP server directly (e.g. Claude Desktop)
The server speaks stdio and works with any MCP client:
python -m mcp_server.serverClaude Desktop config:
{ "mcpServers": {
"data-analysis": { "command": "python", "args": ["-m", "mcp_server.server"] }
} }MCP tool catalog
Group | Tools |
Load |
|
Profile |
|
SQL |
|
EDA |
|
Clean |
|
Stats |
|
Viz |
|
Report |
|
Testing
PYTHONPATH="$PWD" pytest -q15 tests spawn the real MCP server over stdio and exercise every tool group; the agent loop is tested with a scripted fake LLM (deterministic, no network).
Project structure
mcp_server/ FastMCP server + registry + tools/
agent/ provider switch (config, providers) + mcp_client + agent loop
ui/ streamlit_app.py
data/ sample datasets + uploads/
reports/ generated charts and HTML reports
tests/ per-milestone test suitesThis server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that provides data visualization and machine learning tools, featuring automated intent-based pipeline routing for data cleaning and model training. It enables LLMs to process CSV or JSON data to generate visual charts, perform regressions, or execute clustering analysis.16-
- FlicenseNot gradedqualityDmaintenanceAn MCP server for data analysis and visualization supporting CSV and Excel files. It enables users to generate statistical summaries and create multi-dimensional charts like heatmaps and bar plots through natural language.-
- AlicenseNot gradedqualityDmaintenanceAI-native data analysis agent as an MCP Server. Connect your Excel files, CSVs, and MySQL databases. Understand business semantics. Query with natural language.MIT
- FlicenseAqualityDmaintenanceAn MCP server for dataset exploration and analysis, enabling LLM clients to perform summary, correlation, distribution, missing value analysis, data cleaning, and statistical tests directly on CSV files.3-