stata-mcp

v1.25.3
io.github.SepineTam/stata-mcp Checked 4 hours ago Published 25 days ago

Let 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.

ParameterTypeDescription
dofile_path *string
enable_smclboolean
is_replace_logboolean
log_file_namestring
read_log_when_errorboolean
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.

ParameterTypeDescription
data_path *string
encodingstring
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.

ParameterTypeDescription
cmd *string
replaceboolean

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.

ParameterTypeDescription
file_path *string
encodingstring
linesinteger
output_formatstring