MCP Tabular Data Analysis Server
Enables querying and analyzing SQLite databases, including executing SQL queries, listing tables and schemas, and performing data analysis operations on database contents.
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., "@MCP Tabular Data Analysis Server show me the top 5 sales categories from sample_sales.csv"
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 Tabular Data Analysis Server
A Model Context Protocol (MCP) server that provides tools for analyzing numeric and tabular data. Works with CSV files and SQLite databases.
Demo
auto_insights
data_quality_report
analyze_time_series
Related MCP server: Vibe Preprocessing and Analysis MCP Server
Features
Core Tools
Tool | Description |
| List available CSV and SQLite files in the data directory |
| Generate statistics for a dataset (shape, types, distributions, missing values) |
| Find outliers using Z-score or IQR methods |
| Calculate correlation matrices between numeric columns |
| Filter data using various operators (eq, gt, lt, contains, etc.) |
| Group data and compute aggregations (sum, mean, count, etc.) |
| Execute SQL queries on SQLite databases |
| List all tables and schemas in a SQLite database |
Analytics Tools
Tool | Description |
| Create Excel-style pivot tables with flexible aggregations |
| Data quality assessment with scores and recommendations |
| Time series analysis with trends, seasonality, and moving averages |
| Create visualizations (bar, line, scatter, histogram, pie, box plots) |
| Join/merge two datasets together (inner, left, right, outer joins) |
| Hypothesis testing (t-test, ANOVA, chi-squared, correlation tests) |
| Discover patterns and insights |
| Export filtered/transformed data to new CSV files |
Installation
Prerequisites
Python 3.10+
uv (recommended) or pip
Install with uv
cd mcp-tabular
uv syncInstall with pip
cd mcp-tabular
pip install -e .Usage
Running the Server Directly
# With uv
uv run mcp-tabular
# With pip installation
mcp-tabularConfigure with Claude Desktop
Locate your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add this configuration (replace
/Users/kirondeb/mcp-tabularwith your actual path):
{
"mcpServers": {
"tabular-data": {
"command": "/Users/kirondeb/mcp-tabular/.venv/bin/python",
"args": [
"-m",
"mcp_tabular.server"
]
}
}
}Restart Claude Desktop (quit and reopen)
Test by asking Claude: "Describe the dataset in data/sample_sales.csv"
See CONNECT_TO_CLAUDE_DESKTOP.md for detailed instructions and troubleshooting.
See TEST_PROMPTS.md for example prompts.
Sample Data
The project includes sample data for testing:
data/sample_sales.csv- Sales transaction datadata/sample.db- SQLite database with customers, orders, and products tables
To create the SQLite sample database:
python scripts/create_sample_db.pyPath Resolution
All file paths are resolved relative to the project root directory:
Relative paths like
data/sample_sales.csvwork from any working directoryAbsolute paths also work as expected
Paths resolve relative to where
mcp_tabularis installed
Tool Examples
List Data Files
List available data files:
list_data_files()Lists all CSV and SQLite files in the data directory with metadata.
Describe Dataset
Generate statistics for a dataset:
describe_dataset(file_path="data/sample_sales.csv")Includes shape, column types, numeric statistics (mean, std, median, skew, kurtosis), categorical value counts, and a sample preview.
Detect Anomalies
Find outliers in numeric columns:
detect_anomalies(
file_path="data/sample_sales.csv",
column="total_sales",
method="zscore",
threshold=3.0
)Supports zscore and iqr methods.
Compute Correlation
Calculate correlations between numeric columns:
compute_correlation(
file_path="data/sample_sales.csv",
method="pearson"
)Includes full correlation matrix and top correlations ranked by strength.
Filter Rows
Filter data based on conditions:
filter_rows(
file_path="data/sample_sales.csv",
column="category",
operator="eq",
value="Electronics"
)Operators: eq, ne, gt, gte, lt, lte, contains, startswith, endswith
Group & Aggregate
Group data and compute aggregations:
group_aggregate(
file_path="data/sample_sales.csv",
group_by=["category", "region"],
aggregations={"total_sales": ["sum", "mean"], "quantity": ["count"]}
)Query SQLite
Execute SQL queries on databases:
query_sqlite(
db_path="data/sample.db",
query="SELECT * FROM customers WHERE lifetime_value > 1000"
)List Tables
List tables and schemas in a SQLite database:
list_tables(db_path="data/sample.db")Advanced Analytics Examples
Create Pivot Table
Create Excel-style pivot tables:
create_pivot_table(
file_path="data/sample_sales.csv",
index=["region"],
columns=["category"],
values="total_sales",
aggfunc="sum"
)Data Quality Report
Generate a data quality assessment:
data_quality_report(file_path="data/sample_sales.csv")Includes completeness score, duplicate detection, outlier analysis, and an overall quality grade (A-F).
Time Series Analysis
Analyze trends and seasonality:
analyze_time_series(
file_path="data/sample_sales.csv",
date_column="order_date",
value_column="total_sales",
freq="M",
include_forecast=True
)Generate Charts
Create visualizations (returned as base64 images):
generate_chart(
file_path="data/sample_sales.csv",
chart_type="bar",
x_column="category",
y_column="total_sales",
title="Sales by Category"
)Supported chart types: bar, line, scatter, histogram, pie, box
Merge Datasets
Join or merge two datasets:
merge_datasets(
file_path_left="data/orders.csv",
file_path_right="data/customers.csv",
on=["customer_id"],
how="left"
)Statistical Testing
Run hypothesis tests:
statistical_test(
file_path="data/sample_sales.csv",
test_type="ttest_ind",
column1="total_sales",
group_column="region",
alpha=0.05
)Supported tests: ttest_ind, ttest_paired, chi_squared, anova, mann_whitney, pearson, spearman
Auto Insights
Discover patterns and insights:
auto_insights(file_path="data/sample_sales.csv")Includes insights about correlations, outliers, skewed distributions, missing data, and more.
Export Data
Export filtered data to a new CSV:
export_data(
file_path="data/sample_sales.csv",
output_name="electronics_sales",
filter_column="category",
filter_operator="eq",
filter_value="Electronics",
sort_by="total_sales",
sort_ascending=False
)Development
Run Tests
uv run pytestProject Structure
mcp-tabular/
├── src/
│ └── mcp_tabular/
│ ├── __init__.py
│ └── server.py # Main MCP server implementation
├── data/
│ ├── sample_sales.csv # Sample CSV data
│ └── sample.db # Sample SQLite database
├── scripts/
│ └── create_sample_db.py
├── pyproject.toml
├── claude_desktop_config.json
└── README.mdLicense
MIT
Available Tools
16 toolsanalyze_time_seriesA
Perform time series analysis including trend detection, seasonality, and statistics.
Args:
file_path: Path to CSV or SQLite file
date_column: Name of the date/datetime column
value_column: Name of the numeric column to analyze
freq: Frequency for resampling - 'D' (daily), 'W' (weekly), 'M' (monthly), 'Q' (quarterly), 'Y' (yearly)
include_forecast: If True, include simple moving average forecast
Returns:
Dictionary containing:
- trend: Overall trend direction and statistics
- statistics: Time series statistics
- moving_averages: 7, 30, 90 period moving averages
- seasonality: Day of week / month patterns
- forecast: Simple forecast if requested
Inputs: file_path (required), date_column (required), value_column (required), freq, +1 more. Returns: object
auto_insightsA
Automatically generate interesting insights about a dataset.
Perfect for quick data exploration and understanding.
Args:
file_path: Path to CSV or SQLite file
max_insights: Maximum number of insights to generate (default 10)
Returns:
Dictionary containing automatically discovered insights
Inputs: file_path (required), max_insights. Returns: object
compute_correlationA
Compute correlation matrix between numeric columns.
Args:
file_path: Path to CSV or SQLite file
columns: List of columns to include (default: all numeric columns)
method: Correlation method - 'pearson' (default), 'spearman', or 'kendall'
Returns:
Dictionary containing:
- method: Correlation method used
- correlation_matrix: Full correlation matrix
- top_correlations: Top 10 strongest correlations (excluding self-correlations)
Inputs: file_path (required), columns, method. Returns: object
create_pivot_tableA
Create a pivot table from tabular data - the most common business analysis operation.
Args:
file_path: Path to CSV or SQLite file
index: Column(s) to use as row labels (grouping)
columns: Column(s) to use as column headers (optional)
values: Column to aggregate (default: first numeric column)
aggfunc: Aggregation function - 'sum', 'mean', 'count', 'min', 'max', 'median', 'std'
fill_value: Value to replace missing entries (default: None = show as null)
Returns:
Dictionary containing the pivot table data and metadata
Example:
create_pivot_table(
file_path="data/sales.csv",
index=["region"],
columns=["category"],
values="revenue",
aggfunc="sum"
)
Inputs: file_path (required), index (required), columns, values, +2 more. Returns: object
data_quality_reportA
Generate a comprehensive data quality assessment report.
Essential for understanding data health before analysis.
Args:
file_path: Path to CSV or SQLite file
Returns:
Dictionary containing:
- completeness: Missing value analysis per column
- uniqueness: Duplicate detection
- validity: Data type consistency and outlier counts
- overall_score: Data quality score (0-100)
Inputs: file_path (required). Returns: object
describe_datasetA
Generate comprehensive statistics for a tabular dataset.
Args:
file_path: Path to CSV or SQLite file
include_all: If True, include statistics for all columns (not just numeric)
Returns:
Dictionary containing:
- shape: (rows, columns)
- columns: List of column names with their types
- numeric_stats: Descriptive statistics for numeric columns
- missing_values: Count of missing values per column
- sample: First 5 rows as preview
Inputs: file_path (required), include_all. Returns: object
detect_anomaliesA
Detect anomalies/outliers in a numeric column.
Args:
file_path: Path to CSV or SQLite file
column: Name of the numeric column to analyze
method: Detection method - 'zscore' (default), 'iqr', or 'isolation_forest'
threshold: Threshold for anomaly detection (default 3.0 for zscore, 1.5 for IQR)
Returns:
Dictionary containing:
- method: Detection method used
- anomaly_count: Number of anomalies found
- anomaly_indices: Row indices of anomalies
- anomalies: The anomalous rows
- statistics: Column statistics
Inputs: file_path (required), column (required), method, threshold. Returns: object
export_dataB
Export filtered/transformed data to a new CSV file.
Args:
file_path: Path to source CSV or SQLite file
output_name: Name for output file (without extension, saved to data/ folder)
filter_column: Optional column to filter on
filter_operator: Filter operator - 'eq', 'ne', 'gt', 'gte', 'lt', 'lte', 'contains'
filter_value: Value to filter by
columns: List of columns to include (default: all)
sort_by: Column to sort by
sort_ascending: Sort direction (default: ascending)
limit: Maximum rows to export
Returns:
Dictionary containing export details and file path
Inputs: file_path (required), output_name (required), filter_column, filter_operator, +5 more. Returns: object
filter_rowsB
Filter rows based on a condition.
Args:
file_path: Path to CSV or SQLite file
column: Column name to filter on
operator: Comparison operator - 'eq', 'ne', 'gt', 'gte', 'lt', 'lte', 'contains', 'startswith', 'endswith'
value: Value to compare against
limit: Maximum number of rows to return (default 100)
Returns:
Dictionary containing:
- filter_applied: Description of the filter
- original_count: Number of rows before filtering
- filtered_count: Number of rows after filtering
- rows: Filtered rows (up to limit)
Inputs: file_path (required), column (required), operator (required), value (required), +1 more. Returns: object
generate_chartB
Generate a chart/visualization from tabular data.
Returns chart as base64-encoded PNG for display.
Args:
file_path: Path to CSV or SQLite file
chart_type: Type of chart - 'bar', 'line', 'scatter', 'histogram', 'pie', 'box'
x_column: Column for X-axis (not needed for histogram/pie)
y_column: Column for Y-axis values
group_by: Optional column for grouping/coloring
title: Chart title (auto-generated if not provided)
output_format: 'base64' (default) or 'file' (saves to data/charts/)
Returns:
Dictionary containing chart data as base64 or file path
Inputs: file_path (required), chart_type (required), x_column, y_column, +3 more. Returns: object
group_aggregateA
Group data and compute aggregations.
Args:
file_path: Path to CSV or SQLite file
group_by: Columns to group by
aggregations: Dictionary mapping column names to list of aggregation functions
(e.g., {"sales": ["sum", "mean"], "quantity": ["count", "max"]})
Supported: sum, mean, median, min, max, count, std, var
Returns:
Dictionary containing grouped and aggregated data
Inputs: file_path (required), group_by (required), aggregations (required). Returns: object
list_data_filesB
List available data files in the project data directory.
Args:
data_dir: Relative path to data directory (default: "data")
Returns:
Dictionary containing list of available CSV and SQLite files
Inputs: data_dir. Returns: object
list_tablesA
List all tables in a SQLite database.
Args:
db_path: Path to SQLite database file
Returns:
Dictionary containing table names and their schemas
Inputs: db_path (required). Returns: object
merge_datasetsA
Merge/join two datasets together - essential for combining data sources.
Args:
file_path_left: Path to left/primary dataset
file_path_right: Path to right/secondary dataset
on: Column(s) to join on (if same name in both datasets)
left_on: Column name in left dataset to join on
right_on: Column name in right dataset to join on
how: Join type - 'inner', 'left', 'right', 'outer'
preview_limit: Number of rows to return in preview
Returns:
Dictionary containing merged data preview and statistics
Inputs: file_path_left (required), file_path_right (required), on, left_on, +3 more. Returns: object
query_sqliteA
Execute a SQL query on a SQLite database.
Args:
db_path: Path to SQLite database file
query: SQL query to execute (SELECT queries only for safety)
limit: Maximum number of rows to return (default 100)
Returns:
Dictionary containing:
- query: The executed query
- row_count: Number of rows returned
- columns: List of column names
- rows: Query results
Inputs: db_path (required), query (required), limit. Returns: object
statistical_testA
Perform statistical hypothesis tests on data.
Args:
file_path: Path to CSV or SQLite file
test_type: Type of test:
- 'ttest_ind': Independent samples t-test (compare 2 groups)
- 'ttest_paired': Paired samples t-test
- 'chi_squared': Chi-squared test for categorical independence
- 'anova': One-way ANOVA (compare 3+ groups)
- 'mann_whitney': Non-parametric alternative to t-test
- 'pearson': Pearson correlation test
- 'spearman': Spearman correlation test
column1: First column for analysis
column2: Second column (required for correlation, optional for t-test)
group_column: Column defining groups (for t-test, ANOVA)
alpha: Significance level (default 0.05)
Returns:
Dictionary containing test statistic, p-value, and interpretation
Inputs: file_path (required), test_type (required), column1 (required), column2, +2 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Most tools have distinct purposes, but there is some overlap between compute_correlation and statistical_test (which includes correlation tests) and between filter_rows and export_data (which includes filtering). The descriptions help clarify differences, but an agent might occasionally misselect between these pairs.
All tool names follow a consistent verb_noun or verb_adjective_noun pattern in snake_case, such as analyze_time_series, create_pivot_table, and detect_anomalies. There are no deviations in naming conventions, making the set highly predictable and readable.
With 16 tools, the count is slightly high but reasonable for a comprehensive tabular data analysis server. It covers a wide range of operations without feeling excessively bloated, though it borders on the upper limit of typical scope.
The tool set provides complete coverage for tabular data analysis, including data loading (list_data_files, list_tables), exploration (describe_dataset, auto_insights), transformation (filter_rows, merge_datasets), analysis (statistical_test, analyze_time_series), visualization (generate_chart), and export (export_data). No obvious gaps exist for the domain.
Maintenance
Related MCP Connectors
AI data analyst: ask about your Excel, CSV, GA4 or database data and get charts and dashboards back
Ask questions about a CSV in plain English and get answers, charts and cleaned data back.
Paste-your-data analytics: CSV profiling, A/B tests, correlation, growth. 4 of 7 free.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables autonomous data exploration on .csv-based datasets, providing intelligent insights with minimal effort.2544MIT
- FlicenseNot gradedqualityDmaintenanceEnables users to preprocess, analyze, and visualize CSV data through comprehensive tools for data manipulation, statistical analysis, and graph generation.3-
- FlicenseNot gradedqualityDmaintenanceEnables analysis of datasets from CSV/Excel files, Google Sheets, and Google Drive with comprehensive data profiling tools including schema inference, missing value reports, correlation analysis, and outlier detection. Supports exporting analytical reports in multiple formats to local storage or Google Drive.-
- FlicenseNot gradedqualityDmaintenanceEnables conversational analysis of CSV and Parquet files through natural language, providing statistics, summaries, data type information, and comprehensive multi-step data analysis.-