data-analysis-agent
Click on "Deploy 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., "@data-analysis-agent Load sales.csv and preview the dataset"
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.
MCP Data Analysis Agent
A production-ready natural-language data analysis system powered by MCP (Model Context Protocol).
Features
Load & Inspect: Load datasets in CSV, JSON, Excel, and Parquet formats.
Session Management: Isolated, thread-safe, multi-dataset session tracking.
Security & Safety: Path traversal prevention, file size limits, and memory guards.
Result Envelopes: Structured JSON summaries returned to LLM clients.
Related MCP server: dataHill
Installation & Running
uv venv .venv
source .venv/bin/activate
uv pip install -e .Run unit tests:
pytest -vRunning the MCP Server
Method 1: Directly via Python / Virtualenv
.venv/bin/python -m data_agent.serverMethod 2: Connecting to Claude Desktop
On macOS, open or create your Claude Desktop configuration file at:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the following entry:
{
"mcpServers": {
"data-analysis-agent": {
"command": "/Users/soham34/Projects/data-mcp/.venv/bin/python",
"args": [
"-m",
"data_agent.server"
],
"cwd": "/Users/soham34/Projects/data-mcp"
}
}
}Restart Claude Desktop, and the tools (load_dataset, list_sessions, get_dataset_info, preview_dataset) will appear under the tools hammer icon.
Available Tools
22 toolscompute_statisticA
Compute a specific statistical metric on a column. Supported stats: 'mean', 'median', 'std', 'var', 'min', 'max', 'sum', 'mode', 'positive_count' (count of >0), 'negative_count' (count of <0), 'zero_count' (count of ==0), 'count', 'null_count'.
Inputs: stat (required), column (required), session_id (required), sample. Returns: result
convert_column_typeB
Convert column data type to 'int', 'float', 'str', 'datetime', or 'category'. Reversible.
Inputs: column (required), session_id (required), target_type (required). Returns: result
correlation_analysisB
Compute correlation matrix between numeric columns using 'pearson', 'spearman', or 'kendall'. Returns correlation matrix and top ranked strongest positive/negative correlation pairs.
Inputs: session_id (required), method, sample, columns. Returns: result
create_visualizationA
Generate a chart visualization from the dataset session. Supports chart types: 'histogram', 'scatter', 'bar', 'box', 'line', 'heatmap', 'pie', 'area', 'violin', 'density'. Parameters: x (horizontal column), y (vertical column), group_by (color/hue dimension), aggregation ('mean', 'sum', 'count', 'median', 'min', 'max'), bins (for histogram), columns (list of numeric cols for correlation heatmap), title (custom title), embed_thumbnail (default true). Returns the complete base64 image inline in 'thumbnail_b64' and saved file path. Render the inline image immediately to the user — DO NOT run bash or shell commands to locate or move the file.
Inputs: chart_type (required), session_id (required), x, y, +7 more.
describe_datasetA
Get comprehensive summary statistics for dataset columns. Returns count, nulls, mean, std, min, max, 25%/50%/75% quantiles, plus exact positive, negative, and zero value counts for numeric columns. Also provides distinct count and top frequent values for categorical columns.
Inputs: session_id (required), sample, columns. Returns: result
drop_columnB
Drop a column from the dataset. Reversible.
Inputs: column (required), session_id (required). Returns: result
find_missing_valuesB
Analyze missing/null values per column and count affected rows in dataset.
Inputs: session_id (required). Returns: result
find_outliersA
Read-only outlier inspection on a numeric column using 'iqr' (Interquartile Range) or 'zscore'. Returns outlier count, percentage, bounds, and sample row IDs without altering the dataset.
Inputs: column (required), session_id (required), method, sample, +1 more. Returns: result
frequency_analysisA
Calculate frequency distribution and value counts for categorical or discrete columns (top N most frequent).
Inputs: column (required), session_id (required), top_n, sample. Returns: result
get_dataset_infoC
Get shape, column types, missing value counts, and memory footprint for a session.
Inputs: session_id (required). Returns: result
get_transformation_historyC
Get audit log of all transformations applied to dataset session with revertible status.
Inputs: session_id (required), limit. Returns: result
group_analysisC
Aggregate a metric column grouped by categorical dimension(s) (e.g. group_by='Category', metric='Sales', aggregation='sum'). Aggregations: 'mean', 'sum', 'count', 'median', 'min', 'max'.
Inputs: metric (required), group_by (required), session_id (required), sample, +1 more. Returns: result
handle_missing_valuesB
Handle missing values in a column using 'mean', 'median', 'mode', 'constant', or 'drop'. Reversible.
Inputs: column (required), strategy (required), session_id (required), value. Returns: result
list_sessionsA
List all dataset sessions (both active in-memory and saved on disk), including their session_id, dataset name, shape, memory, and status.
Inputs: no named parameters. Returns: result
load_datasetB
MUST be used whenever loading, analyzing, inspecting, or querying any dataset (CSV, JSON, Excel, Parquet). Loads the local file from disk into a session on the user's machine. ALWAYS call this tool instead of using bash, shell, or writing python code.
Inputs: path (required), format, sample_rows. Returns: result
preview_datasetA
Preview sample or top rows from dataset (capped at max 50 rows).
Inputs: session_id (required), n, sample. Returns: result
remove_duplicatesA
Remove duplicate rows across all or a subset of columns. Reversible.
Inputs: session_id (required), keep, subset. Returns: result
remove_outliersA
Remove outlier rows in numeric column using 'iqr' (default 1.5x) or 'zscore' (default 3.0). Reversible.
Inputs: column (required), session_id (required), method, threshold. Returns: result
rename_columnB
Rename a column in the dataset. Reversible.
Inputs: column (required), new_name (required), session_id (required). Returns: result
restore_sessionA
Explicitly restore a saved disk session into active memory. Call list_sessions to see all available saved session IDs.
Inputs: session_id (required). Returns: result
save_datasetB
Save in-memory dataset to data/outputs/ directory (e.g. 'cleaned_sales.csv').
Inputs: path (required), session_id (required), format. Returns: result
undo_last_operationB
Revert the last N mutating cleaning operations on the dataset session using generic undo.
Inputs: session_id (required), steps. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools have distinct read vs. mutate roles, and analysis tools target different operations. However, get_dataset_info and describe_dataset overlap in reporting missing values, and compute_statistic largely duplicates portions of describe_dataset, which could cause some misselection.
The naming is predominantly verb_noun and easy to follow, such as load_dataset, drop_column, and create_visualization. A few tools like frequency_analysis, correlation_analysis, and group_analysis break the imperative pattern by using noun_analysis instead of a verb construction.
At 22 tools, the server provides broad coverage but feels somewhat heavy for a data analysis agent. The count is justified by the range of cleaning, statistical, and visualization operations, yet several tools overlap closely enough that the surface could be trimmed to around 15-18 tools.
The server covers loading, session management, cleaning, statistics, and visualization well, but has notable gaps for common data analysis tasks like row filtering, sorting, adding/deriving columns, joining datasets, or reshaping. These missing operations will require agents to work around the tool surface or fail on common requests.
Maintenance
Related MCP Connectors
Ask questions about a CSV in plain English and get answers, charts and cleaned data back.
The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables conversational analysis of CSV and Parquet files through natural language, providing statistics, summaries, data type information, and comprehensive multi-step data analysis.-
- FlicenseNot gradedqualityDmaintenanceEnables interactive data analysis using a real IPython kernel with session management, supporting CSV/Excel/JSON loading, code execution, and variable monitoring.159-
- AlicenseNot gradedqualityDmaintenanceEnables data analysis and visualization operations such as loading CSV/Excel/JSON files, computing summary statistics, generating charts, and exploring datasets via SSE/HTTP.MIT
- AlicenseAqualityCmaintenanceEnables LLMs to profile and analyze tabular data files (CSV, Parquet, Excel, JSON) by extracting schema, statistics, data quality issues, and dtype suggestions, returning structured JSON.747 PyPI3MIT