R Econometrics MCP Server
Provides containerized deployment of the R Econometrics MCP server, allowing for easier setup and isolation of the required R environment and dependencies.
Uses Python as the interface language for the MCP server that connects R's econometric capabilities to AI assistants.
Click on "Install 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., "@R Econometrics MCP Serverrun a linear regression to see if marketing spend predicts sales revenue"
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.
RMCP: Statistical Analysis through Natural Conversation
Turn conversations into comprehensive statistical analysis - A Model Context Protocol (MCP) server with 54 tools across 11 categories 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
pip install rmcp
rmcp startThat's it! RMCP is now ready to handle statistical analysis requests via Claude Desktop, Claude web, or any MCP client.
๐ฏ Working examples โ | ๐ง Troubleshooting โ
Related MCP server: aigroup-econ-mcp
โจ 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"
๐ 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
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:
# 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 morePackage Selection: Evidence-based, using CRAN task views and download statistics
Install RMCP
# 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:
{
"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/mcpTest the connection:
# 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:
# 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 8080Command Line Usage
# 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 --versionShell Completion
# 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.fishmacOS 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:
# 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 โ (auto-generated from code)
๐ฅ 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
โก Fast & Reliable: 100% test success rate across all scenarios
๐ 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 |
Copy-paste ready examples with real data | |
Panel data, time series, advanced econometrics | |
ARIMA, forecasting, decomposition | |
Inline visualizations in Claude | |
Auto-generated API reference |
๐งช Validation
RMCP has been tested with real-world scenarios achieving 100% success rate:
โ Business Analysts: Sales forecasting with 97.9% Rยฒ, $4.70 ROI per marketing dollar
โ Economists: Macroeconomic analysis confirming Okun's Law (r=-0.944)
โ Data Scientists: Customer churn prediction with 100% accuracy
โ Researchers: Treatment effect analysis with significant results (p<0.001)
๐ค Contributing
We welcome contributions!
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 file for details.
๐ ๏ธ Quick Troubleshooting
R not found?
# macOS: brew install r
# Ubuntu: sudo apt install r-base
R --versionMissing R packages?
rmcp check-r-packages # Check what's missingMCP connection issues?
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 directory for working code.
๐ Support
๐ Issues: GitHub Issues
๐ Examples: Working examples
Ready to turn conversations into statistical insights? Install RMCP and start analyzing data through AI assistants today! ๐
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCquality-maintenanceAI-powered quantitative research assistant with 45 tools for causal inference methods (DID, RDD, IV, PSM), regression analysis, power calculations, and statistical code generation in R, Stata, and Python.50
- Alicense-qualityDmaintenanceEconometrics MCP server for regression, causal inference, time series, panel data, machine learning, and broader statistical analysis workflows.10MIT
- Alicense-qualityDmaintenanceEnables AI assistants to execute R code, create visualizations, analyze data, and manage packages through a local Rscript CLI.MIT
- AlicenseBqualityCmaintenanceecon-r-mcp is a local MCP server plus companion skill for reproducible applied econometrics and statistics workflows powered by headless R execution.17MIT
Related MCP Connectors
The statistical analyst in your AI chat โ validated, citable, re-runnable analysis of your data.
Macro data for AI agents: GDP, inflation, unemployment & trade, any country. No API keys.
Macro data for AI agents: GDP, inflation, unemployment and more (World Bank, US BLS). No keys.
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/finite-sample/rmcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server