stata-mcp
Installation
SKILL.md
Stata MCP Skill
Instructions
- Ensure the
stataMCP server is registered (see project README for config) and request it if not already active. - When the user asks for Stata work:
- Use
run_commandfor ad-hoc syntax (trace=Truefor call stacks,raw=Truefor plain output). - Use
load_databefore analyses that require datasets. - Use
get_data,describe,codebook, orget_variable_listto inspect data. - Use
run_do_filefor provided.doscripts. - Use
export_graph/export_graphs_allfor visualization requests. - Use
get_helpwhen the user wants Stata documentation. - Use
get_stored_resultsto returnr()/e()scalars/macros after commands for validation. - Use
read_logto tail or retrieve output from long-running commands. - Use
get_ui_channelto obtain a localhost HTTP endpoint for high-volume data browsing.
- Use
- Surface
rc/stderrinfo back to the user, referencingr()/e()codes. - If Stata isn't auto-discovered, remind the user to set
STATA_PATH(examples in README).