
R Econometrics
STDIOAdvanced econometric modeling and data analysis server using R statistical capabilities.
Advanced econometric modeling and data analysis server using R statistical capabilities.
Version 0.3.2 - A comprehensive Model Context Protocol (MCP) server with 33 statistical analysis tools across 8 categories. RMCP enables AI assistants and applications to perform sophisticated statistical modeling, econometric analysis, machine learning, time series analysis, and data science tasks seamlessly through natural conversation.
🎉 Now with 33 statistical tools across 8 categories!
pip install rmcp
# Start the MCP server rmcp start
That's it! RMCP is now ready to handle statistical analysis requests via the Model Context Protocol.
👉 See Working Examples → - Copy-paste ready commands with real datasets!
linear_model
): OLS with robust standard errors, R², p-valueslogistic_regression
): Binary classification with odds ratios and accuracycorrelation_analysis
): Pearson, Spearman, and Kendall correlationsarima_model
): Autoregressive integrated moving average with forecastingdecompose_timeseries
): Trend, seasonal, remainder componentsstationarity_test
): ADF, KPSS, Phillips-Perron testslag_lead
): Create time-shifted variables for analysiswinsorize
): Handle outliers by capping extreme valuesdifference
): Create stationary series for time series analysisstandardize
): Z-score, min-max, robust scalingt_test
): One-sample, two-sample, paired t-testsanova
): Analysis of variance with Types I/II/IIIchi_square_test
): Independence and goodness-of-fitnormality_test
): Shapiro-Wilk, Jarque-Bera, Anderson-Darlingsummary_stats
): Comprehensive descriptives with groupingoutlier_detection
): IQR, Z-score, Modified Z-score methodsfrequency_table
): Counts and percentages with sortingpanel_regression
): Fixed/random effects for longitudinal datainstrumental_variables
): 2SLS with endogeneity testingvar_model
): Multivariate time series modelingkmeans_clustering
): Unsupervised clustering with validationdecision_tree
): Classification and regression treesrandom_forest
): Ensemble methods with variable importancescatter_plot
): Correlation plots with trend lineshistogram
): Distribution analysis with density overlayboxplot
): Quartile analysis with outlier detectiontime_series_plot
): Temporal data visualizationcorrelation_heatmap
): Matrix visualizationregression_plot
): Model validation plotsread_csv
): Flexible data loading with parsing optionswrite_csv
): Data export with formatting controldata_info
): Comprehensive data structure analysisfilter_data
): Complex conditional data selectionRMCP works through natural conversation with AI assistants. Here's how users actually interact with it:
You ask Claude:
"I have sales data and marketing spend. Can you analyze the ROI and tell me how effective our marketing is?"
Claude responds:
"Based on the regression analysis, every $1 spent on marketing generates $4.70 in additional sales. The relationship is highly significant (p < 0.001) and explains 97.9% of sales variation."
You ask Claude:
"I have GDP growth and unemployment data for several countries. Can you test if this supports Okun's Law?"
Claude responds:
"The correlation analysis shows strong support for Okun's Law with r = -0.944. Higher GDP growth is strongly associated with lower unemployment across your dataset."
You ask Claude:
"Help me build a customer churn prediction model using tenure and monthly charges."
Claude responds:
"I've built a logistic regression model that achieves 100% accuracy. Longer tenure significantly reduces churn risk (11.3% less likely per month), while higher charges increase churn risk (3% more likely per dollar)."
RMCP has been tested with real-world scenarios achieving 100% success rate:
pip install rmcp
git clone https://github.com/gojiplus/rmcp.git cd rmcp pip install -e ".[dev]"
Add to your Claude Desktop MCP configuration:
{ "mcpServers": { "rmcp": { "command": "rmcp", "args": ["start"], "env": {} } } }
# Start MCP server (stdio transport) rmcp start # Check version rmcp --version # Advanced server configuration rmcp serve --log-level DEBUG --read-only # List available tools and capabilities rmcp list-capabilities
# RMCP is primarily designed as a CLI MCP server # For programmatic R analysis, use the MCP protocol: import json import subprocess # Send analysis request to RMCP server request = { "tool": "linear_model", "args": { "formula": "y ~ x", "data": {"x": [1, 2, 3], "y": [2, 4, 6]} } } # Start server and send request via stdin proc = subprocess.Popen(['rmcp', 'start'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) result, _ = proc.communicate(json.dumps(request)) print(result)
{ "tool": "linear_model", "args": { "formula": "outcome ~ treatment + age + baseline", "data": { "outcome": [4.2, 6.8, 3.8, 7.1], "treatment": [0, 1, 0, 1], "age": [25, 30, 22, 35], "baseline": [3.8, 4.2, 3.5, 4.8] } } }
{ "tool": "correlation_analysis", "args": { "data": { "x": [1, 2, 3, 4, 5], "y": [2, 4, 6, 8, 10] }, "variables": ["x", "y"], "method": "pearson" } }
{ "tool": "logistic_regression", "args": { "formula": "churn ~ tenure_months + monthly_charges", "data": { "churn": [0, 1, 0, 1], "tenure_months": [24, 6, 36, 3], "monthly_charges": [70, 85, 65, 90] }, "family": "binomial", "link": "logit" } }
RMCP includes comprehensive testing with realistic scenarios:
# Run all user scenarios (should show 100% pass rate) python tests/realistic_scenarios.py # Run development test script bash src/rmcp/scripts/test.sh
Current Test Coverage:
RMCP is built with production best practices:
src/rmcp/
├── core/ # MCP server core
├── tools/ # Statistical analysis tools
├── transport/ # Communication layers
├── registries/ # Tool and resource management
└── security/ # Safe execution environment
We welcome contributions! Please see our contributing guidelines.
git clone https://github.com/gojiplus/rmcp.git cd rmcp pip install -e ".[dev]" pre-commit install
python tests/realistic_scenarios.py # User scenarios pytest tests/ # Unit tests (if any)
MIT License - see LICENSE file for details.
RMCP builds on the excellent work of:
Ready to analyze data like never before? Install RMCP and start running sophisticated statistical analyses through AI assistants today! 🚀