Skip to main content
Glama
SomanGaurav
by SomanGaurav

πŸ“Š 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 want

Choosing a provider (edit .env)

Provider

Setup

Notes

Ollama (default, local)

ollama pull qwen2.5:3b and run the Ollama daemon

Free & private; smaller models plan tools less reliably

Groq (free tier)

GROQ_API_KEY=... from https://console.groq.com/keys

Fast, strong tool-calling β€” best for reliable planning

Gemini (free tier)

GEMINI_API_KEY=... from https://aistudio.google.com/app/apikey

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.py

Then 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.server

Claude Desktop config:

{ "mcpServers": {
    "data-analysis": { "command": "python", "args": ["-m", "mcp_server.server"] }
} }

MCP tool catalog

Group

Tools

Load

load_csv, load_excel, list_datasets

Profile

profile_dataset

SQL

run_sql (DuckDB)

EDA

value_counts, correlations, groupby_aggregate

Clean

drop_duplicates, handle_missing, cast_types, handle_outliers, rename_columns

Stats

hypothesis_test, correlation_test, trend_analysis, distribution_fit

Viz

make_chart

Report

export_report

Testing

PYTHONPATH="$PWD" pytest -q

15 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 suites
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

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

  • F
    license
    B
    quality
    D
    maintenance
    An 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.
    Last updated
    16
  • A
    license
    -
    quality
    D
    maintenance
    AI-native data analysis agent as an MCP Server. Connect your Excel files, CSVs, and MySQL databases. Understand business semantics. Query with natural language.
    Last updated
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    An MCP server that enables the analysis of CSV and Parquet files by providing tools for statistical summaries, data previews, and structure exploration. It allows users to query local datasets and create sample data using natural language.
    Last updated

View all related MCP servers

Related MCP Connectors

  • GibsonAI MCP server: manage your databases with natural language

  • MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.

  • MCP server for generating rough-draft project plans from natural-language prompts.

View all MCP Connectors

Latest Blog Posts

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/SomanGaurav/MCP-Data-Analysis-Agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server