Skip to content

MCP-for-Stata

Let LLM help you achieve your regression with Stata.

🆕 MCP-for-Stata Now Supports OpenClaw

MCP-for-Stata now supports OpenClaw! MCP-for-Stata provides standalone CLI tools, paste the following command to your openclaw, it would install the skill automatically.

Install `stata-skill` from ClawHub by @SepineTam. 

See OpenClaw Integration Guide for complete documentation.

Quickly Start

Requirements: uv or python 3.11+
If you don't have uv but python, you can install it with pip install uv.

First, you should check whether your device is supported by stata-mcp.

uvx stata-mcp doctor

If each check is passed, you can start using stata-mcp.
If remind not found STATA_CLI, you can see StataFinder to solve it.

The common configuration file (json)

{
  "mcpServers":{
    "stata-mcp": {
      "command": "uvx",
      "args": ["stata-mcp"]
    }
  }
}

Use MCP-for-Stata in Claude Code

We recommend using MCP-for-Stata with Claude Code for its excellent agentic capabilities.

Before using it, please make sure you have Claude Code installed. If you don't know how to install it, visit GitHub.

Open your terminal, cd to your working directory, and run:

claude mcp add stata-mcp --env STATA_MCP__CWD=$(pwd) --scope project -- uvx --directory $(pwd) stata-mcp

This will create a .mcp.json file in your working directory with the MCP configuration.

Use Cases

  • Paper Replication: Replicate empirical studies from economics papers
  • Quick Hypothesis Testing: Validate economic hypotheses through regression analysis
  • Stata Learning Assistant: Learn econometrics with step-by-step Stata explanations
  • Code Organization: Review and optimize existing Stata do-files
  • Result Interpretation: Understand complex statistical outputs and regression results

For detailed usage guide, visit agents/claude_code.md.


If you want to explore more clients or agents, visit their respective documentation.

Documentation

Core Documentation

  • Overview: Architecture, design philosophy, and integration patterns
  • Usage: Common usage patterns and examples
  • Configuration: Complete configuration guide with all options
  • Clients: Supported MCP clients and setup instructions
  • Claude Plugin: Official Claude Code plugin integration guide

Advanced Features

Core Components

Agents

For Users

For Developers

Configuration