Data Analytics MCP Toolkit
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 Analytics MCP ToolkitGenerate a bar chart of monthly sales from the sales.csv file"
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.
Data Analytics MCP Toolkit
An MCP (Model Context Protocol) server that exposes data visualization and simple machine learning tools. When an external LLM calls the toolkit, it can use the high-level run_analytics tool to describe intent and data; the server selects and runs the appropriate pipeline (visualization or ML) and returns charts or metrics.
Features
Data:
load_data(CSV/JSON string or URL),clean_data(drop NA, optional normalize)Visualization:
plot_bar,plot_line,plot_scatter,plot_histogram,plot_box,plot_heatmap(return base64 PNG)ML:
train_test_split,train_linear_regression,train_logistic_regression,train_kmeans, plusevaluate_regression,evaluate_classification,evaluate_clusteringPipeline:
run_analytics(intent, data_source)— intent-based routing to the right pipeline
Related MCP server: MCP CSV Analysis with Gemini AI
Install
cd /path/to/trying_IBM_MCP
pip install -e .
# or
pip install -r requirements.txtFrom the project root, ensure src is on PYTHONPATH when running the server (or install in editable mode).
Run the MCP server
stdio (for Cursor / IDE):
# From project root, with src on path
PYTHONPATH=src python -m data_analytics_mcp.serverOr with uv:
uv run --project . python -m data_analytics_mcp.server(If using a pyproject.toml that sets packages under src, install first with pip install -e . then run python -m data_analytics_mcp.server from the repo root.)
Cursor MCP configuration
Add the server to Cursor (e.g. in Cursor Settings → MCP, or project .cursor/mcp.json):
{
"mcpServers": {
"data-analytics": {
"command": "python",
"args": ["-m", "data_analytics_mcp.server"],
"cwd": "/path/to/trying_IBM_MCP",
"env": { "PYTHONPATH": "src" }
}
}
}Use the full path for cwd. If you installed the package (pip install -e .), you can use:
{
"mcpServers": {
"data-analytics": {
"command": "python",
"args": ["-m", "data_analytics_mcp.server"],
"cwd": "/Users/jerrychen/projects/trying_IBM_MCP"
}
}
}Usage
One-shot: Call
run_analyticswith a natural-language intent (e.g. "show distribution of sales", "predict price from square_feet", "cluster into 4 groups") and the data as CSV/JSON string or URL. The server returns either a chart (base64 image) or ML metrics and a short model summary.Step-by-step: Use
load_data→ getdata_id→ then callclean_data,plot_*, ortrain_test_split→train_*→evaluate_*as needed. Use resourcesanalytics://pipelinesandanalytics://pipelines/visualization(etc.) to see pipeline descriptions.
Project layout
src/data_analytics_mcp/
server.py # MCP app, tools, resources
pipeline.py # Intent → pipeline; execute_pipeline
data.py # load_data, clean_data
viz.py # Plot functions → base64 PNG
ml.py # Train/evaluate regression, classification, clustering
store.py # In-memory session storeAvailable Tools
16 toolsclean_dataB
Clean dataset: optionally drop NA rows and z-score normalize numeric columns.
Updates the dataset in place; returns data_id and row count.
| Name | Required | Description | Default |
|---|---|---|---|
| data_id | Yes | ||
| session_id | No | default | |
| drop_na | No | ||
| normalize | No |
evaluate_classificationC
Compute accuracy for a classification model on test data.
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ||
| test_data_id | Yes | ||
| session_id | No | default |
evaluate_clusteringC
Compute silhouette score for a clustering model on test data.
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ||
| test_data_id | Yes | ||
| session_id | No | default |
evaluate_regressionC
Compute MSE and R² for a regression model on test data.
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ||
| test_data_id | Yes | ||
| session_id | No | default |
load_dataA
Ingest data from CSV or JSON (inline string or URL). Returns data_id and schema summary.
Use the returned data_id in subsequent tools (clean_data, plot_*, train_*, etc.).
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| format | No | csv | |
| session_id | No | default | |
| delimiter | No |
plot_barC
Bar chart: x_column as categories, y_column as values (or count of x if y_column omitted).
| Name | Required | Description | Default |
|---|---|---|---|
| data_id | Yes | ||
| x_column | Yes | ||
| y_column | No | ||
| title | No | ||
| session_id | No | default |
plot_boxC
Box plot: single numeric column, or all numeric columns if column is omitted.
| Name | Required | Description | Default |
|---|---|---|---|
| data_id | Yes | ||
| column | No | ||
| title | No | ||
| session_id | No | default |
plot_heatmapC
Heatmap of correlation matrix. If columns omitted, uses all numeric columns.
| Name | Required | Description | Default |
|---|---|---|---|
| data_id | Yes | ||
| columns | No | ||
| title | No | ||
| session_id | No | default |
plot_histogramC
Histogram of a numeric column (distribution).
| Name | Required | Description | Default |
|---|---|---|---|
| data_id | Yes | ||
| column | Yes | ||
| bins | No | ||
| title | No | ||
| session_id | No | default |
plot_lineC
Line chart: x_column on x-axis, one or more y_columns as lines.
| Name | Required | Description | Default |
|---|---|---|---|
| data_id | Yes | ||
| x_column | Yes | ||
| y_columns | No | ||
| title | No | ||
| session_id | No | default |
plot_scatterC
Scatter plot of x_column vs y_column.
| Name | Required | Description | Default |
|---|---|---|---|
| data_id | Yes | ||
| x_column | Yes | ||
| y_column | Yes | ||
| title | No | ||
| session_id | No | default |
run_analyticsB
High-level tool: describe what you want (e.g. "show distribution of sales",
"predict price from square_feet", "cluster into 4 groups") and provide the data
(CSV/JSON string or URL). The server picks the right pipeline and returns
either a chart (chart_base64, chart_type) or ML metrics and model summary.
| Name | Required | Description | Default |
|---|---|---|---|
| intent | Yes | ||
| data_source | Yes | ||
| format | No | csv | |
| session_id | No | default | |
| drop_na | No | ||
| normalize | No | ||
| column | No | ||
| x_column | No | ||
| y_column | No | ||
| target_column | No | ||
| test_ratio | No | ||
| n_clusters | No |
train_kmeansC
Fit K-means clustering. Returns model_id for evaluate_clustering.
| Name | Required | Description | Default |
|---|---|---|---|
| data_id | Yes | ||
| n_clusters | No | ||
| feature_columns | No | ||
| session_id | No | default |
train_linear_regressionC
Fit a linear regression model. Returns model_id for evaluate_regression.
| Name | Required | Description | Default |
|---|---|---|---|
| train_data_id | Yes | ||
| target_column | Yes | ||
| feature_columns | No | ||
| session_id | No | default |
train_logistic_regressionB
Fit a logistic regression classifier. Returns model_id for evaluate_classification.
| Name | Required | Description | Default |
|---|---|---|---|
| train_data_id | Yes | ||
| target_column | Yes | ||
| feature_columns | No | ||
| session_id | No | default |
train_test_splitB
Split dataset into train and test. Returns train_data_id and test_data_id
for use in train_* and evaluate_* tools.
| Name | Required | Description | Default |
|---|---|---|---|
| data_id | Yes | ||
| target_column | Yes | ||
| test_ratio | No | ||
| session_id | No | default | |
| random_state | No |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
16 tool updates
v0.1.0- First observed
clean_data - First observed
evaluate_classification - First observed
evaluate_clustering - First observed
evaluate_regression - First observed
load_data - First observed
plot_bar - First observed
plot_box - First observed
plot_heatmap - First observed
plot_histogram - First observed
plot_line - First observed
plot_scatter - First observed
run_analytics - First observed
train_kmeans - First observed
train_linear_regression - First observed
train_logistic_regression - First observed
train_test_split
TDQS
Scored across 16 tools
Most tools have distinct purposes, with clear separation between data loading/cleaning, plotting, model training, and evaluation functions. However, 'run_analytics' overlaps significantly with the specialized tools, as it can perform many of the same functions through a single interface, which could cause confusion about when to use it versus the specific tools.
Tool names follow a consistent verb_noun pattern throughout, with clear and predictable naming conventions. All tools use snake_case, and verbs like 'clean', 'evaluate', 'load', 'plot', 'run', 'train', and 'train_test_split' are applied consistently to their respective nouns, making the set highly readable and predictable.
With 16 tools, the count is slightly high but reasonable for a comprehensive data analytics toolkit. It covers a broad range of functions from data ingestion to visualization and machine learning, though it might be borderline heavy for some use cases. Each tool appears to earn its place without obvious redundancy, except for the overlap with 'run_analytics'.
The tool set provides complete coverage for a data analytics workflow, including data loading, cleaning, splitting, multiple types of plots, training for classification, regression, and clustering models, and corresponding evaluation metrics. The inclusion of 'run_analytics' as a high-level tool further ensures no gaps, offering a flexible alternative for common tasks.
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn open-source MCP server that connects to various data sources (SQL databases, CSV, Parquet files), allowing AI models to execute SQL queries and generate data visualizations for analytics and business intelligence.1276MIT
- AlicenseBqualityDmaintenanceAn MCP server that enables advanced CSV analysis and data visualization using Google's Gemini AI and Plotly. It allows users to perform exploratory data analysis, generate interactive charts, and conduct complex reasoning on tabular data.32MIT
- 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.-
- 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-