MCP-for-Stata
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| STATA_MCP__CWD | No | The working directory for the Stata MCP server (e.g. set via `--env STATA_MCP__CWD=$(pwd)`). | |
| STATA_MCP__WINE | No | Wine binary to run. Default: wine | wine |
| STATA_MCP__IS_WINE | No | Use the Wine batch executor (`/e do`) instead of a native Stata CLI. Set to true when driving a Windows Stata build inside a Wine prefix on Linux or macOS. | false |
| STATA_MCP__STATA_CLI | No | Command the server spawns to run Stata. For Wine mode this should be the bundled `scripts/stata-wine` bridge script. Default: auto-detected native Stata. | |
| STATA_MCP__WINE_PREFIX | No | Wine prefix holding the Windows Stata install. Default: $HOME/.wine | $HOME/.wine |
| STATA_MCP__WINE_STATA_EXE | No | Windows Stata executable inside the Wine prefix. Default: $WINEPREFIX/drive_c/Program Files/Stata18/StataMP-64.exe | $WINEPREFIX/drive_c/Program Files/Stata18/StataMP-64.exe |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| stata_doB | 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. |
| get_data_infoA | 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. |
| helpA | 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. |
| read_logA | Read a Stata log file (.log or .smcl) and return its content. Supports full, core, and dict output formats. Use |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
Each tool targets a distinct action: stata_do executes code, get_data_info inspects datasets, help retrieves command docs, and read_log reads log files. There is no meaningful overlap between executing, inspecting, documenting, and reading outputs.
get_data_info and read_log follow a clean verb_noun pattern, but stata_do uses a domain prefix while help is a bare noun with no verb. The set is readable but mixes several conventions.
Four tools is reasonable for a focused Stata execution server, covering run, inspect, document, and read-log workflows. It is on the lean side but each tool earns its place without redundancy.
The surface covers the core loop of running Stata, understanding data, consulting help, and reading logs. Minor gaps exist (e.g. no direct inline command execution distinct from do-files, no data writing or file listing), but core workflows are supported.