Skip to content
Back to search

rmcp

R MCP Server

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/finite-sample/rmcp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/finite-sample/rmcp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/finite-sample--rmcp/badge.svg)](/listings/finite-sample--rmcp)

HTML

<a href="/listings/finite-sample--rmcp"><img src="/api/listings/finite-sample--rmcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

🌐 **Try the Live Server** (No Installation Required)

**MCP Endpoint**: `https://rmcp-server-394229601724.us-central1.run.app/mcp` (bearer token required) **Health Check**: `https://rmcp-server-394229601724.us-central1.run.app/health`

πŸ–₯️ **Or Install Locally**

pip install rmcp
rmcp start

That's it! RMCP is now ready to handle statistical analysis requests via Claude Desktop, Claude web, or any MCP client.

**🎯 [Working examples β†’](https://github.com/finite-sample/rmcp/blob/main/examples/quick_start_guide.md)** | **πŸ”§ [Troubleshooting β†’](https://github.com/finite-sample/rmcp#-quick-troubleshooting)**

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md Β· README Β· 321 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # RMCP: Statistical Analysis through Natural Conversation
  2. [![Python application](https://github.com/finite-sample/rmcp/actions/workflows/ci.yml/badge.svg)](https://github.com/finite-sample/rmcp/actions/workflows/ci.yml)
  3. [![PyPI version](https://img.shields.io/pypi/v/rmcp.svg)](https://pypi.org/project/rmcp/)
  4. [![Downloads](https://pepy.tech/badge/rmcp)](https://pepy.tech/project/rmcp)
  5. [![Documentation](https://github.com/finite-sample/rmcp/actions/workflows/docs.yml/badge.svg)](https://finite-sample.github.io/rmcp/)
  6. [![License](https://img.shields.io/github/license/finite-sample/rmcp)](https://github.com/finite-sample/rmcp/blob/main/LICENSE)
  7. **Turn conversations into comprehensive statistical analysis** - A Model Context Protocol (MCP) server with statistical tools, an optional study analysis route, and **429 R packages** from systematic CRAN task views. RMCP enables AI assistants to perform sophisticated statistical modeling, econometric analysis, machine learning, time series analysis, and data science tasks through natural conversation.
  8. ## πŸš€ Quick Start (30 seconds)
  9. ### 🌐 **Try the Live Server** (No Installation Required)
  10. **MCP Endpoint**: `https://rmcp-server-394229601724.us-central1.run.app/mcp` (bearer token required)
  11. **Health Check**: `https://rmcp-server-394229601724.us-central1.run.app/health`
  12. ### πŸ–₯️ **Or Install Locally**
  13. ```bash
  14. pip install rmcp
  15. rmcp start
  16. ```
  17. That's it! RMCP is now ready to handle statistical analysis requests via Claude Desktop, Claude web, or any MCP client.
  18. **🎯 [Working examples β†’](https://github.com/finite-sample/rmcp/blob/main/examples/quick_start_guide.md)** | **πŸ”§ [Troubleshooting β†’](https://github.com/finite-sample/rmcp#-quick-troubleshooting)**
  19. ## ✨ What Can RMCP Do?
  20. ### πŸ“Š **Regression & Economics**
  21. Linear regression, logistic models, panel data, instrumental variables β†’ *"Analyze ROI of marketing spend"*
  22. ### ⏰ **Time Series & Forecasting**
  23. ARIMA models, decomposition, stationarity testing β†’ *"Forecast next quarter's sales"*
  24. ### 🧠 **Machine Learning**
  25. Clustering, decision trees, random forests β†’ *"Segment customers by behavior"*
  26. ### πŸ“ˆ **Statistical Testing**
  27. T-tests, ANOVA, chi-square, normality tests β†’ *"Is my A/B test significant?"*
  28. ### πŸ“‹ **Data Analysis**
  29. Descriptive stats, outlier detection, correlation analysis β†’ *"Summarize this dataset"*
  30. ### πŸ”„ **Data Transformation**
  31. Standardization, winsorization, lag/lead variables β†’ *"Prepare data for modeling"*
  32. ### πŸ“Š **Professional Visualizations**
  33. Inline plots in Claude: scatter plots, histograms, heatmaps β†’ *"Show me a correlation matrix"*
  34. ### πŸ“ **Smart File Operations**
  35. CSV, Excel, JSON import with validation β†’ *"Load and analyze my sales data"*
  36. ### πŸ€– **Natural Language Features**
  37. Formula building, error recovery, example datasets β†’ *"Help me build a regression formula"*
  38. **πŸ‘‰ [See working examples β†’](https://github.com/finite-sample/rmcp/blob/main/examples/quick_start_guide.md)**
  39. ## πŸ“Š Real Usage with Claude
  40. ### Business Analysis
  41. **You:** *"I have sales data and marketing spend. Can you analyze the ROI?"*
  42. **Claude:** *"I'll run a regression analysis to measure marketing effectiveness..."*
  43. **Result:** *"Every $1 spent on marketing generates $4.70 in sales. The relationship is highly significant (p < 0.001) with RΒ² = 0.979"*
  44. ### Economic Research
  45. **You:** *"Test if GDP growth and unemployment follow Okun's Law using my country data"*
  46. **Claude:** *"I'll analyze the correlation between GDP growth and unemployment..."*
  47. **Result:** *"Strong support for Okun's Law: correlation r = -0.944. Higher GDP growth significantly reduces unemployment."*
  48. ### Customer Analytics
  49. **You:** *"Predict customer churn using tenure and monthly charges"*
  50. **Claude:** *"I'll build a logistic regression model for churn prediction..."*
  51. **Result:** *"Model achieves 100% accuracy. Each additional month of tenure reduces churn risk by 11.3%. Higher charges increase churn risk by 3% per dollar."*
  52. ## πŸ“¦ Installation
  53. For datasets carrying collection context, the optional
  54. [study analysis route](https://finite-sample.github.io/rmcp/studies.html) adds content-verified file references and validated
  55. studyframe adapters. Existing table-based tools retain their current behavior.
  56. The study route requires the collection-context R studyframe package and its selected
  57. backends on the execution host.
  58. ### Prerequisites
  59. - **Python 3.11+**
  60. - **R 4.4.0+** with **comprehensive package ecosystem**: RMCP uses a systematic 429-package whitelist from CRAN task views organized into 19+ categories:
  61. ```r
  62. # Core packages (install these first)
  63. install.packages(c(
  64. "jsonlite", "dplyr", "ggplot2", "broom", "plm", "forecast",
  65. "randomForest", "rpart", "caret", "AER", "vars", "mgcv"
  66. ))
  67. # Full ecosystem automatically available: Machine Learning (61 packages),
  68. # Econometrics (55 packages), Time Series (57 packages),
  69. # Bayesian Analysis (40 packages), and more
  70. ```
  71. **Package Selection**: Evidence-based, using CRAN task views and download statistics
  72. ### Install RMCP
  73. ```bash
  74. # Standard installation
  75. pip install rmcp
  76. # The Streamable HTTP transport ships in the base install.
  77. # This extra adds pandas/openpyxl for Excel data handling.
  78. pip install rmcp[http]
  79. # Development installation
  80. git clone https://github.com/finite-sample/rmcp.git
  81. cd rmcp
  82. pip install -e ".[dev]"
  83. ```
  84. ### Claude Desktop Integration
  85. Add to your Claude Desktop MCP configuration:
  86. ```json
  87. {
  88. "mcpServers": {
  89. "rmcp": {
  90. "command": "rmcp",
  91. "args": ["start"]
  92. }
  93. }
  94. }
  95. ```
  96. ### HTTP Server Integration (Claude Web)
  97. RMCP serves the MCP **Streamable HTTP** transport at `/mcp` (spec 2025-11-25),
  98. compatible with Claude custom connectors and OpenAI's Responses API / ChatGPT
  99. remote MCP support. Remote deployments require a bearer token.
  100. **Production Server**:
  101. ```
  102. Server URL: https://rmcp-server-394229601724.us-central1.run.app/mcp
  103. ```
  104. **Test the connection**:
  105. ```bash
  106. # Health check
  107. curl https://rmcp-server-394229601724.us-central1.run.app/health
  108. # Initialize MCP session (Streamable HTTP)
  109. curl -X POST https://rmcp-server-394229601724.us-central1.run.app/mcp \
  110. -H "Content-Type: application/json" \
  111. -H "Accept: application/json, text/event-stream" \
  112. -H "Authorization: Bearer $RMCP_API_KEY" \
  113. -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0"}}}'
  114. ```
  115. **Local HTTP server**:
  116. ```bash
  117. # Localhost (no auth required)
  118. rmcp serve-http
  119. # Remote bind requires a bearer token (or --allow-unauthenticated)
  120. RMCP_API_KEY=your-secret rmcp serve-http --host 0.0.0.0 --port 8080
  121. ```
  122. ### Command Line Usage
  123. ```bash
  124. # Start MCP server (for Claude Desktop)
  125. rmcp start
  126. # Start HTTP server (for web apps)
  127. rmcp serve-http --host 0.0.0.0 --port 8080
  128. # Start HTTPS server (production ready)
  129. rmcp serve-http --ssl-keyfile server.key --ssl-certfile server.crt --port 8443
  130. # Quick HTTPS setup for development
  131. ./scripts/setup/setup_https_dev.sh && source certs/https-env.sh && rmcp serve-http
  132. # Use configuration file
  133. rmcp --config ~/.rmcp/config.json start
  134. # Enable debug mode
  135. rmcp --debug start
  136. # Check installation
  137. rmcp --version
  138. ```
  139. ### Shell Completion
  140. ```bash
  141. # zsh β€” add to ~/.zshrc
  142. eval "$(_RMCP_COMPLETE=zsh_source rmcp)"
  143. # bash β€” add to ~/.bashrc (requires bash 4.4+)
  144. eval "$(_RMCP_COMPLETE=bash_source rmcp)"
  145. # fish β€” write to the completions directory
  146. _RMCP_COMPLETE=fish_source rmcp > ~/.config/fish/completions/rmcp.fish
  147. ```
  148. macOS ships bash 3.2, which is too old β€” click prints a warning and completion
  149. does nothing. Use zsh (the macOS default) or install a newer bash.
  150. ### βš™οΈ Configuration
  151. RMCP supports flexible configuration through environment variables, configuration files, and command-line options:
  152. ```bash
  153. # Environment variables
  154. export RMCP_HTTP_PORT=9000
  155. export RMCP_R_TIMEOUT=180
  156. export RMCP_LOG_LEVEL=DEBUG
  157. rmcp start
  158. # Configuration file (~/.rmcp/config.json)
  159. {
  160. "http": {"port": 9000},
  161. "r": {"timeout": 180},
  162. "logging": {"level": "DEBUG"}
  163. }
  164. # Docker with environment variables
  165. docker run -e RMCP_HTTP_HOST=0.0.0.0 -e RMCP_HTTP_PORT=8000 rmcp:latest
  166. ```
  167. **πŸ“– [Complete Configuration Guide β†’](https://github.com/finite-sample/rmcp/blob/main/docs/configuration.md)**
  168. ## πŸ”₯ Key Features
  169. - **🎯 Natural Conversation**: Ask questions in plain English, get statistical analysis
  170. - **πŸ“š Comprehensive Package Ecosystem**: 429 R packages from systematic CRAN task views
  171. - **πŸ“Š Professional Output**: Formatted results with markdown tables and inline visualizations
  172. - **πŸ”’ Production Ready**: Official MCP SDK with stdio and Streamable HTTP transports, plus bearer-token auth for remote deployments
  173. - **βš™οΈ Flexible Configuration**: Environment variables, config files, and CLI options
  174. - **⚑ Tested at the protocol boundary**: deterministic semantic, malformed-data, security, approval, and recovery contracts run through the official MCP client
  175. - **🌐 Multiple Transports**: stdio (Claude Desktop) and HTTP (web applications)
  176. - **πŸ›‘οΈ Guardrails**: Package allowlist, explicit user approval for file writes, package installs and system calls, and filesystem confinement for tool-written files. These guard against mistakes, not adversaries β€” RMCP executes R as the invoking user, so run it as a trusted local tool rather than an untrusted multi-tenant service.
  177. ## πŸ“š Documentation
  178. | Resource | Description |
  179. |----------|-------------|
  180. | **[Quick Start Guide](https://github.com/finite-sample/rmcp/blob/main/examples/quick_start_guide.md)** | Copy-paste ready examples with real data |
  181. | **[Economic Research Examples](https://github.com/finite-sample/rmcp/blob/main/examples/economic_research_example.md)** | Panel data, time series, advanced econometrics |
  182. | **[Time Series Examples](https://github.com/finite-sample/rmcp/blob/main/examples/advanced_time_series_example.md)** | ARIMA, forecasting, decomposition |
  183. | **[Image Display Examples](https://github.com/finite-sample/rmcp/blob/main/examples/image_display_example.md)** | Inline visualizations in Claude |
  184. | **[API Documentation](docs/)** | Auto-generated API reference |
  185. ## πŸ§ͺ Validation
  186. RMCP's [evaluation guide](docs/evaluation.md) defines package, contract, protocol,
  187. and model-level release gates. The deterministic E2E suite launches a real RMCP
  188. stdio process, connects with the official MCP client, and checks exact statistical
  189. identities alongside malformed data, code-like inputs, filesystem escape attempts,
  190. approval state, and recovery behavior.
  191. ```bash
  192. uv run pytest tests/evals/test_mcp_server_evals.py
  193. ```
  194. ## 🀝 Contributing
  195. We welcome contributions!
  196. ```bash
  197. git clone https://github.com/finite-sample/rmcp.git
  198. cd rmcp
  199. pip install -e ".[dev]"
  200. # Run tests
  201. uv run pytest tests/
  202. # Lint and format
  203. uv run ruff check --fix .
  204. uv run ruff format .
  205. ```
  206. ## πŸ“„ License
  207. MIT License - see [LICENSE](LICENSE) file for details.
  208. ## πŸ› οΈ Quick Troubleshooting
  209. **R not found?**
  210. ```bash
  211. # macOS: brew install r
  212. # Ubuntu: sudo apt install r-base
  213. R --version
  214. ```
  215. **Missing R packages?**
  216. ```bash
  217. rmcp check-r-packages # Check what's missing
  218. ```
  219. **MCP connection issues?**
  220. ```bash
  221. rmcp list-capabilities # verify tools register without starting a session
  222. rmcp --debug start # run the server with verbose logging on stderr
  223. ```
  224. **πŸ“– Need more help?** Check the [examples](https://github.com/finite-sample/rmcp/tree/main/examples) directory for working code.
  225. ## πŸ™‹ Support
  226. - πŸ› **Issues**: [GitHub Issues](https://github.com/finite-sample/rmcp/issues)
  227. - πŸ“– **Examples**: [Working examples](https://github.com/finite-sample/rmcp/blob/main/examples/quick_start_guide.md)
  228. ---
  229. **Ready to turn conversations into statistical insights?** Install RMCP and start analyzing data through AI assistants today! πŸš€

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.