Integrations
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.
R MCP Server
A Model Context Protocol (MCP) server that provides advanced econometric modeling and data analysis capabilities through R. This server enables AI assistants to perform sophisticated econometric and statistical analyses seamlessly, helping you quickly gain insights from your data.
Features
- Linear Regression: Run linear models with optional robust standard errors.
- Panel Data Analysis: Estimate fixed effects, random effects, pooling, between, and first-difference models.
- Instrumental Variables: Build and estimate IV regression models.
- Diagnostic Tests: Assess heteroskedasticity, autocorrelation, and model misspecification.
- Descriptive Statistics: Generate summary statistics for datasets using R’s summary() functionality.
- Correlation Analysis: Compute Pearson or Spearman correlations between variables.
- Group-By Aggregations: Group data by specified columns and compute summary statistics using dplyr.
- Resources: Access reference documentation for various econometric techniques.
- Prompts: Use pre-defined prompt templates for common econometric analyses.
Installation
Using Docker (Recommended)
- Build the Docker image:Copy
- Run the container:
Manual Installation
Install the required Python packages:
Install the required R packages (if you run the server outside a container):
Run the server:
Usage
The server communicates via standard input/output. When you run:
it starts and waits for JSON messages on standard input. To test the server manually, create a file (for example, test_request.json) with a compact (single-line) JSON message.
Example Test
Create test_request.json with the following content (a one-line JSON):
Then run:
Output
Usage with Claude Desktop
- Launch Claude Desktop
- Open the MCP Servers panel
- Add a new server with the following configuration:
- Name: R Econometrics
- Transport: stdio
- Command: path/to/python r_econometrics_mcp.py
- (Or if using Docker): docker run -i r-econometrics-mcp
Example Queries
Here are some example queries you can use with Claude once the server is connected:
Linear Regression
Panel Data Analysis
Instrumental Variables
Diagnostic Tests
Tools Reference
linear_model
Run a linear regression model.
Parameters:
formula
(string): The regression formula (e.g., 'y ~ x1 + x2')data
(object): Dataset as a dictionary/JSON objectrobust
(boolean, optional): Whether to use robust standard errors
panel_model
Run a panel data model.
Parameters:
formula
(string): The regression formula (e.g., 'y ~ x1 + x2')data
(object): Dataset as a dictionary/JSON objectindex
(array): Panel index variables (e.g., ['individual', 'time'])effect
(string, optional): Type of effects: 'individual', 'time', or 'twoways'model
(string, optional): Model type: 'within', 'random', 'pooling', 'between', or 'fd'
diagnostics
Perform model diagnostics.
Parameters:
formula
(string): The regression formula (e.g., 'y ~ x1 + x2')data
(object): Dataset as a dictionary/JSON objecttests
(array): Tests to run (e.g., ['bp', 'reset', 'dw'])
iv_regression
Estimate instrumental variables regression.
Parameters:
formula
(string): The regression formula (e.g., 'y ~ x1 + x2 | z1 + z2')data
(object): Dataset as a dictionary/JSON object
Resources
econometrics:formulas
: Information about common econometric model formulationseconometrics:diagnostics
: Reference for diagnostic testseconometrics:panel_data
: Guide to panel data analysis in R
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
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.
Related MCP Servers
- AsecurityAlicenseAqualityAllows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured.Last updated -1360PythonMIT License
- -securityAlicense-qualityServes as a guardian of development knowledge, providing AI assistants with curated access to latest documentation and best practices.Last updated -48752TypeScriptMIT License
- -securityFlicense-qualityEnables AI models to interact with Linear for issue tracking and project management through capabilities like creating/searching issues, managing sprints, and retrieving workflow states.Last updated -TypeScript
- AsecurityFlicenseAqualityEnables AI assistants to interact with the World Bank open data API, allowing for listing and analysis of indicators across available countries.Last updated -18Python