academic-stats-advisor
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., "@academic-stats-advisor What statistical test should I use for two independent groups?"
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.
academic-stats-advisor · MCP server
An MCP (Model Context Protocol) server that lets an AI assistant — ChatGPT, Claude, Claude Code, Cursor, or any MCP client — directly call a statistician's decision logic instead of guessing. Point it at a study design and it returns the correct test, its assumptions, the SPSS menu path and R code, an APA reporting template, and an a-priori power analysis.
Built by Gan Lin. Dependency-light (only mcp), so it runs with a single command and deploys anywhere. (Repo academic-stats-mcp; server/package name academic-stats-advisor.)
⚠️ Decision-support for people who already know some statistics. It does not run your data or replace a statistician — always verify assumptions against your own dataset.
Tools
Tool | What the AI can call it for |
| "What statistical test should I use?" → test + why + assumptions + SPSS path + R code + APA template |
| Assumptions of a given test, how to check each, and what to do if violated |
| Turn a p-value / effect size into a correct, APA-style conclusion (guards the classic mistakes) |
| A-priori power analysis — required n for two means, paired means, two proportions, or a correlation |
| How to decide and report normality the right way (the #1 thing students get wrong) |
| Everything the advisor knows, with SPSS menu paths |
Covers the full classic tree: one-sample / independent / paired t-tests, Welch, Mann–Whitney, Wilcoxon, one-way / Welch / repeated-measures ANOVA, Kruskal–Wallis, Friedman, Pearson/Spearman, chi-square / Fisher / McNemar / goodness-of-fit, and Poisson/NB for counts.
Related MCP server: Stats Engine MCP Server
Run it (zero setup)
The server file carries its own dependencies (PEP 723), so uv needs nothing installed:
uv run server.py # stdio (for Claude Desktop / Claude Code / Cursor)
MCP_HTTP=1 uv run server.py # HTTP (remote endpoint at http://localhost:8000/mcp)Use it in Claude Code / Claude Desktop (local, stdio)
Add to your MCP config (Claude Desktop: claude_desktop_config.json; Claude Code: claude mcp add):
{
"mcpServers": {
"academic-stats-advisor": {
"command": "uv",
"args": ["run", "/absolute/path/to/academic-stats-mcp/server.py"]
}
}
}Claude Code one-liner:
claude mcp add academic-stats-advisor -- uv run /absolute/path/to/academic-stats-mcp/server.pyThen just ask: "My outcome is a continuous score, two independent groups, the data are skewed — what test, and how do I report it?" — the model calls recommend_test and answers with the real decision logic.
Use it in ChatGPT / Claude.ai (remote, HTTP)
Deploy the HTTP transport, then add the resulting https://…/mcp URL as a custom connector.
Render (free): this repo includes
render.yaml+Dockerfile→ New ▸ Blueprint → pick the repo. Endpoint:https://<service>.onrender.com/mcp.Docker anywhere:
docker build -t stats-mcp . && docker run -p 8000:8000 stats-mcp→http://<host>:8000/mcp.Any Python host:
python server.py --http, and setPUBLIC_HOST=<your-domain>so the Host check allows it (without it, DNS-rebinding protection is off so it still works behind any proxy).
License
MIT — see LICENSE.
Available Tools
6 toolscheck_assumptionsA
List the assumptions of a specific test, how to check each, and what to do if violated.
Pass a test_id from recommend_test / list_supported_tests (e.g. 'independent_t', 'one_way_anova', 'pearson', 'chi_square_independence').
Inputs: test_id (required).
interpret_resultB
Interpret a p-value correctly and produce a defensible, APA-style conclusion.
Guards against the classic mistakes: a non-significant result does NOT prove the null, and statistical significance is not practical importance (report effect size + CI).
Inputs: p_value (required), alpha, test_name, effect_size, +1 more.
list_supported_testsA
List every test this advisor knows, with its SPSS menu path.
Inputs: no named parameters.
normality_guideC
How to decide and report normality correctly — the #1 thing students get wrong.
Inputs: no named parameters.
plan_sample_sizeA
A priori power analysis: the required sample size for a target power.
effect_size is Cohen's d for two_means/paired_means, Cohen's h for two_proportions, and the correlation r for correlation. Uses a normal approximation — treat the result as a close lower bound and confirm exact numbers in G*Power for t-based tests.
Inputs: comparison (required), effect_size (required), alpha, power, +1 more.
recommend_testA
Recommend the correct statistical test for a study design.
Use this to answer "what statistical test should I use?". Describe the design: outcome_type (continuous/ordinal/nominal/count), design (one_sample = compare one group to a value; independent = compare separate groups; paired = same subjects over time/conditions; correlation = relationship between two variables; association = two categorical variables), how many groups, whether the outcome is ~normal, and whether group variances are equal. Returns the test, why, assumptions, SPSS path, R code, an APA reporting template, and fallbacks if assumptions fail.
Inputs: design (required), outcome_type (required), n_groups, normality, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: recommending tests, checking assumptions, interpreting results, planning sample size, listing supported tests, and normality guidance. No two tools overlap significantly; even assumptions and normality are separated clearly.
All tool names use lowercase snake_case and follow a verb_noun pattern (e.g., check_assumptions, interpret_result). The only slight outlier is 'normality_guide', but it still fits the pattern and is consistently readable.
With 6 tools, the set is well-scoped for a statistical advisor. Each tool covers a core aspect of statistical analysis workflow without redundancy or excessive granularity.
The toolset covers the essential workflow: test recommendation, assumptions, normality, sample size, interpretation, and listing tests. Minor gaps exist, such as non-parametric alternatives or post-hoc tests, but the core is solid.
Maintenance
Related MCP Connectors
Hybrid human + AI expertise for faster, trusted answers and decisions via MCP Server.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Hosted MCP server connecting AI assistants to 9,000+ apps and 40,000+ actions via Zapier.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that lets AI agents discover and call R and Python statistical functions without writing code.-
- AlicenseNot gradedqualityDmaintenanceA statistical analysis MCP server offering 30 tools for descriptive statistics, hypothesis tests, regression, and time series, all returning Markdown reports with automatic interpretations to enable AI agents to perform comprehensive data analysis.MIT
- AlicenseNot gradedqualityDmaintenanceA virtual statistician MCP server that provides real statistical methods—design of experiments, hypothesis testing, regression, SPC, MSA—via tested Python libraries, with plain-language interpretations and plotted outputs.1MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides an LLM with access to R's statistical toolkit including hypothesis tests, regression, psychometrics, survival analysis, time series, and plots through a persistent R session.331MIT