Stata Skill
The skill could install or update from https://docs.statamcp.com/skills/openclaw
Stata-MCP is the best solution for connecting AI agents with Stata. It provides a suite of tools that allow Agents to execute Stata code through unified scheduling without wasting context searching for Stata executables. Both MCP and CLI interfaces are available. CLI is the preferred method for execution in this document.
CLI Tools (Fallback, mainly used by OpenClaw)
First, using uvx stata-mcp --usable to check whether Stata-MCP is usable. If there is any error, visit FAQ or commit an issue.
The following commands are supported:
uvx stata-mcp tool ado-install <package> [--source ssc|github|net] # install ado-package from ssc, net or github
uvx stata-mcp tool do <dofile_path> [--log-file-name <name>] # execute do-file
uvx stata-mcp tool help <command> # Unix only # get command help
uvx stata-mcp tool data-info <data_path> [--vars-list var1 var2] # get data basic information
uvx stata-mcp tool read-log <log_path> [--output-format full|core|dict] # read execution log
Iterative Workflow
get_data_info-> understand dataset structureEditorWrite-> to create a do-filestata_do-> execute analysis with capture outputhelp-> learn Stata commands (Unix) if there are any command errorado_package_install-> install missing packages