Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By tmonk
Controls a local Stata installation from AI agents to run do-files, inspect datasets, check stored results, export graphs, and execute econometric workflows like causal inference, regression audit, and publication review.
npx claudepluginhub tmonk/mcp-stata --plugin mcp-stataEnd-to-end statistical analysis agent for Stata. Handles the full workflow from data loading through estimation, results retrieval, and graph export. Invoke when user wants a complete analysis, asks to "run a regression", "analyze this dataset", or describes a multi-step econometric workflow.
Stata error diagnosis and debugging agent. Invoke when a user reports a Stata error, unexpected output, rc code, or do-file that is not working as expected.
Specialist agent for publication-ready Stata outputs. Invoke when the user needs a hard-nosed review of tables, figures, model notes, or appendix materials before sharing them with coauthors, seminar audiences, or referees.
Specialist agent for replication, robustness, and multi-specification evidence gathering in Stata. Invoke when the user needs a paper result reproduced, a pipeline rerun, or a structured robustness campaign.
Design, run, and critique causal inference workflows in Stata. Use when the user is working on identification, treatment effects, DiD, IV, event studies, RD, or assumption-sensitive empirical claims.
Audit datasets for structure, missingness, labeling, suspicious values, duplicate identifiers, and documentation readiness. Use when a researcher asks for data QA, codebook review, sanity checks, or pre-analysis cleanup guidance.
Track dataset lineage, transformation steps, merge logic, and reproducibility risks in Stata workflows. Use when the user needs to explain where data came from, how it changed, or why a pipeline can be trusted.
Diagnose local Stata, MCP, package, startup, graph-export, and permissions issues. Use when setup is failing, Stata is not discovered, packages are missing, logs are truncated, or a managed machine behaves differently from a normal workstation.
List, export, and review Stata graphs from the current session.
Uses power tools
Uses Bash, Write, or Edit tools
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
The official working package of MCP-for-Stata plugin, including mcp config and stata lsp.
Comprehensive Stata reference — syntax, data management, econometrics, causal inference, graphics, Mata, and 20 community packages.
Stata statistical analysis for publication-ready sociology research. Phased workflow for DiD, IV, matching, panel methods, and more with pauses for user review.
Multi-agent workflow framework for building, testing, and shipping statistical software packages
R statistical analysis for publication-ready sociology research. Phased workflow for DiD, IV, matching, panel methods, and more with pauses for user review.
Scientific research agent extension - turns research goals into reproducible Jupyter notebooks with Python REPL, data analysis, and ML workflows
mcp-stata is an agentic toolkit for empirical researchers. It gives AI agents native control over a local Stata installation, allowing agents to run do-files, inspect data, check stored results, and export graphs. Contains a skills catalog for workflows researchers use often: auditing data, replication and robustness checks, specification comparisons, publication QA, referee responses, and modernization of legacy code. Featured in News.
If you'd like a fully integrated VS Code extension to run Stata code without leaving your IDE, and also allow AI agent interaction, check out my other project:
Stata Workbench.
Built by Thomas Monk, London School of Economics.
This server enables LLMs to:
sysuse auto, regress price mpg).r(), e()) for accurate validation.macOS/Linux:
curl -LsSf https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.sh | bash
Windows (PowerShell):
irm https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.ps1 | iex
Client-specific examples:
| Client | macOS/Linux | Windows (PowerShell) |
|---|---|---|
| Claude Code | bash <(curl -LsSf https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.sh) --agent claude | & ([scriptblock]::Create((irm https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.ps1))) --agent claude |
| Codex | bash <(curl -LsSf https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.sh) --agent codex | & ([scriptblock]::Create((irm https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.ps1))) --agent codex |
| Gemini | bash <(curl -LsSf https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.sh) --agent gemini | & ([scriptblock]::Create((irm https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.ps1))) --agent gemini |
| Cursor | bash <(curl -LsSf https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.sh) --agent cursor | & ([scriptblock]::Create((irm https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.ps1))) --agent cursor |
| Windsurf | bash <(curl -LsSf https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.sh) --agent windsurf | & ([scriptblock]::Create((irm https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.ps1))) --agent windsurf |
| VS Code | bash <(curl -LsSf https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.sh) --agent vscode | & ([scriptblock]::Create((irm https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.ps1))) --agent vscode |
| Auto-detect / default | bash <(curl -LsSf https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.sh) | & ([scriptblock]::Create((irm https://raw.githubusercontent.com/tmonk/mcp-stata/main/plugin/install.ps1))) |
Ask your agent:
Do you have access to the Stata agentic toolkit? (mcp-stata)
It will confirm the connection and describe all available tools and skills.
Load the auto dataset and run a regression of price on mpg
The toolkit is designed for empirical economics research.