r-stats-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| R_MCP_RSCRIPT | No | Path to the R executable | Rscript |
| R_MCP_TIMEOUT | No | Default per-call timeout in seconds | 180 |
| R_MCP_WORKDIR | No | Where relative paths in data_load resolve | Startup directory (home if /) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| r_runA | Run arbitrary R code in the persistent session and return the console output plus any plots. This is the escape hatch for anything the structured tools do not cover: custom models, package-specific functions, data wrangling, or follow-up on a saved model (e.g. |
| r_install_packagesA | Install R packages from CRAN into the user's R library. Use when a tool reports that a package is missing. Installation can take several minutes for packages that compile. |
| r_session_infoA | Report the R version, platform, working directory and which key statistics packages are available. |
| data_loadA | Load a data file into the session under a name. Supports CSV, TSV, Excel (.xlsx/.xls), SPSS (.sav), Stata (.dta), SAS (.sas7bdat), RDS, RData, JSON and Parquet; the format is detected from the extension. Returns the dimensions and a per-column summary of types, missing values and example values. The dataset is then available to every other tool as |
| data_builtinA | Load a dataset that ships with R or with an installed package (mtcars, iris, ToothGrowth, sleepstudy from lme4, bfi from psych, lung from survival, HolzingerSwineford1939 from lavaan, ...). Useful for demonstrating a method or checking that an analysis works before running it on real data. |
| data_listA | List the datasets and other objects (fitted models, vectors) currently in the R session, with their dimensions. |
| session_clearA | Remove datasets and models from the session, freeing memory and preventing one analysis from leaking into the next. Use it when switching to an unrelated topic. Pass |
| data_inspectA | Inspect a dataset: dimensions, per-column type, missing counts, distinct counts, example values, and the first rows. Run this before choosing an analysis - it tells you which columns are numeric versus factors, which is what determines whether a test will work. |
| data_transformA | Clean and reshape a dataset. Operations run in a fixed order: filter, mutate, to_numeric, recode, to_factor, factor_levels, select, drop, rename, arrange, drop_na, distinct, slice_head, reshape. Writes back to the same name unless Converting grouping variables to factors is the most common prerequisite for the test tools: |
| data_exportB | Write a dataset from the session to disk as CSV, TSV, Excel or RDS. |
| describeA | Descriptive statistics: n, missing, mean, SD, SE, confidence interval for the mean, median, min/max, quartiles, IQR, skewness and kurtosis - optionally split by one or more grouping variables. Categorical columns get a level count and modal category instead. |
| frequency_tableA | Frequency tables for categorical variables, or a cross-tabulation with counts and row percentages when |
| check_assumptionsA | Check the assumptions behind parametric tests. On raw data: normality (Shapiro-Wilk, Kolmogorov-Smirnov, skew/kurtosis), homogeneity of variance across a group (Levene, Bartlett), outliers (z-scores and Tukey fences) and highly correlated variable pairs, plus Q-Q plots. On a fitted model (pass |
| test_ttestA | Compare means with a t-test, reporting group descriptives, Levene's test, both the Student and Welch results, the mean difference with its confidence interval, and Cohen's d / Hedges' g with a confidence interval. Three designs:
Set |
| test_anovaA | ANOVA in all its usual forms, with effect sizes (eta squared, partial eta squared, omega squared), Levene's test and post-hoc comparisons via estimated marginal means.
Set |
| test_categoricalA | Tests for categorical data. With |
| test_proportionA | Test proportions. One sample: a binary column (or raw |
| correlationA | Correlations between numeric variables: a full matrix plus per-pair tests with n, r, p, confidence intervals and a magnitude label. Supports Pearson, Spearman and Kendall, multiple-comparison adjustment, and partial correlations - pass |
| regressionA | Fit a regression model and report coefficients with confidence intervals, model fit and diagnostics. Supported
Specify the model either as |
| model_diagnosticsB | Full diagnostic report for a fitted model: residual normality, Breusch-Pagan test for heteroscedasticity, Durbin-Watson test for independence, VIF for multicollinearity, the most influential cases by Cook's distance and leverage, and the four standard diagnostic plots. |
| model_compareA | Compare two or more fitted models on AIC, BIC, log-likelihood and delta AIC, plus a likelihood-ratio or F test when the models are nested. Fit the models first with |
| model_predictA | Predictions from a fitted model. Pass |
| reliabilityA | Internal-consistency reliability for a set of scale items: Cronbach's alpha with its confidence interval, McDonald's omega, the average inter-item correlation, and per-item statistics including the corrected item-total correlation and alpha-if-dropped. Flags items that weaken the scale. Use |
| factor_analysisA | Exploratory factor analysis or principal component analysis. Reports KMO sampling adequacy, Bartlett's test of sphericity, the number of factors suggested by parallel analysis and by the Kaiser criterion, the rotated loading matrix with communalities, variance accounted for, a scree plot, and a list of items that cross-load or fail to load. Leave |
| semA | Confirmatory factor analysis or structural equation modelling with lavaan. Give the model in lavaan syntax:
|
| mediationA | Mediation analysis: does X affect Y through M? Builds and fits the path model, and reports the a, b, direct (c') and indirect paths with bootstrap confidence intervals - the standard Preacher-Hayes evidence for mediation. Supports several mediators at once (each gets its own indirect effect plus a total) and covariates. |
| moderationA | Moderation analysis: does the effect of X on Y depend on W? Fits the interaction model with mean-centred predictors, reports the R-squared change contributed by the interaction, and gives simple slopes at -1 SD / mean / +1 SD of a continuous moderator (or within each level of a categorical one), plus an interaction plot. |
| survival_analysisA | Survival / time-to-event analysis. |
| time_seriesA | Time series analysis and forecasting. Reports stationarity (ADF and KPSS), STL decomposition with trend and seasonal strength, an automatically selected ARIMA or ETS model, in-sample accuracy, a Ljung-Box test on the residuals, and a forecast with prediction intervals - plus forecast, decomposition and ACF/PACF plots. Set |
| plotA | Draw a publication-style ggplot2 chart and return it as an image. Types: histogram, density, box, violin, scatter, line, bar, qq, heatmap.
|
| survey_meanA | Means for complex survey data, with design-correct standard errors. Use this instead of For achievement scores use plausible values, never a single score: Give the design one of two ways: |
| survey_regressionA | Weighted regression for complex survey data, with replicate-weight standard errors and plausible-value pooling (Rubin's rules, Barnard-Rubin degrees of freedom). Use this instead of For achievement scores use plausible values, never a single score: Give the design one of two ways: |
| survey_correlationA | Correlations for complex survey data, with replicate-weight standard errors and plausible-value pooling. Correlates each column in Give the design one of two ways: |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ian3738/r-stats-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server