rmcp
R MCP Server
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
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
Markdown
[](/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
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.
- # RMCP: Statistical Analysis through Natural Conversation
- [](https://github.com/finite-sample/rmcp/actions/workflows/ci.yml)
- [](https://pypi.org/project/rmcp/)
- [](https://pepy.tech/project/rmcp)
- [](https://finite-sample.github.io/rmcp/)
- [](https://github.com/finite-sample/rmcp/blob/main/LICENSE)
- **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.
- ## π Quick Start (30 seconds)
- ### π **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**
- ```bash
- 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 Can RMCP Do?
- ### π **Regression & Economics**
- Linear regression, logistic models, panel data, instrumental variables β *"Analyze ROI of marketing spend"*
- ### β° **Time Series & Forecasting**
- ARIMA models, decomposition, stationarity testing β *"Forecast next quarter's sales"*
- ### π§ **Machine Learning**
- Clustering, decision trees, random forests β *"Segment customers by behavior"*
- ### π **Statistical Testing**
- T-tests, ANOVA, chi-square, normality tests β *"Is my A/B test significant?"*
- ### π **Data Analysis**
- Descriptive stats, outlier detection, correlation analysis β *"Summarize this dataset"*
- ### π **Data Transformation**
- Standardization, winsorization, lag/lead variables β *"Prepare data for modeling"*
- ### π **Professional Visualizations**
- Inline plots in Claude: scatter plots, histograms, heatmaps β *"Show me a correlation matrix"*
- ### π **Smart File Operations**
- CSV, Excel, JSON import with validation β *"Load and analyze my sales data"*
- ### π€ **Natural Language Features**
- Formula building, error recovery, example datasets β *"Help me build a regression formula"*
- **π [See working examples β](https://github.com/finite-sample/rmcp/blob/main/examples/quick_start_guide.md)**
- ## π Real Usage with Claude
- ### Business Analysis
- **You:** *"I have sales data and marketing spend. Can you analyze the ROI?"*
- **Claude:** *"I'll run a regression analysis to measure marketing effectiveness..."*
- **Result:** *"Every $1 spent on marketing generates $4.70 in sales. The relationship is highly significant (p < 0.001) with RΒ² = 0.979"*
- ### Economic Research
- **You:** *"Test if GDP growth and unemployment follow Okun's Law using my country data"*
- **Claude:** *"I'll analyze the correlation between GDP growth and unemployment..."*
- **Result:** *"Strong support for Okun's Law: correlation r = -0.944. Higher GDP growth significantly reduces unemployment."*
- ### Customer Analytics
- **You:** *"Predict customer churn using tenure and monthly charges"*
- **Claude:** *"I'll build a logistic regression model for churn prediction..."*
- **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."*
- ## π¦ Installation
- For datasets carrying collection context, the optional
- [study analysis route](https://finite-sample.github.io/rmcp/studies.html) adds content-verified file references and validated
- studyframe adapters. Existing table-based tools retain their current behavior.
- The study route requires the collection-context R studyframe package and its selected
- backends on the execution host.
- ### Prerequisites
- - **Python 3.11+**
- - **R 4.4.0+** with **comprehensive package ecosystem**: RMCP uses a systematic 429-package whitelist from CRAN task views organized into 19+ categories:
- ```r
- # Core packages (install these first)
- install.packages(c(
- "jsonlite", "dplyr", "ggplot2", "broom", "plm", "forecast",
- "randomForest", "rpart", "caret", "AER", "vars", "mgcv"
- ))
- # Full ecosystem automatically available: Machine Learning (61 packages),
- # Econometrics (55 packages), Time Series (57 packages),
- # Bayesian Analysis (40 packages), and more
- ```
- **Package Selection**: Evidence-based, using CRAN task views and download statistics
- ### Install RMCP
- ```bash
- # Standard installation
- pip install rmcp
- # The Streamable HTTP transport ships in the base install.
- # This extra adds pandas/openpyxl for Excel data handling.
- pip install rmcp[http]
- # Development installation
- git clone https://github.com/finite-sample/rmcp.git
- cd rmcp
- pip install -e ".[dev]"
- ```
- ### Claude Desktop Integration
- Add to your Claude Desktop MCP configuration:
- ```json
- {
- "mcpServers": {
- "rmcp": {
- "command": "rmcp",
- "args": ["start"]
- }
- }
- }
- ```
- ### HTTP Server Integration (Claude Web)
- RMCP serves the MCP **Streamable HTTP** transport at `/mcp` (spec 2025-11-25),
- compatible with Claude custom connectors and OpenAI's Responses API / ChatGPT
- remote MCP support. Remote deployments require a bearer token.
- **Production Server**:
- ```
- Server URL: https://rmcp-server-394229601724.us-central1.run.app/mcp
- ```
- **Test the connection**:
- ```bash
- # Health check
- curl https://rmcp-server-394229601724.us-central1.run.app/health
- # Initialize MCP session (Streamable HTTP)
- curl -X POST https://rmcp-server-394229601724.us-central1.run.app/mcp \
- -H "Content-Type: application/json" \
- -H "Accept: application/json, text/event-stream" \
- -H "Authorization: Bearer $RMCP_API_KEY" \
- -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0"}}}'
- ```
- **Local HTTP server**:
- ```bash
- # Localhost (no auth required)
- rmcp serve-http
- # Remote bind requires a bearer token (or --allow-unauthenticated)
- RMCP_API_KEY=your-secret rmcp serve-http --host 0.0.0.0 --port 8080
- ```
- ### Command Line Usage
- ```bash
- # Start MCP server (for Claude Desktop)
- rmcp start
- # Start HTTP server (for web apps)
- rmcp serve-http --host 0.0.0.0 --port 8080
- # Start HTTPS server (production ready)
- rmcp serve-http --ssl-keyfile server.key --ssl-certfile server.crt --port 8443
- # Quick HTTPS setup for development
- ./scripts/setup/setup_https_dev.sh && source certs/https-env.sh && rmcp serve-http
- # Use configuration file
- rmcp --config ~/.rmcp/config.json start
- # Enable debug mode
- rmcp --debug start
- # Check installation
- rmcp --version
- ```
- ### Shell Completion
- ```bash
- # zsh β add to ~/.zshrc
- eval "$(_RMCP_COMPLETE=zsh_source rmcp)"
- # bash β add to ~/.bashrc (requires bash 4.4+)
- eval "$(_RMCP_COMPLETE=bash_source rmcp)"
- # fish β write to the completions directory
- _RMCP_COMPLETE=fish_source rmcp > ~/.config/fish/completions/rmcp.fish
- ```
- macOS ships bash 3.2, which is too old β click prints a warning and completion
- does nothing. Use zsh (the macOS default) or install a newer bash.
- ### βοΈ Configuration
- RMCP supports flexible configuration through environment variables, configuration files, and command-line options:
- ```bash
- # Environment variables
- export RMCP_HTTP_PORT=9000
- export RMCP_R_TIMEOUT=180
- export RMCP_LOG_LEVEL=DEBUG
- rmcp start
- # Configuration file (~/.rmcp/config.json)
- {
- "http": {"port": 9000},
- "r": {"timeout": 180},
- "logging": {"level": "DEBUG"}
- }
- # Docker with environment variables
- docker run -e RMCP_HTTP_HOST=0.0.0.0 -e RMCP_HTTP_PORT=8000 rmcp:latest
- ```
- **π [Complete Configuration Guide β](https://github.com/finite-sample/rmcp/blob/main/docs/configuration.md)**
- ## π₯ Key Features
- - **π― Natural Conversation**: Ask questions in plain English, get statistical analysis
- - **π Comprehensive Package Ecosystem**: 429 R packages from systematic CRAN task views
- - **π Professional Output**: Formatted results with markdown tables and inline visualizations
- - **π Production Ready**: Official MCP SDK with stdio and Streamable HTTP transports, plus bearer-token auth for remote deployments
- - **βοΈ Flexible Configuration**: Environment variables, config files, and CLI options
- - **β‘ Tested at the protocol boundary**: deterministic semantic, malformed-data, security, approval, and recovery contracts run through the official MCP client
- - **π Multiple Transports**: stdio (Claude Desktop) and HTTP (web applications)
- - **π‘οΈ 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.
- ## π Documentation
- | Resource | Description |
- |----------|-------------|
- | **[Quick Start Guide](https://github.com/finite-sample/rmcp/blob/main/examples/quick_start_guide.md)** | Copy-paste ready examples with real data |
- | **[Economic Research Examples](https://github.com/finite-sample/rmcp/blob/main/examples/economic_research_example.md)** | Panel data, time series, advanced econometrics |
- | **[Time Series Examples](https://github.com/finite-sample/rmcp/blob/main/examples/advanced_time_series_example.md)** | ARIMA, forecasting, decomposition |
- | **[Image Display Examples](https://github.com/finite-sample/rmcp/blob/main/examples/image_display_example.md)** | Inline visualizations in Claude |
- | **[API Documentation](docs/)** | Auto-generated API reference |
- ## π§ͺ Validation
- RMCP's [evaluation guide](docs/evaluation.md) defines package, contract, protocol,
- and model-level release gates. The deterministic E2E suite launches a real RMCP
- stdio process, connects with the official MCP client, and checks exact statistical
- identities alongside malformed data, code-like inputs, filesystem escape attempts,
- approval state, and recovery behavior.
- ```bash
- uv run pytest tests/evals/test_mcp_server_evals.py
- ```
- ## π€ Contributing
- We welcome contributions!
- ```bash
- git clone https://github.com/finite-sample/rmcp.git
- cd rmcp
- pip install -e ".[dev]"
- # Run tests
- uv run pytest tests/
- # Lint and format
- uv run ruff check --fix .
- uv run ruff format .
- ```
- ## π License
- MIT License - see [LICENSE](LICENSE) file for details.
- ## π οΈ Quick Troubleshooting
- **R not found?**
- ```bash
- # macOS: brew install r
- # Ubuntu: sudo apt install r-base
- R --version
- ```
- **Missing R packages?**
- ```bash
- rmcp check-r-packages # Check what's missing
- ```
- **MCP connection issues?**
- ```bash
- rmcp list-capabilities # verify tools register without starting a session
- rmcp --debug start # run the server with verbose logging on stderr
- ```
- **π Need more help?** Check the [examples](https://github.com/finite-sample/rmcp/tree/main/examples) directory for working code.
- ## π Support
- - π **Issues**: [GitHub Issues](https://github.com/finite-sample/rmcp/issues)
- - π **Examples**: [Working examples](https://github.com/finite-sample/rmcp/blob/main/examples/quick_start_guide.md)
- ---
- **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 inFree to use. If itβs helped, pass it on.