R Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited R Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
An MCP (Model Context Protocol) server that lets AI assistants execute R code, create visualizations, analyze data, and manage packages — all through a local Rscript CLI.
| Tool | Description |
|---|---|
evaluate_r_code | Execute inline R code and return console output |
run_r_file | Run an .R script file |
run_r_test_file | Run testthat tests and report pass/fail |
| Tool | Description |
|---|---|
create_r_plot | Execute base R plotting code and save as PNG |
create_ggplot | Create ggplot2 plots with auto-theme and save as PNG |
create_correlation_heatmap | Generate a correlation heatmap from a data file |
create_multi_plot | Arrange multiple ggplots into a multi-panel figure |
render_rmarkdown | Render .Rmd files to HTML or PDF |
| Tool | Description |
|---|---|
fit_linear_model | Fit lm/glm and return coefficients, R-squared, p-values |
correlation_matrix | Compute correlation matrix with p-values |
hypothesis_test | Run t-test, Wilcoxon, chi-squared, Shapiro-Wilk, etc. |
descriptive_stats | Per-column mean, sd, quartiles, skewness, kurtosis |
pca_analysis | Principal Component Analysis with loadings and variance |
| Tool | Description |
|---|---|
read_data | Read CSV, TSV, Excel, JSON, Parquet, or RDS files |
write_data | Execute R code and save results to CSV/TSV/RDS/JSON |
reshape_data | Pivot data between wide and long formats (tidyr) |
merge_datasets | Join two data files (inner, left, right, full) |
generate_sample_data | Load built-in R datasets (mtcars, iris, etc.) as CSV |
| Tool | Description |
|---|---|
forecast_timeseries | Fit ARIMA/ETS/TBATS/Holt-Winters and forecast with plot |
decompose_timeseries | Decompose into trend, seasonal, and remainder (STL/classical) |
stationarity_test | Unit root tests — ADF, KPSS, Phillips-Perron |
acf_pacf_plot | Plot ACF and PACF side by side with significance bounds |
| Tool | Description |
|---|---|
kmeans_clustering | K-means with elbow plot, silhouette score, PCA projection |
hierarchical_clustering | Hierarchical clustering with dendrogram and cophenetic correlation |
| Tool | Description |
|---|---|
anova_test | One-way and two-way ANOVA with post-hoc tests |
mixed_effects_model | Fit linear mixed-effects models (lme4) |
bootstrap_ci | Bootstrap confidence intervals for any statistic |
normality_tests | Shapiro-Wilk, Anderson-Darling, Kolmogorov-Smirnov, Lilliefors |
outlier_detection | Grubbs, Dixon, Rosner, IQR, and Z-score methods |
quantile_regression | Fit quantile regression at specified quantiles |
survival_analysis | Kaplan-Meier survival curves and Cox proportional hazards |
| Tool | Description |
|---|---|
create_plotly | Create interactive plotly visualizations saved as HTML |
create_publication_plot | Publication-ready plots using ggpubr |
create_corrplot | Correlation matrix visualization (corrplot package) |
create_paired_comparison_plot | Group comparisons with statistical significance |
create_diagnostic_plots | Regression diagnostic plots (residuals, Q-Q, Cook's distance) |
| Tool | Description |
|---|---|
distribution_calculator | Compute d/p/q/r for 16 distributions (normal, binomial, t, F, chi-sq, etc.) |
distribution_plot | Histogram of random samples with theoretical density overlay |
random_sample | Sample from any population with/without replacement |
qq_plot | Q-Q plot to assess distributional fit with Shapiro-Wilk test |
simulate_clt | Central Limit Theorem simulation for any distribution |
| Tool | Description |
|---|---|
proportion_test | One-sample and two-sample proportion tests (prop.test) |
binomial_test | Exact binomial test for small samples |
chi_squared_test | Chi-squared test for goodness of fit, independence, homogeneity |
fisher_test | Fisher's exact test on 2x2 contingency tables |
contingency_table | Create contingency table with mosaic plot and chi-squared test |
| Tool | Description |
|---|---|
robust_regression | Robust regression (MASS::rlm/lqs) resistant to outliers |
polynomial_regression | Fit and compare polynomial models of different degrees |
predict_with_ci | Predictions with confidence and prediction intervals |
tukey_hsd | Tukey's HSD post-hoc pairwise comparisons after ANOVA |
kruskal_wallis_test | Kruskal-Wallis nonparametric test for group differences |
power_analysis | Compute sample size or power for t-test and proportion test |
| Tool | Description |
|---|---|
pairs_plot | Scatterplot matrix with correlations and histograms |
density_plot | Kernel density estimation plot with multiple kernels |
ecdf_plot | Empirical CDF plot with optional normal overlay |
stem_and_leaf | Text-based stem-and-leaf display with five-number summary |
variance_test | F-test, Bartlett's, and Fligner-Killeen variance equality tests |
| Tool | Description |
|---|---|
check_r_code | Static analysis via lintr |
get_data_summary | Load CSV/TSV/RDS and return summary stats |
detect_r_packages | List all installed R packages |
get_r_version | Return R version and session info |
install_r_package | Install a CRAN package |
Rscript on your PATHInstall R from CRAN or via Homebrew:
brew install rgit clone https://github.com/sergiudanstan/r-mcp.git
cd r-mcp
pip install -e .Add to your Claude Code MCP settings (~/.claude/settings.json):
{
"mcpServers": {
"r": {
"command": "python",
"args": ["-m", "r_mcp"],
"cwd": "/path/to/r-mcp"
}
}
}python -m r_mcpThe server communicates over stdio using the MCP protocol.
The server wraps the Rscript --vanilla CLI. Each tool call spawns a fresh R session, executes the code, and returns structured JSON results. Code is wrapped in tryCatch for clean error reporting.
~/r-mcp-workspace/# Via the evaluate_r_code tool
x <- rnorm(100)
cat("Mean:", mean(x), "\nSD:", sd(x), "\n")# Via the create_r_plot tool
library(ggplot2)
df <- data.frame(x = rnorm(200), y = rnorm(200))
ggplot(df, aes(x, y)) + geom_point(alpha = 0.5) + theme_minimal()# Via the distribution_calculator tool
# Compute P(X <= 1.96) for standard normal
pnorm(1.96, mean=0, sd=1)
# Via the distribution_plot tool
# Visualize chi-squared(5) distribution with 1000 samples# Via the proportion_test tool
# Test if 42 out of 100 differs from 50%
prop.test(42, 100, p = 0.5)
# Via the hypothesis_test tool
# Two-sample t-test
t.test(x, y, alternative = "two.sided")Use get_data_summary with a file path to get dimensions, column types, summary statistics, and a preview.
MIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.