Skip to main content

Comprehensive Model Context Protocol server with 44 statistical analysis tools, HTTP transport, and Server-Sent Events

Project description

RMCP: Statistical Analysis through Natural Conversation

Python application PyPI version Downloads Documentation License

Turn conversations into comprehensive statistical analysis - A Model Context Protocol (MCP) server with 44 statistical analysis tools across 11 categories. 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)

pip install rmcp
rmcp start

That's it! RMCP is now ready to handle statistical analysis requests via Claude Desktop 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.0+ with packages: Install all at once:
install.packages(c(
  "jsonlite", "plm", "lmtest", "sandwich", "AER", "dplyr",
  "forecast", "vars", "urca", "tseries", "nortest", "car",
  "rpart", "randomForest", "ggplot2", "gridExtra", "tidyr", 
  "rlang", "knitr", "broom"
))

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"]
    }
  }
}

Command Line Usage

# Start MCP server (for Claude Desktop)
rmcp start

# Start HTTP server (for web apps)
rmcp serve-http --port 8080

# Check installation
rmcp --version

๐Ÿ”ฅ Key Features

  • ๐ŸŽฏ Natural Conversation: Ask questions in plain English, get statistical analysis
  • ๐Ÿ“Š Professional Output: Formatted results with markdown tables and inline visualizations
  • ๐Ÿ”’ Production Ready: Full MCP protocol compliance with HTTP transport and SSE
  • โšก Fast & Reliable: 100% test success rate across all scenarios
  • ๐ŸŒ Multiple Transports: stdio (Claude Desktop) and HTTP (web applications)
  • ๐Ÿ›ก๏ธ Secure: Controlled R execution with configurable permissions

๐Ÿ“š Documentation

Resource Description
Quick Start Guide Copy-paste ready examples with real data
Economic Research Examples Panel data, time series, advanced econometrics
Time Series Examples ARIMA, forecasting, decomposition
Image Display Examples Inline visualizations in Claude
API Documentation 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
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


Ready to turn conversations into statistical insights? Install RMCP and start analyzing data through AI assistants today! ๐Ÿš€

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rmcp-0.3.11.tar.gz (112.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rmcp-0.3.11-py3-none-any.whl (153.2 kB view details)

Uploaded Python 3

File details

Details for the file rmcp-0.3.11.tar.gz.

File metadata

  • Download URL: rmcp-0.3.11.tar.gz
  • Upload date:
  • Size: 112.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rmcp-0.3.11.tar.gz
Algorithm Hash digest
SHA256 1e5ad9f331c4731c2123dd26ac97b82b41ac5132d95c9f480d32f58fd5b7dd71
MD5 8eefec4effdad3ea633df42587783009
BLAKE2b-256 7dab569e5650ce301733fb2897dd0a501610369afc627d69be37b6c4f8f23dd9

See more details on using hashes here.

Provenance

The following attestation bundles were made for rmcp-0.3.11.tar.gz:

Publisher: python-publish.yml on finite-sample/rmcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rmcp-0.3.11-py3-none-any.whl.

File metadata

  • Download URL: rmcp-0.3.11-py3-none-any.whl
  • Upload date:
  • Size: 153.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rmcp-0.3.11-py3-none-any.whl
Algorithm Hash digest
SHA256 bc7ae4755bd8388133fa98339fcf90b34e3a2d2fbb5f5cd80d11d4ddb3b68821
MD5 4ad4531c7cc5fe64e8abe7865998ac3c
BLAKE2b-256 11b29c79ab4ccf80e0016027f5eda48791290a7738765629ceb68353377fe53f

See more details on using hashes here.

Provenance

The following attestation bundles were made for rmcp-0.3.11-py3-none-any.whl:

Publisher: python-publish.yml on finite-sample/rmcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page