MCP-Data-Analysis-Server
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-Data-Analysis-Server What's the probability of exactly 2 events when the average is 4.5?"
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.
FastMCP Data Analysis Server
A Model Context Protocol (MCP) server that provides comprehensive data analysis utilities including statistical functions, probability distributions, and data processing tools.
Features
Probability Distributions
Poisson Probability: Calculate point, cumulative, and survival probabilities
Normal Distribution: PDF, CDF, and survival function calculations
Binomial Probability: Complete binomial distribution analysis
Statistical Analysis
Descriptive Statistics: Mean, median, mode, variance, skewness, kurtosis, quartiles
Correlation Analysis: Pearson and Spearman correlation with significance testing
Hypothesis Testing: One-sample t-tests with detailed results
Linear Regression: Simple linear regression with R², MSE, and equation
Data Processing
CSV Analysis: Process CSV text data and generate comprehensive summaries
Data Summarization: Automatic detection of numeric/categorical columns
Related MCP server: ChatBI MCP Server
Installation
Initialize the project with uv:
uv init fastmcp-data-analysis-server
cd fastmcp-data-analysis-serverInstall dependencies:
uv add fastmcp numpy scipy pandasOr install from the pyproject.toml:
uv syncInstall development dependencies (optional):
uv add --dev pytest pytest-asyncio black isort mypyUsage
Running the Server
# Using uv
uv run python main.py
# Or if installed
python main.pyAvailable Tools
1. Poisson Probability
# Point probability: P(X = k)
poisson_probability(lam=3.5, k=2, prob_type="point")
# Cumulative probability: P(X ≤ k)
poisson_probability(lam=3.5, k=5, prob_type="cumulative")
# Survival probability: P(X > k)
poisson_probability(lam=3.5, k=4, prob_type="survival")2. Descriptive Statistics
descriptive_statistics([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])3. Normal Distribution
# Standard normal
normal_probability(x=1.96, mean=0, std_dev=1, prob_type="cumulative")
# Custom normal distribution
normal_probability(x=85, mean=100, std_dev=15, prob_type="point")4. Correlation Analysis
correlation_analysis(
x_data=[1, 2, 3, 4, 5],
y_data=[2, 4, 6, 8, 10]
)5. Hypothesis Testing
hypothesis_test_ttest(
sample_data=[12, 15, 18, 16, 17],
population_mean=14,
alpha=0.05
)6. Linear Regression
linear_regression_analysis(
x_data=[1, 2, 3, 4, 5],
y_data=[2, 4, 5, 4, 5]
)7. Binomial Probability
# Probability of exactly 3 successes in 10 trials
binomial_probability(n=10, k=3, p=0.4, prob_type="point")8. CSV Data Analysis
csv_text = """name,age,score
Alice,25,85
Bob,30,92
Charlie,22,78"""
data_summary_from_csv_text(csv_text)Example Responses
Poisson Probability Response
{
"probability": 0.2138,
"description": "P(X = 2)",
"lambda": 3.5,
"k": 2,
"prob_type": "point",
"mean": 3.5,
"variance": 3.5,
"std_dev": 1.8708
}Descriptive Statistics Response
{
"count": 10,
"mean": 5.5,
"median": 5.5,
"std_dev": 3.0277,
"variance": 9.1667,
"min": 1.0,
"max": 10.0,
"skewness": 0.0,
"kurtosis": -1.2
}Development
Code Formatting
uv run black main.py
uv run isort main.pyType Checking
uv run mypy main.pyTesting
uv run pytestMCP Client Integration
This server can be used with any MCP client. The tools are automatically exposed and can be called with the appropriate parameters.
Example MCP Client Usage
# Assuming you have an MCP client connected
client.call_tool("poisson_probability", {
"lam": 2.5,
"k": 3,
"prob_type": "cumulative"
})Example MCP Server Config
{
"mcpServers": {
"analysis-mcp": {
"command": "fastmcp-data-analysis-server/.venv/bin/python",
"args": [
"fastmcp-data-analysis-server/main.py"
],
}
}
}Error Handling
All functions include comprehensive error handling for:
Invalid parameter values
Empty datasets
Mismatched data lengths
Invalid probability types
Mathematical domain errors
License
MIT License
Available Tools
8 toolsbinomial_probabilityA
Calculate binomial probability.
Args: n: Number of trials k: Number of successes p: Probability of success on each trial prob_type: Type of probability ("point", "cumulative", "survival")
Returns: Dictionary with probability value and distribution info
Inputs: k (required), n (required), p (required), prob_type.
correlation_analysisC
Perform correlation analysis between two datasets.
Args: x_data: First dataset y_data: Second dataset
Returns: Dictionary with correlation coefficients and analysis
Inputs: x_data (required), y_data (required).
data_summary_from_csv_textA
Generate summary statistics from CSV text data.
Args: csv_text: CSV data as text delimiter: CSV delimiter
Returns: Dictionary with data summary and statistics
Inputs: csv_text (required), delimiter.
descriptive_statisticsB
Calculate comprehensive descriptive statistics for a dataset.
Args: data: List of numerical values
Returns: Dictionary with various statistical measures
Inputs: data (required).
hypothesis_test_ttestB
Perform one-sample t-test.
Args: sample_data: Sample data for testing population_mean: Hypothesized population mean alpha: Significance level
Returns: Dictionary with test results
Inputs: sample_data (required), population_mean (required), alpha.
linear_regression_analysisB
Perform simple linear regression analysis.
Args: x_data: Independent variable data y_data: Dependent variable data
Returns: Dictionary with regression results
Inputs: x_data (required), y_data (required).
normal_probabilityB
Calculate normal distribution probabilities.
Args: x: Value to calculate probability for mean: Mean of the normal distribution std_dev: Standard deviation of the normal distribution prob_type: Type of probability ("point", "cumulative", "survival")
Returns: Dictionary with probability value and distribution info
Inputs: x (required), mean, std_dev, prob_type.
poisson_probabilityA
Calculate Poisson probability with different types.
Args: lam: Lambda parameter (rate parameter, average events per interval) k: Number of events prob_type: Type of probability ("point", "cumulative", "survival")
Returns: Dictionary with probability value and distribution info
Inputs: k (required), lam (required), prob_type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct statistical operation. The three probability distributions are clearly differentiated by parameter sets, and descriptive_statistics vs data_summary_from_csv_text differ by input format (list vs CSV text). No two tools have overlapping purposes.
All tool names use snake_case and are descriptive, but they follow inconsistent patterns (e.g., distribution_probability vs analysis vs statistics). The name 'hypothesis_test_ttest' is redundant. This is a minor deviation from a consistent convention.
8 tools is well-scoped for a statistical analysis server, covering probability distributions, descriptive stats, correlation, regression, and hypothesis testing without being bloated.
The server covers core statistical analyses but has notable gaps. It only includes one hypothesis test (one-sample t-test), lacks two-sample tests, ANOVA, chi-square, and multiple regression. Correlation analysis doesn't provide significance testing. For a server named 'Data-Analysis', this is incomplete but covers the basics.
Maintenance
Related MCP Connectors
A statistical analyst in your AI chat: bring data and a question, get a citable, re-runnable report.
Transform your data analysis with our Data Compute & Stats Bot. Effortlessly calculate descriptive
AI data analyst: ask about your Excel, CSV, GA4 or database data and get charts and dashboards back
Valid and reliable data engineering and statistical analysis without hallucinations.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides powerful data analysis capabilities for AI systems with functions for data import/export, SQL querying, statistical analysis, and data processing.11-
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered business intelligence and data analysis using pandas and LLM code generation. Supports automated data processing, statistical analysis, and visualization creation through natural language interactions.15-
- 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 gradedqualityDmaintenanceTriggers predefined functions based on specific usecases including data analysis, text processing, mathematical calculations, file operations, and web request simulations through natural language prompts.-