A MCP server for Stata to integrate Stata into your agent.
- ✓Open-source license (AGPL-3.0)
- ✓Actively maintained (<30d)
- ✓Healthy fork ratio
- ✓Clear description
- ✓Topics declared
- ✓Mature repo (>1y old)
claude mcp add mcp-for-stata -- uvx stata-mcp{
"mcpServers": {
"mcp-for-stata": {
"command": "uvx",
"args": ["stata-mcp"]
}
}
}Resumen de MCP Servers
<div align="center">
<a href="https://aidea-labs.com/mcp-for-stata">
<img src="https://example-data.statamcp.com/logo_with_name.jpg" alt="MCP-for-Stata: Integrate Stata into your agent" width="300"/>
</a>
</div>
# MCP-for-Stata: Integrate Stata into your agent
Enable Claude Code, Codex, OpenClaw, and other AI agents to safely invoke Stata on your local device for data analysis.
> Stata is a registered trademark of StataCorp LLC. This project is an independent community-developed tool and is not affiliated with, endorsed by, or sponsored by StataCorp LLC.
[](README.md)
[](README.zh-CN.md)
[](README.fr.md)
[](README.es.md)
[](https://github.com/SepineTam/mcp-for-stata/actions/workflows/python-package.yml)
[](https://pypi.org/project/stata-mcp/)
[](https://pepy.tech/projects/stata-mcp)
[](LICENSE)
[](https://github.com/sepinetam/mcp-for-stata/issues/new)
[](https://deepwiki.com/SepineTam/mcp-for-stata)
<!-- mcp-name: io.github.SepineTam/mcp-for-stata -->
---
## 🆕 News
- 🧪 **Claude Science Support**: MCP-for-Stata now works in Claude Science with a sandbox allowlist. See the [Claude Science guide](https://sepinetam.github.io/mcp-for-stata/agents/claude_science).
- Find more in WeChat: [Why I made it?](https://mp.weixin.qq.com/s/VYkykdDgfPMa5KN0_1BeFQ), and [8 figures find out Stata-MCP](https://mp.weixin.qq.com/s/RKPKA4OWAM5SeZmGtbMRew)
- 🦞 **OpenClaw Support**: Standalone CLI tools for OpenClaw integration (`stata-mcp tool`), see [OpenClaw guide](https://sepinetam.github.io/mcp-for-stata/agents/openclaw.md)
- ✨ **Claude Code Plugin Support**: Official plugin package with MCP server and Stata LSP integration
- Use MCP-for-Stata in Claude Code, see [Claude Code advanced usage](#advanced-claude-code), or in Codex see [Codex advanced usage](#advanced-codex)
> Finding our **newest research**? [View latest research reports](https://aidea-labs.com/mcp-for-stata/reports).
<details>
<summary>Looking for others?</summary>
> **MCP or AI about Stata**
> - A session based MCP server for Stata, [mcp-stata](https://github.com/tmonk/mcp-stata)
> - IDEs (VScode or Cursor) integrated [stata-mcp for VSCode](https://github.com/hanlulong/stata-mcp). Confused them? 💡 [Comparison](#comparison)
>
> **Datasets and Information**
> - [STOP Dataset](https://opendata.ai4cssci.com): StataMCP-Team Opendata Project 📊, we have open-sourced a comprehensive dataset collection for social science research, aiming to enable the future of AI-driven and data-powered research paradigms.
</details>
<details>
<summary>Why AGPL 3.0 License?</summary>
The AGPL 3.0 License is a type of open-source license. It does not affect your daily use, and allows you to use, modify, and distribute this software free of charge, provided that you comply with its terms, such as retaining the original copyright notices.
**Notes**: While we strive to make open source accessible to everyone, we regret that we can no longer maintain the Apache-2.0 License. Due to individuals directly copying this project and claiming to be its maintainers, we have decided to change the license to AGPL-3.0 to prevent misuse of the project in ways that go against our original vision.
**Notes**: 尽管我们希望尽可能让所有人都能从开源中获益,但我们很遗憾地宣布无法继续保持 Apache-2.0 License。由于有人直接抄袭本项目并标榜其为项目维护者,我们不得不将 License 更改为 AGPL-3.0,以防止有人滥用本项目进行违背项目初心的事情。
Reason following:
**Background**: @jackdark425's [repository](https://github.com/jackdark425/aigroup-stata-mcp) directly copied this project and claimed to be the sole maintainer. We welcome open source collaboration based on forks, including but not limited to adding new features, fixing existing bugs, or providing valuable suggestions for the project, but we firmly oppose plagiarism and false attribution.
**Update**: The infringing project has been taken down via GitHub DMCA. [View DMCA takedown details](https://github.com/github/dmca/blob/master/2025/12/2025-12-30-stata-mcp.md).
**背景**: @jackdark425 的[仓库](https://github.com/jackdark425/aigroup-stata-mcp)直接抄袭了本项目并标榜为项目唯一维护者。我们欢迎基于fork的开源协作,包括但不限于添加新的feature、修改已有bug或对项目提出您宝贵的意见,但坚决反对抄袭和虚假署名行为。
**更新**: 侵权项目已通过GitHub DMCA被takedown,[查看DMCA下架详情](https://github.com/github/dmca/blob/master/2025/12/2025-12-30-stata-mcp.md)。
</details>
---
## 💡 Quickly Start
### 🚀 One-click installation for all clients!
No config, no manual JSON editing. Just one command installs MCP-for-Stata for **every supported agent** (Claude Code, Codex, OpenClaw, Cursor, Gemini CLI, and more):
```bash
uvx stata-mcp install --all
```
<details>
<summary>Supported Agents 🤖</summary>
Based on our own experience and testing, we recommend using Claude Code, Codex, and OpenClaw.
We have found that Claude and DeepSeek are the two best models across any framework.
| Agent | Tag | Command |
|---------------------------|----------|-----------------------------------|
| Claude Desktop | claude | uvx stata-mcp install -c claude |
| Claude Code | cc | uvx stata-mcp install -c cc |
| Gemini CLI | gemini | uvx stata-mcp install -c gemini |
| Cursor | cursor | uvx stata-mcp install -c cursor |
| Cline (VScode Extension) | cline | uvx stata-mcp install -c cline |
| Codex CLI & Codex Desktop | codex | uvx stata-mcp install -c codex |
| OpenCode | opencode | uvx stata-mcp install -c opencode |
| OpenClaw | openclaw | uvx stata-mcp install -c openclaw |
| Claude Science | — | [Manual config](#advanced-claude-science) |
</details>
If you don't have `uv`, [see the uv installation guide](https://docs.astral.sh/uv/getting-started/installation) to install it.
Or, use our beta install script (auto-installs `uv` if missing):
**macOS / Linux:**
```bash
curl -fsSL https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.sh | bash
```
**Windows (PowerShell):**
```powershell
irm https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.ps1 | iex
```
If you don't know how to use them, [download the installation scripts](https://github.com/SepineTam/mcp-for-stata/tree/master/scripts) and double-click it in your device. `install.bat` for Windows users, and `install.command` for macOS users.
<a name="advanced-claude-code"></a>
### Advanced - Claude Code
As we find Claude Code is the best agent for MCP-for-Stata as its prefect agentic ability, we recommend using it, and there are lots of advanced usage following:
Before using it, please make sure you have ever install `Claude Code`, if you don't know how to install it, visit on [GitHub](https://github.com/anthropics/claude-code)
Generally, you can install MCP-for-Stata globally for one time, you can run:
```bash
claude mcp add stata-mcp --scope user -- uvx stata-mcp
```
Then, you do not need to watch it again.
<details>
<summary>Local and share with your partners</summary>
If you want to install it locally only for the certain workspace, you can `cd` to your working directory, and run:
```bash
claude mcp add stata-mcp --env STATA_MCP__CWD=$(pwd) --scope local -- uvx --directory $(pwd) stata-mcp
```
It would nothing happen, you can type `claude` and type `/mcp` to find the status.
Also, collaboration is an essential part of research. You can share your MCP config with your co-authors using:
```bash
claude mcp add stata-mcp --scope project -- uvx stata-mcp
```
In your working directory, you can find a file named `.mcp.json`, your mcp config will be placed here.
</details>
Then, you can use MCP-for-Stata in Claude Code. Here are some scenarios for using it:
- **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
If you use Claude Code inside IDEs (either the integrated terminal or the Claude Code Extension), installing our plugin including [MCP-for-Stata](https://github.com/sepinetam/mcp-for-stata) and [Stata LSP](https://github.com/euglevi/stata-language-server) maintained by @euglevi.
```bash
# Add the MCP-for-Stata marketplace
claude plugin marketplace add SepineTam/mcp-for-stata
# Install the plugin to local, project or user scope
claude plugin install stata-toolbox -s project
```
> The language server gives AI-generated Stata code better syntax awareness and completion, which improves output quality. We package the LSP in compliance with its license and give full attribution to the original author.
<a name="advanced-codex"></a>
### Advanced - Codex
We find that many researchers are using Codex as their agent, therefore we also provide instructions for Codex users.
I figure that researchers are not using Codex CLI but Codex Desktop, so we can say it is easier to config MCP-for-Stata than other agents.
You just need to say `Install MCP-for-Stata for yourself globally from https://www.statamcp.com or visit https://github.com/SepineTam/mcp-for-stata` then restart your Codex Desktop after it say ready.
Also, if you want to install it manually, here areLo que la gente pregunta sobre mcp-for-stata
¿Qué es SepineTam/mcp-for-stata?
+
SepineTam/mcp-for-stata es mcp servers para el ecosistema de Claude AI. A MCP server for Stata to integrate Stata into your agent. Tiene 228 estrellas en GitHub y se actualizó por última vez today.
¿Cómo se instala mcp-for-stata?
+
Puedes instalar mcp-for-stata clonando el repositorio (https://github.com/SepineTam/mcp-for-stata) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar SepineTam/mcp-for-stata?
+
Nuestro agente de seguridad ha analizado SepineTam/mcp-for-stata y le ha asignado un Trust Score de 100/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene SepineTam/mcp-for-stata?
+
SepineTam/mcp-for-stata es mantenido por SepineTam. La última actividad registrada en GitHub es de today, con 2 issues abiertos.
¿Hay alternativas a mcp-for-stata?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega mcp-for-stata en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/sepinetam-mcp-for-stata)<a href="https://claudewave.com/repo/sepinetam-mcp-for-stata"><img src="https://claudewave.com/api/badge/sepinetam-mcp-for-stata" alt="Featured on ClaudeWave: SepineTam/mcp-for-stata" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!