Skip to content
Skillpedia
● Free and open sourceπŸ’» LocalπŸ”“ No API keyData and databases

Stata-MCP

Lets your AI agent run your local Stata for regression analysis, econometrics and paper replication, with safety guards.

274 stars on GitHubby SepineTamLicense AGPL-3.0Updated last month

How to install

This MCP is local: it runs on your computer.

It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Code…). Choose your app:

Paste in the terminal:

claude mcp add stata -- uvx stata-mcp

Ready! Now test it

Restart the app and paste one of these requests in the chat:

Run a regression of wages on education and experience and explain the result.
Replicate the main table of this paper using Stata.

What it is

MCP-for-Stata lets any AI agent call the Stata installed on your own computer. It adds command guards, resource monitoring and automatic log capture, and you keep control of your data and your Stata license. It also ships Stata-related skills and a command-line tool.

What it can do

  • Run Stata commands on your computer
  • Command guards that limit risky commands
  • Resource monitoring
  • Automatic log capture
  • uvx stata-mcp install to set up supported agents
  • Standalone CLI tools for OpenClaw (stata-mcp tool)

When to use

  • β€ΊWhen you want to replicate the results of an economics paper
  • β€ΊWhen you want to test a hypothesis with a regression and get the output explained
  • β€ΊWhen you want help cleaning up or reviewing a Stata do-file

What you need

Stata installed and licensed on your computer, plus uv (uvx stata-mcp). An installer script is offered that installs uv if it is missing.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

Frequently asked questions

Is it free?

The software is open source under the AGPL-3.0 license. You still need your own Stata license, which is not included.

Is it from StataCorp?

No. The readme says it is an independent community project, not affiliated with StataCorp LLC.

Which agents can I install it into?

Claude Desktop, Claude Code, Gemini CLI, Cursor, Cline, Codex, OpenCode and OpenClaw, using uvx stata-mcp install --all or one client at a time.

Does it work in Claude Science?

Yes, with a sandbox allowlist for the paths where uv places its files, as the readme describes.

Where does my data stay?

The readme says you retain control of your data and Stata license, and Stata runs on your device.

Are there extra skills?

Yes. Stata-related skills are now installed together with the MCP by default.

If it does not work

  • β€ΊIf you do not have uv, install it first or use the install script, which installs it for you.
  • β€ΊIn Claude Science, allowlist ~/.local/bin and ~/.local/share/uv/tools/stata-mcp in config.toml if you see Connection closed.
  • β€ΊRestart your client after installing so it loads the server.

5 new skills a week. 1 minute to read.