StataCAUTION
Stata-MCP: A MCP server for integrating Stata into your agent loop with a safety-first design.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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.
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://www.bestpractices.dev/projects/14255) [](h
28f74d3556f2OBSERVED · 2026-10-06Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add stata-mcp -- None stata-mcp==1.25.1
Trust audit
CAUTIONgrade C · trust 78/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (2 observation(s))
- Network
- declared (7 observation(s))
- Shell
- declared (7 observation(s))
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (24)
__import__(package)
__import__(package)
module = importlib.import_module(module_name)
exec(
exec(
digest = hashlib.md5(self.bytes_io_data.getvalue()).hexdigest()
blob = hashlib.sha1(f"blob {len(data)}\0".encode() + data).hexdigest()"sha": hashlib.sha1(b"blob 5\0" + data).hexdigest(),
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../../../../" && pwd)"PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../../../../" && pwd)""../../outside",
"foo/../../bar",
"skills/../../bad",
"https://192.168.1.1/data.csv",
"https://192.168.1.1/data.csv",
data_path="https://192.168.1.1/data.csv",
data_path="https://192.168.1.1/data.csv",
result = auditor.validate_url("https://192.168.1.1/data.csv")curl -fsSL https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.sh | bash
curl -fsSL https://claude.ai/install.sh | bash
Gates applied: no_behavioural_pass.
28f74d3556f2full audit observations/trust-audit/mcp-server/sepinetam__stata-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-06 | 28f74d3556f2 | CAUTION | C | 78 | first audit |
Questions
What is the Stata MCP server?
Stata-MCP: A MCP server for integrating Stata into your agent loop with a safety-first design.
Is Stata safe to connect to an agent?
With care. The audit graded it C (78/100) and found 24 things worth knowing before you trust this server, listed below with the exact line each was found on.
What credentials does Stata need?
It reads OPENAI_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Stata run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as stata-mcp.
How current is this page?
The grade is for one exact copy of the source (28f74d3556f2), read on 2026-10-06. The repository is watched and re-audited when it changes.