Agent skill

Stata Discover

by SepineTam in SepineTam/mcp-for-stata

A skill your agent uses when you need to find Stata on the user's machine or configure stata-mcp to use it.

AGPL-3.0Auto-check passedResearch & Science

Install Stata Discover

skills CLI
$ npx skills add SepineTam/mcp-for-stata --skill stata-discover -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SepineTam/mcp-for-stata stata-discover --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SepineTam/mcp-for-stata.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/stata-toolbox/skills/stata-discover .claude/skills/stata-discover && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
stata-discover
GitHub stars
264
Token cost
~1.7k tokens
SKILL.md length
779 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
AGPL-3.0

At a glance

A skill your agent uses when you need to find Stata on the user's machine or configure stata-mcp to use it.

  • Works in 2 steps: Edition first: mp > se > be > ic > default → Then version number within the same…
  • You need to find Stata on the users machine
  • SKILL.md covers When to Use, Find Stata with CLI, Configure Stata for Stata-MCP and Verify, plus 1 more section
  • Calls uvx

What it does

Stata Discover is an agent skill from SepineTam/mcp-for-stata. Use this skill when you need to find Stata on the user's machine or configure stata-mcp to use it. stata-discover provides the workflow for discovering Stata executables and the official way to configure stata-mcp. If the user's computer has multiple Stata executables available, this skill also provides the version the user most likely wants to use.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Research & Science, covering Econometrics and empirical research. It works with Model Context Protocol and macOS. The repository describes itself as: Stata-MCP: A MCP server for integrating Stata into your agent loop with a safety-first design. The licence is AGPL-3.0.

When your agent uses it

  • You need to find Stata on the users machine
  • Configure stata-mcp to use it

