mcp-for-stata
Stata-MCP: A MCP server for integrating Stata into your agent loop with a safety-first design.
Install / Use
npx skills add SepineTam/mcp-for-stataInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SecuritySupported Platforms
Our assessment of mcp-for-stata
mcp-for-stata scores 87/100 on our quality scale, 432nd of 772 Security skills we index.
Its SKILL.md is 25 KB long, well organised into 29 sections with 18 code examples: a thorough specification that gives an agent plenty to work with.
It has 261 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated today, so mcp-for-stata is actively maintained.
- Our last check on 2026-09-25 found the source still online.
- It is released under AGPL-3.0, a copyleft license: you can use it, but modified versions you distribute must carry the same license.
- Its trust signals score 95/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands (2 minor notes below). An AI review of the same text found nothing harmful.
- noteInstalls by piping a downloaded script into a shellline 119
curl -fsSL https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.sh | bash - noteInstalls by piping a downloaded script into a shellline 124
irm https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.ps1 | iex
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
mcp-for-stata compared with similar skills
All 4 of these similar skills score higher than mcp-for-stata; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| mcp-for-stata (this skill)by SepineTam | 87 | 261 | today | SKILL.md |
| Agent-Reachby Panniantong | 100 | 85.9k | 12d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.0k | 1d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 73.4k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.1k | today | CLAUDE.md |
Frequently asked questions
- How do I install mcp-for-stata?
- Run
npx skills add SepineTam/mcp-for-stata. The install tabs above show the steps for each supported agent. - Which AI agents does mcp-for-stata work with?
- It is written for Claude Code and OpenAI Codex, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is mcp-for-stata safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands (2 minor notes below). An AI review of the same text found nothing harmful. It is AGPL-3.0-licensed and scores 95/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is mcp-for-stata still maintained?
- The repository was last updated today, so mcp-for-stata is actively maintained.
Skill content
View source on GitHubMCP-for-Stata (Stata-MCP): Run Stata with ANY Agent
MCP-for-Stata is an safety first open-source MCP server and CLI tool with Skills lets any AI agent you use invoke local Stata on your device for regression analysis, econometrics, paper replication, and empirical research. It provides command guards, resource monitoring, automatic log capture, and cross-platform client installation, while you retain control of your data and Stata license.
Turn Claude Code, Codex, and other AI agents into an on-demand research assistant.
<!-- mcp-name: io.github.SepineTam/stata-mcp -->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.
💡 Quick Start
You do not need to edit any configuration. Just tell your agent:
Install MCP-for-Stata for yourself globally following the instructions in the GitHub repository at SepineTam/mcp-for-stata.
🆕 News
- 📖 Skills installed by default: Stata-related skills are now installed together with the MCP, no separate setup needed. See the installation guide.
- 🚀 DeepSeek Harness Day 0 Support: Install MCP-for-Stata in DeepSeek Harness with
uvx stata-mcp install -c dsh. See the DeepSeek Harness guide. - 🧪 Claude Science Support: MCP-for-Stata now works in Claude Science with a sandbox allowlist. See the Claude Science guide.
- Find more in WeChat: Why I made it?, and 8 figures find out Stata-MCP
- 🦞 OpenClaw Support: Standalone CLI tools for OpenClaw integration (
stata-mcp tool), see OpenClaw guide - ✨ 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, or in Codex see Codex advanced usage
<details> <summary>Looking for others?</summary>Finding our newest research? View latest research reports.
</details> <details> <summary>Why AGPL 3.0 License?</summary>MCP or AI about Stata
- A session based MCP server for Stata, mcp-stata
- IDEs (VScode or Cursor) integrated stata-mcp for VSCode. Confused them? 💡 Comparison
Datasets and Information
- STOP Dataset: 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.
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 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.
背景: @jackdark425 的仓库直接抄袭了本项目并标榜为项目唯一维护者。我们欢迎基于fork的开源协作,包括但不限于添加新的feature、修改已有bug或对项目提出您宝贵的意见,但坚决反对抄袭和虚假署名行为。
更新: 侵权项目已通过GitHub DMCA被takedown,查看DMCA下架详情。
</details>Installation and Client Configuration
See the Installation Guide for installation methods, client setup, addon/extra options, and verification.
🚀 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):
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 |
</details>If you don't have uv, see the uv installation guide to install it.
Or, use our beta install script (auto-installs uv if missing):
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.sh | bash
Windows (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 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
Generally, you can install MCP-for-Stata globally for one time, you can run:
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:
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:
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.
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 and Stata LSP maintained by @euglevi.
# 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 are two ways:
A. Install in Codex Desktop GUI
- Open your Codex Desktop APP
- Click
Settingsin the bottom-left corner - Find
MCP serverson the left side - Click
Add server - Fill with the following:
Name: stata-mcp Command to launch: uvx Arguments: stata-mcp - Click
Save - Then, restart your Codex Desktop and enjoy it.
B. Install with Codex CLI
For CLI mode, just run the following command in your terminal
uvx stata-mcp install -c codex
Or use
codex mcp add stata-mcp -- uvx stata-mcp
<a name="advanced-claude-science"></a>
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
85.9kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.0kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.4k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
CowAgent
47.1kOpen-source super AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
