/mcp-stata:stata-runfrom mcp-stata
Runs arbitrary Stata code or .do files and displays the output. Supports background execution with task status polling, log tailing, and error handling with lint/help suggestions.
Ships in mcp-stata. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The argument is the Stata code or absolute path to a .do file to execute.
If the argument ends in .do or .ado, call:
stata_run(code=<argument>, is_file=True, echo=True, as_json=True)
Otherwise call:
stata_run(code=<argument>, echo=True, as_json=True)
If success is true, display the stdout output. Note the output is truncated to 5,000 chars; if the response includes a log_path, offer to tail the full log with /stata-log <log_path>.
If success is false, display the error message and rc code. Suggest using /stata-lint <path> for syntax issues or /stata-help <command> for documentation.
If the command produces graphs, note that /stata-graph can export them.
If using background mode (background=True): you may do other work or fire parallel tasks, but you MUST call stata_task_status(task_id=<id>, wait=True, timeout=<N>, tail_lines=<M>) for every task before returning to the user. Set timeout to match expected runtime; set tail_lines to how much output you want inline vs. reading separately via stata_read_log. Loop on timeout until status is 'done' or 'failed'.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tmonk/mcp-stata --plugin mcp-stata20 skills in this plugin
/stataShow mcp-stata identity, connected tools, and status. Use when the user asks if mcp-stata is available, asks about access to the toolkit, or asks what Stata tools are connected./stata-causal-inferenceDesign, 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./stata-data-auditAudit 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./stata-data-provenanceTrack 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./stata-environment-diagnoseDiagnose 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./stata-graphList, export, and review Stata graphs from the current session.Other plugins' skills for the same job