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"]
}
}
}MCP Servers overview
<div align="center">
<a href="https://www.statamcp.com">
<img src="https://example-data.statamcp.com/logo_with_name.jpg" alt="MCP-for-Stata: Integrate Stata into your agent" width="300"/>
</a>
</div>
<h1 align="center">MCP-for-Stata: Integrate Stata into your agent</h1>
> 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 -->
---
**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,以防止有人滥用本项目进行违背项目初心的事情。
<details>
<summary>Reason</summary>
**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. Click [here](https://github.com/github/dmca/blob/master/2025/12/2025-12-30-stata-mcp.md) to learn about.
**背景**: @jackdark425 的[仓库](https://github.com/jackdark425/aigroup-stata-mcp)直接抄袭了本项目并标榜为项目唯一维护者。我们欢迎基于fork的开源协作,包括但不限于添加新的feature、修改已有bug或对项目提出您宝贵的意见,但坚决反对抄袭和虚假署名行为。
**更新**: 侵权项目已通过GitHub DMCA被takedown,点击[这里](https://github.com/github/dmca/blob/master/2025/12/2025-12-30-stata-mcp.md)查看详情。
</details>
---
**News**:
- 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://docs.statamcp.com/agents/openclaw.md)
- ✨ **Claude Code Plugin Support**: Official plugin package with MCP server and Stata LSP integration
- Use MCP-for-Stata in Claude Code, look [here](#advanced---claude-code), or Codex [here](#advanced---codex)
> Finding our **newest research**? Click [here](source/reports/README.md) or visit [reports website](https://www.statamcp.com/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 [here](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.
> - [Trace DID](https://github.com/asjadnaqvi/DiD): If you want to fetch the newest information about DID (Difference-in-Difference), click [here](https://asjadnaqvi.github.io/DiD/). Now there is a Chinese translation by [Sepine Tam](https://github.com/sepine) and [StataMCP-Team](https://github.com/statamcp-team) 🎉
> - Jupyter Lab Usage (Important: Stata 17+) [here](source/docs/JupyterStata.md) and [nbstata](https://github.com/hugetim/nbstata)
</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 |
</details>
If you don't have `uv`, visit [here](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, try click [here](https://github.com/SepineTam/mcp-for-stata/tree/master/scripts) and download the installation scripts and double-click it in your device. `install.bat` for Windows users, and `install.command` for macOS users.
### 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.
### 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 are two ways:
#### A. Install in Codex Desktop GUI
1. Open your Codex Desktop APP
2. Click `Settings` in the bottom-left corner
3. Find `MCP servers` on the left side
4. Click `Add server`
5. Fill with the following:
```
Name: stata-mcp
Command to launch: uvx
Arguments: stata-mcp
```
6. Click `Save`
7. Then, restart your Codex Desktop andWhat people ask about mcp-for-stata
What is SepineTam/mcp-for-stata?
+
SepineTam/mcp-for-stata is mcp servers for the Claude AI ecosystem. Integrate Stata into your agent. It has 200 GitHub stars and was last updated today.
How do I install mcp-for-stata?
+
You can install mcp-for-stata by cloning the repository (https://github.com/SepineTam/mcp-for-stata) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is SepineTam/mcp-for-stata safe to use?
+
Our security agent has analyzed SepineTam/mcp-for-stata and assigned a Trust Score of 100/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains SepineTam/mcp-for-stata?
+
SepineTam/mcp-for-stata is maintained by SepineTam. The last recorded GitHub activity is from today, with 2 open issues.
Are there alternatives to mcp-for-stata?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy mcp-for-stata to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](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>More 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.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。