Example prompts

  • “/stata-discover”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Edition first: mp > se > be > ic > default
  2. Then version number within the same edition, higher wins (float versions like 19.5 are supported; an undetectable version counts as 99…

What it can do on your machine

Read from SKILL.md and the folder at commit d339615. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uvx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uvx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Stata Discover loads about 1.7k tokens when it runs. Until then it costs about 93 tokens; SKILL.md has 779 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~93
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SepineTam/mcp-for-stata at commit d339615, republished under its AGPL-3.0 licence (© SepineTam). 779 words, ~1,738 tokens.

Download SKILL.mdSave it as .claude/skills/stata-discover/SKILL.md (or your agent's skills folder).
name
stata-discover
description
Use this skill when you need to find Stata on the user's machine or configure `stata-mcp` to use it. `stata-discover` provides the workflow for discovering Stata executables and the official way to configure `stata-mcp`. If the user's computer has multiple Stata executables available, this skill also provides the version the user most likely wants to use.
metadata.version
0.1.0

Users need Stata to run stata-mcp, but Stata is not always installed in a default location. This skill discovers which Stata executables/versions exist on the user's device and configures stata-mcp to use the most suitable one.

All commands below use uvx stata-mcp; if stata-mcp is already installed, the bare stata-mcp command works the same way.

Stata Discover

When to Use

  • First-time setup: the user has not configured Stata for stata-mcp yet
  • stata_do or stata-mcp doctor reports that the Stata CLI cannot be found
  • The user wants to switch the Stata version/edition used by stata-mcp
  • The machine has multiple Stata installations and the user is unsure which one is in use

Find Stata with CLI

List all Stata installations on the machine:

bash
uvx stata-mcp discover
  • Prints one discovered Stata path per line, deduplicated and sorted; prints nothing when none is found
  • Search scope: installed applications, common installation directories, PATH, and the STATA_CLI environment variable
  • Read-only: does not launch Stata, verify licenses, or modify configuration
  • Available since v1.24.0; macOS / Windows only (reports OSNotSupported on Linux — Linux users should rely on auto-detection below or set the path manually)
  • Note: on macOS the output is a .app bundle path (e.g. /Applications/StataNow/StataMP.app), but STATA_CLI requires the CLI binary inside the bundle: append /Contents/MacOS/<binary>, where <binary> is usually stata-<edition> such as stata-mp (StataNow bundles may name it StataMP instead — check the directory). Full example: /Applications/StataNow/StataMP.app/Contents/MacOS/stata-mp

Independently, Stata-MCP ships a built-in StataFinder (src/stata_mcp/stata/stata_finder/). When STATA_CLI is not configured, it automatically discovers the best Stata executable and caches the result into the config file — no manual step needed.

Search locations per platform:

PlatformSearch locations
macOS/usr/local/bin (stata-mp / stata-se / stata-be / stata); Stata*.app under /Applications and ~/Applications (version read from the isstata.* file inside the app)
WindowsStata* directories under Program Files and Program Files (x86) on C:\ and D:\, plus other available drives
Linux/usr/local/bin and its subdirectories whose names contain "stata"

When multiple Stata installations exist, auto-detection picks by:

  1. Edition first: mp > se > be > ic > default
  2. Then version number within the same edition, higher wins (float versions like 19.5 are supported; an undetectable version counts as 99, i.e. treated as the current default version)

Inspect the currently resolved Stata CLI:

bash
uvx stata-mcp config show cli           # value persisted in the config file
uvx stata-mcp doctor --check stata_cli  # effective path and its source (from env / from config / auto-detected)

After picking a version from the discover list, persist it with uvx stata-mcp config set cli <path> (see the next section).

Configure Stata for Stata-MCP

At runtime, Stata-MCP resolves STATA_CLI in this order: config file > STATA_CLI environment variable > auto-detection (the detected result is written back to the user config file as a cache to speed up later startups).

bash
uvx stata-mcp config set cli            # auto-detect the best edition and persist it
uvx stata-mcp config set cli /Applications/StataNow/StataMP.app/Contents/MacOS/stata-mp  # macOS example
uvx stata-mcp config set cli "C:\Program Files\Stata18\StataMP-64.exe"                   # Windows example
uvx stata-mcp config edit STATA.STATA_CLI /path   # modify an existing config entry

This writes to the [STATA] section of ~/.statamcp/config.toml and applies to all projects.

Project-level

Create .statamcp/config.toml in the project root:

toml
[STATA]
STATA_CLI = "/path/to/stata-mp"

For ordinary settings the project file overrides the user file, which suits projects that must pin a specific Stata version.

Show full SKILL.md (317 more words)Show less
Temporary

Use the STATA_CLI environment variable, effective for the current command only:

bash
STATA_CLI=/path/to/stata-mp uvx stata-mcp doctor

Caveat: if STATA_CLI is already persisted in a config file, the runtime prefers the config file value and the environment variable has no effect. Before relying on a temporary override, confirm with uvx stata-mcp config show cli that the config file has no value, or use config set cli instead.

Reset to auto-detection

There is no config unset command. To return to auto-detection, manually remove the STATA_CLI key from the [STATA] section of ~/.statamcp/config.toml (and any project-level .statamcp/config.toml).

Verify

General check: doctor
bash
uvx stata-mcp doctor

The command is identical on Windows / macOS / Linux. Doctor runs 12 checks (os, python, uv, dependencies, stata_cli, stata_execution, config, working_dir, guard, monitor, pypi, cleanup). Useful flags:

  • --check stata_cli --check stata_execution: run only Stata-related checks (--check is repeatable)
  • --verbose: show details of each check
  • --json: machine-readable output
Real execution check

Doctor's stata_execution check actually launches Stata and runs display "Stata-MCP Doctor Test" and exit, STATA (stdin pipe on Unix, /e do batch mode on Windows, 15-second timeout on both). A pass means the Stata CLI can execute commands.

For an end-to-end verification, run a real do-file:

bash
uvx stata-mcp tool do path/to/test.do

Or call the stata_do tool from an MCP client (run uvx stata-mcp install first to write the client config, and restart the client after the first-time setup).

Troubleshooting

  • discover prints nothing: Stata is likely installed in a non-standard location. Ask the user for the installation path, verify the binary exists and is executable, then config set cli <path>.
  • Doctor stata_cli FAILs: no usable path from env, config, or auto-detection — set one via config set cli or STATA_CLI.
  • Doctor stata_execution times out (>15s): usually a license dialog or first-launch prompt blocking Stata startup. Open the Stata GUI once to complete activation, then re-run doctor.
  • Environment variable seems ignored: a persisted config file value wins at runtime; check config show cli and clear it if needed (see "Reset to auto-detection").

© SepineTam, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/stata-toolbox/skills/stata-discover of SepineTam/mcp-for-stata.

Open the folder on GitHubat commit d339615

Compare with similar skills

Stata Discover next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Stata Discover compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Stata Discover this skillSepineTam/mcp-for-stata264—~1.7kAutomated safety check: PassAGPL-3.0
Stata C Pluginsdylantmoore/stata-skill2911 repos~5.8kAutomated safety check: PassCustom licence
Fin Data Acquisitioncsmar432/finai-research109—~2kAutomated safety check: PassMIT
Fin Generate Ideacsmar432/finai-research109—~2.5kAutomated safety check: PassMIT
Fin Idea Discoverycsmar432/finai-research109—~2.7kAutomated safety check: PassMIT
Fin Novelty Checkcsmar432/finai-research109—~1.4kAutomated safety check: PassMIT

Similar skills

  • Stata C Plugins

    dylantmoore/stata-skill

    Develop high-performance C/C++ plugins for Stata using the stplugin.h SDK.

    291 GitHub starsUsed in 1 repo~5.8k tokens
    Research & ScienceAuto-check passed
  • Fin Data Acquisition

    csmar432/finai-research

    根据REFINEDDESIGN.md中的变量定义,自动获取所需数据并生成可执行的回归分析脚本(Python/Stata)。

    109 GitHub stars~2k tokensUpdated 5 days ago
    Research & ScienceAuto-check passed
  • Fin Generate Idea

    csmar432/finai-research

    针对经济金融研究方向的创意生成与评估。生成8-12个可发表的研究idea,过滤后在数据可行的情况下进行小规模实证验证,输出排序后的研究想法报告。

    109 GitHub stars~2.5k tokensUpdated 5 days ago
    Research & ScienceAuto-check passed
  • Fin Idea Discovery

    csmar432/finai-research

    经济金融研究的完整想法发现流程。从研究方向出发,经过文献综述、想法生成、新颖性验证、实证方法设计和数据获取,输出经过数据实证验证的可执行研究方案。

    109 GitHub stars~2.7k tokensUpdated 5 days ago
    Research & ScienceAuto-check passed
  • Fin Novelty Check

    csmar432/finai-research

    验证经济金融研究想法的新颖性。在JF、JFE、RFS、JME等顶刊及arXiv中搜索近三年文献,输出结构化新颖性报告和定位策略。

    109 GitHub stars~1.4k tokensUpdated 5 days ago
    Research & ScienceAuto-check passed
  • Stata Replication

    pedrohcgs/claude-code-my-workflow

    End-to-end Stata replication pipeline — scaffolds numbered .do files in scripts/stata/, executes them via the stata-mcp MCP server, captures logs and outputs to output/, and produces…

    1.7k GitHub stars~2.1k tokensUpdated 13 days ago
    Research & ScienceAuto-check: notes

More from SepineTam/mcp-for-stata

  • Stata Audit

    SepineTam/mcp-for-stata

    Inspect, validate, summarize, and render local Stata-MCP audit evidence under .statamcp.

    264 GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed
  • Diagnostic Dofile

    SepineTam/mcp-for-stata

    A skill your agent uses when the user needs to inspect, audit, or diagnose the safety of a Stata do-file.

    264 GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed
  • MCP Smoke Test

    SepineTam/mcp-for-stata

    Run a local smoke test for the Stata-MCP server. An agent skill from SepineTam/mcp-for-stata.

    264 GitHub stars~1.4k tokensUpdated 5 days ago
    Auto-check passed
  • Rfc Impl Generator

    SepineTam/mcp-for-stata

    Generate RFC and IMPL documents from a user-provided feature/fix description.

    264 GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check passed
  • Stata Skill

    SepineTam/mcp-for-stata

    A packaged Stata Runner skill via official MCP-for-Stata server including statado, adopackageinstall, help, readlog and getdatainfo tools.

    264 GitHub stars~2.7k tokensUpdated 5 days ago
    Auto-check passed

Questions about Stata Discover

What does Stata Discover do?

A skill your agent uses when you need to find Stata on the user's machine or configure stata-mcp to use it. Stata Discover is an agent skill from SepineTam/mcp-for-stata. Use this skill when you need to find Stata on the user's machine or configure stata-mcp to use it.

When should I use Stata Discover?

Stata Discover fits situations like: you need to find Stata on the users machine; configure stata-mcp to use it.

How do I install Stata Discover in Claude Code?

Run `npx skills add SepineTam/mcp-for-stata --skill stata-discover -a claude-code`. Or copy the skill folder (plugins/stata-toolbox/skills/stata-discover in SepineTam/mcp-for-stata) into .claude/skills/stata-discover in your project. Claude Code loads it when a task matches its description.

How do I install Stata Discover in Codex?

Run `npx skills add SepineTam/mcp-for-stata --skill stata-discover -a codex`. Or copy the skill folder (plugins/stata-toolbox/skills/stata-discover in SepineTam/mcp-for-stata) into .agents/skills/stata-discover in your project. Codex loads it when a task matches its description.

Can I use Stata Discover in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SepineTam/mcp-for-stata --skill stata-discover -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stata-discover, .gemini/skills/stata-discover, .github/skills/stata-discover and .opencode/skills/stata-discover in your project.

What does Stata Discover need to run?

Going by SKILL.md and its folder, Stata Discover needs the command-line tools its instructions call (uvx).

Does Stata Discover access the network?

SKILL.md contains no URLs. Its commands use uvx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Stata Discover safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Stata Discover use?

Stata Discover is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Stata Discover use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Stata Discover?

Skills that share tags, products or a category with Stata Discover: Stata C Plugins (dylantmoore/stata-skill, 291 stars), Fin Data Acquisition (csmar432/finai-research, 109 stars), Fin Generate Idea (csmar432/finai-research, 109 stars) and Fin Idea Discovery (csmar432/finai-research, 109 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Stata Discover?

SepineTam (a GitHub user) maintains it in SepineTam/mcp-for-stata, which has 264 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 6, 2026.

Source: SepineTam/mcp-for-stata on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.