stata-mcp
v1.25.3Let LLM help you achieve your regression analysis with Stata
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
stata_do
Execute a Stata do-file and return the execution log. Accepts a do-file path, runs it via the configured Stata executable, and can optionally read log content only when return-code errors are detected. Use when you need to run Stata commands, perform regression or statistical analysis, or execute a do-file.
| Parameter | Type | Description |
|---|---|---|
dofile_path * | string | |
enable_smcl | boolean | |
is_replace_log | boolean | |
log_file_name | string | |
read_log_when_error | boolean | |
timeout |
get_data_info
Get descriptive statistics and a data preview for a supported data file (.dta, .csv, .tsv, .psv, .xlsx, .xls, .sav, .zsav). Returns overview, variable details, and optional head rows filtered by requested variables. Use when you need to understand a dataset or have no prior knowledge of the data.
| Parameter | Type | Description |
|---|---|---|
data_path * | string | |
encoding | string | |
head | ||
vars_list |
help
Retrieve documentation and usage information for a Stata command. Use when you need to understand a command's syntax, options, or troubleshoot errors before running it.
| Parameter | Type | Description |
|---|---|---|
cmd * | string | |
replace | boolean |
read_log
Read a Stata log file (.log or .smcl) and return its content. Supports full, core, and dict output formats. Use `lines` to return only the first/last N lines.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
encoding | string | |
lines | integer | |
output_format | string |