Stata C Plugins
dylantmoore/stata-skill
Develop high-performance C/C++ plugins for Stata using the stplugin.h SDK.
A skill your agent uses when you need to find Stata on the user's machine or configure stata-mcp to use it.
$ npx skills add SepineTam/mcp-for-stata --skill stata-discover -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install SepineTam/mcp-for-stata stata-discover --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-srcUse ~/.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/
Install the "stata-discover" agent skill from https://github.com/SepineTam/mcp-for-stata/tree/master/plugins/stata-toolbox/skills/stata-discover into .claude/skills/stata-discover/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stata-discover", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/SepineTam/mcp-for-stata/tree/master/plugins/stata-toolbox/skills/stata-discoverType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add SepineTam/mcp-for-stata --skill stata-discover -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install SepineTam/mcp-for-stata stata-discover --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/SepineTam/mcp-for-stata.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/stata-toolbox/skills/stata-discover .agents/skills/stata-discover && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "stata-discover" agent skill from https://github.com/SepineTam/mcp-for-stata/tree/master/plugins/stata-toolbox/skills/stata-discover into .agents/skills/stata-discover/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stata-discover", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add SepineTam/mcp-for-stata --skill stata-discover -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install SepineTam/mcp-for-stata stata-discover --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/SepineTam/mcp-for-stata.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/stata-toolbox/skills/stata-discover .cursor/skills/stata-discover && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "stata-discover" agent skill from https://github.com/SepineTam/mcp-for-stata/tree/master/plugins/stata-toolbox/skills/stata-discover into .cursor/skills/stata-discover/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stata-discover", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/SepineTam/mcp-for-stata.git --path plugins/stata-toolbox/skills/stata-discover--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add SepineTam/mcp-for-stata --skill stata-discover -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install SepineTam/mcp-for-stata stata-discover --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/SepineTam/mcp-for-stata.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/stata-toolbox/skills/stata-discover .gemini/skills/stata-discover && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "stata-discover" agent skill from https://github.com/SepineTam/mcp-for-stata/tree/master/plugins/stata-toolbox/skills/stata-discover into .gemini/skills/stata-discover/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stata-discover", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install SepineTam/mcp-for-stata stata-discoverInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add SepineTam/mcp-for-stata --skill stata-discover -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/SepineTam/mcp-for-stata.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/stata-toolbox/skills/stata-discover .github/skills/stata-discover && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "stata-discover" agent skill from https://github.com/SepineTam/mcp-for-stata/tree/master/plugins/stata-toolbox/skills/stata-discover into .github/skills/stata-discover/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stata-discover", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add SepineTam/mcp-for-stata --skill stata-discover -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install SepineTam/mcp-for-stata stata-discover --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/SepineTam/mcp-for-stata.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/stata-toolbox/skills/stata-discover .opencode/skills/stata-discover && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "stata-discover" agent skill from https://github.com/SepineTam/mcp-for-stata/tree/master/plugins/stata-toolbox/skills/stata-discover into .opencode/skills/stata-discover/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stata-discover", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
stata-discoverA 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. 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.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit d339615. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
uvxFrom the folder's file list and the shell code blocks in SKILL.md.
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.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
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.
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.
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.
The full file from SepineTam/mcp-for-stata at commit d339615, republished under its AGPL-3.0 licence (© SepineTam). 779 words, ~1,738 tokens.
.claude/skills/stata-discover/SKILL.md (or your agent's skills folder).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-mcp yetstata_do or stata-mcp doctor reports that the Stata CLI cannot be foundstata-mcpList all Stata installations on the machine:
uvx stata-mcp discoverPATH, and the STATA_CLI environment variable.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-mpIndependently, 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:
| Platform | Search 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) |
| Windows | Stata* 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:
mp > se > be > ic > default19.5 are supported; an undetectable version counts as 99, i.e. treated as the current default version)Inspect the currently resolved Stata CLI:
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).
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).
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 entryThis writes to the [STATA] section of ~/.statamcp/config.toml and applies to all projects.
Create .statamcp/config.toml in the project root:
[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.
Use the STATA_CLI environment variable, effective for the current command only:
STATA_CLI=/path/to/stata-mp uvx stata-mcp doctorCaveat: 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.
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).
uvx stata-mcp doctorThe 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 outputDoctor'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:
uvx stata-mcp tool do path/to/test.doOr 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).
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>.stata_cli FAILs: no usable path from env, config, or auto-detection — set one via config set cli or STATA_CLI.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.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
Just SKILL.md in plugins/stata-toolbox/skills/stata-discover of SepineTam/mcp-for-stata.
Open the folder on GitHubat commit d339615
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Stata Discover this skillSepineTam/mcp-for-stata | 264 | — | ~1.7k | Automated safety check: Pass | AGPL-3.0 | |
| Stata C Pluginsdylantmoore/stata-skill | 291 | 1 repos | ~5.8k | Automated safety check: Pass | Custom licence | |
| Fin Data Acquisitioncsmar432/finai-research | 109 | — | ~2k | Automated safety check: Pass | MIT | |
| Fin Generate Ideacsmar432/finai-research | 109 | — | ~2.5k | Automated safety check: Pass | MIT | |
| Fin Idea Discoverycsmar432/finai-research | 109 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Fin Novelty Checkcsmar432/finai-research | 109 | — | ~1.4k | Automated safety check: Pass | MIT |
dylantmoore/stata-skill
Develop high-performance C/C++ plugins for Stata using the stplugin.h SDK.
csmar432/finai-research
根据REFINEDDESIGN.md中的变量定义,自动获取所需数据并生成可执行的回归分析脚本(Python/Stata)。
csmar432/finai-research
针对经济金融研究方向的创意生成与评估。生成8-12个可发表的研究idea,过滤后在数据可行的情况下进行小规模实证验证,输出排序后的研究想法报告。
csmar432/finai-research
经济金融研究的完整想法发现流程。从研究方向出发,经过文献综述、想法生成、新颖性验证、实证方法设计和数据获取,输出经过数据实证验证的可执行研究方案。
csmar432/finai-research
验证经济金融研究想法的新颖性。在JF、JFE、RFS、JME等顶刊及arXiv中搜索近三年文献,输出结构化新颖性报告和定位策略。
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…
SepineTam/mcp-for-stata
Inspect, validate, summarize, and render local Stata-MCP audit evidence under .statamcp.
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.
SepineTam/mcp-for-stata
Run a local smoke test for the Stata-MCP server. An agent skill from SepineTam/mcp-for-stata.
SepineTam/mcp-for-stata
Generate RFC and IMPL documents from a user-provided feature/fix description.
SepineTam/mcp-for-stata
A packaged Stata Runner skill via official MCP-for-Stata server including statado, adopackageinstall, help, readlog and getdatainfo tools.
Works with
Categories
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.
Stata Discover fits situations like: you need to find Stata on the users machine; configure stata-mcp to use it.
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.
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.
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.
Going by SKILL.md and its folder, Stata Discover needs the command-line tools its instructions call (uvx).
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.
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.
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.
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.
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.
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.