JUHE API Marketplace
finite-sample avatar
MCP Server

R Econometrics MCP Server

Provides econometric modeling capabilities through R, enabling AI assistants to perform sophisticated analyses including linear regression, panel data models, instrumental variables regression, and diagnostic tests.

188
GitHub Stars
11/17/2025
Last Updated
MCP Server Configuration
1{
2 "name": "rmcp",
3 "command": "rmcp",
4 "args": [
5 "start"
6 ]
7}
JSON7 lines
  1. Home
  2. MCP Servers
  3. rmcp

README Documentation

RMCP: Statistical Analysis through Natural Conversation

Python application Downloads Documentation

Turn conversations into comprehensive statistical analysis - A Model Context Protocol (MCP) server with 52 statistical analysis 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)

HTTP Server: https://rmcp-server-394229601724.us-central1.run.app/mcp
Interactive Docs: https://rmcp-server-394229601724.us-central1.run.app/docs
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 โ†’ | ๐Ÿ”ง 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 โ†’

๐Ÿ“Š 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.10+
  • 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 (48 packages), 
# Bayesian Analysis (32 packages), and more

Package Selection: Evidence-based using CRAN task views, download statistics, and 4-tier security assessment

Install RMCP

# Standard installation
pip install rmcp

# With HTTP transport support
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)

Production Server (ready to use):

Server URL: https://rmcp-server-394229601724.us-central1.run.app/mcp
Interactive Docs: https://rmcp-server-394229601724.us-central1.run.app/docs

Test the connection:

# Health check
curl https://rmcp-server-394229601724.us-central1.run.app/health

# Initialize MCP session
curl -X POST https://rmcp-server-394229601724.us-central1.run.app/mcp \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2025-06-18" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0"}}}'

Local HTTP server:

# Start local HTTP server
rmcp serve-http --host 0.0.0.0 --port 8080

# Access at: http://localhost:8080/docs

Command 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 --version

โš™๏ธ 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 with 4-tier security system
  • ๐Ÿ“Š Professional Output: Formatted results with markdown tables and inline visualizations
  • ๐Ÿ”’ Production Ready: Full MCP protocol compliance with HTTP transport and SSE
  • โš™๏ธ 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)
  • ๐Ÿ›ก๏ธ Secure: Evidence-based package selection with security-conscious permission tiers

๐Ÿ“š Documentation

ResourceDescription
Quick Start GuideCopy-paste ready examples with real data
Economic Research ExamplesPanel data, time series, advanced econometrics
Time Series ExamplesARIMA, forecasting, decomposition
Image Display ExamplesInline visualizations in Claude
API DocumentationAuto-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
python tests/unit/test_new_tools.py
python tests/e2e/test_claude_desktop_scenarios.py

# Format code
black rmcp/

See CONTRIBUTING.md for detailed guidelines.

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ› ๏ธ Quick Troubleshooting

R not found?

# macOS: brew install r
# Ubuntu: sudo apt install r-base
R --version

Missing R packages?

rmcp check-r-packages  # Check what's missing

MCP connection issues?

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | rmcp start

๐Ÿ“– 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! ๐Ÿš€

Quick Install

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright ยฉ 2025 - All rights reserved