ワンクリックで
mcp-smoke-test
Run a local smoke test for the Stata-MCP server.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Run a local smoke test for the Stata-MCP server.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
A packaged Stata Runner skill via official MCP-for-Stata server including stata_do, ado_package_install, help, read_log and get_data_info tools. Use it when (1) need to execute Stata do-file; (2) missing ado-packages; (3) find code error caused by syntax in Stata; (4) want to read smcl and text format log file with rich text output; (5) first encounter a data file and want to understand its structure and content.
Generate RFC and IMPL documents from a user-provided feature/fix description. Use when the user says something like "I want to add a feature with codex", "Implement this", "Write an RFC for...", or provides a short idea that needs to be formalized into the ai-driven/rfc + ai-driven/impl pipeline.
SOC 職業分類に基づく
| name | mcp-smoke-test |
| description | Run a local smoke test for the Stata-MCP server. |
This skill performs an end-to-end smoke test of the local Stata-MCP server. It checks installation, runs representative data and Stata commands, and reports pass/fail status for each tool.
./.venv/bin/stata-mcp.
If it does not exist, use the globally installed stata-mcp command instead.~/.statamcp/debug.toml exists and enables beta security.
Use .claude/skills/mcp-smoke-test/config/debug.example.toml as a template.Check whether the MCP server stata-mcp-local-smoke-test is available by listing
Claude MCP servers:
claude mcp list
If stata-mcp-local-smoke-test is missing, add it with the debug configuration:
claude mcp add stata-mcp-local-smoke-test -s local -- $(pwd)/.venv/bin/stata-mcp -c ~/.statamcp/debug.toml
If ./.venv does not exist, use:
claude mcp add stata-mcp-local-smoke-test -s local -- stata-mcp -c ~/.statamcp/debug.toml
After adding, if the server is still not available, tell the user:
MCP server was added but is not yet visible. Please restart the Claude process and then invoke the smoke test again.
Run the preparation script. It clears cached summaries, locates or generates a
suitable auto.dta, and copies the boundary test files to /tmp:
bash .claude/skills/mcp-smoke-test/scripts/prepare_smoke_test.sh
Then use the mcp__stata-mcp-local-smoke-test tools (or the server name registered above)
to execute each test below. Record the result for each item.
For concrete tool-call parameters, expected outputs, and troubleshooting, see
.claude/skills/mcp-smoke-test/examples.md.
get_data_info on a local Stata sample fileTry the first existing file from this list:
/Applications/Stata/auto.dta/Applications/StataNow/auto.dtaExpected result: JSON summary with 74 observations and 12 variables.
get_data_info on an allowed URLUse this URL (already in the allowlist):
https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv
Expected result: JSON summary with 150 observations and 5 variables.
stata_do with a legal dofileRun the bundled dofile .claude/skills/mcp-smoke-test/scripts/legal.do with stata_do.
Expected result: execution succeeds and returns log file paths.
stata_do security boundary (negative test)Run the copied dofile /tmp/mcp_smoke_test_boundary.do with stata_do.
Expected result: blocked by the security guard because the dofile is outside the allowed working directory.
read_log on the generated logRead the text log returned by Test C. Expected result: log content includes regression output.
help for a Stata commandRun help with argument regress. Expected result: Stata help text for regress.
ado_package_install (optional, requires user approval)If the user confirms, attempt to install a small SSC package such as estout.
Expected result: user approval prompt, then installation log.
If the user declines or the tool is not registered (non-unsafe profile), mark this test as skipped.
Run the cleanup script to remove temporary files and cached summaries:
bash .claude/skills/mcp-smoke-test/scripts/cleanup.sh
Do not delete log files or data summaries; they are useful for diagnosis.
Return a concise Chinese report using this template:
# Stata-MCP 冒烟测试报告
## 服务器状态
- 注册状态:<已注册 / 新注册 / 需重启>
- 配置文件:`~/.statamcp/debug.toml`
## 测试结果
- [ ] Test A 本地 auto.dta 读取:<通过 / 失败 / 跳过> — 原因
- [ ] Test B URL 鸢尾花数据集读取:<通过 / 失败 / 跳过> — 原因
- [ ] Test C 合法 dofile 执行:<通过 / 失败 / 跳过> — 原因
- [ ] Test D 安全边界拦截:<通过 / 失败 / 跳过> — 原因
- [ ] Test E 日志读取:<通过 / 失败 / 跳过> — 原因
- [ ] Test F help 命令:<通过 / 失败 / 跳过> — 原因
- [ ] Test G ado 包安装:<通过 / 失败 / 跳过> — 原因
## 总结
<一句话结论:全部通过 / 部分失败 / 需要用户操作>
Only mark a test as passed when you observed the expected result. For failures, include the exact error message or tool response.
| Resource | Path | Purpose |
|---|---|---|
| Example config | .claude/skills/mcp-smoke-test/config/debug.example.toml | Template for ~/.statamcp/debug.toml with beta security enabled |
| Usage examples | .claude/skills/mcp-smoke-test/examples.md | Concrete tool calls, expected outputs, and troubleshooting |
| Legal dofile | .claude/skills/mcp-smoke-test/scripts/legal.do | Valid dofile for Test C |
| Boundary dofile | .claude/skills/mcp-smoke-test/scripts/boundary.do | Dofile that references /tmp/auto.dta for Test D |
| Mock data generator | .claude/skills/mcp-smoke-test/scripts/gen_mock_data.py | Generates auto.dta when the system sample is unavailable |
| Prepare script | .claude/skills/mcp-smoke-test/scripts/prepare_smoke_test.sh | Sets up all test artifacts |
| Cleanup script | .claude/skills/mcp-smoke-test/scripts/cleanup.sh | Removes temporary test artifacts |