CLAUDE.md · hanlulong/stata-mcp
CLAUDE.md from hanlulong/stata-mcp: 52 lines covering Server Restart Protocol, Package Building, Testing, IDE Compatibility.
Template by hanlulong
Chalk Labs
Need help deploying CLAUDE.md · hanlulong/stata-mcp?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/hanlulong/stata-mcp/main/CLAUDE.md -o CLAUDE.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: prompt-engineering
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
A CLAUDE.md file: project memory Claude Code loads at the start of every session.
- For
- Claude Code
- Length
- 52 lines
- File
CLAUDE.md
Sections
- Server Restart Protocol
- Package Building
- Testing
- IDE Compatibility
First lines (shown under the repo's MIT license)
# Project Rules for stata-mcp
## Server Restart Protocol
**CRITICAL: Never use `pkill -f stata_mcp_server.py` directly!**
The MCP server runs on port 4000. Killing the server process incorrectly can terminate the current Claude Code session since Claude Code also connects to port 4000.
### To restart the MCP server:
Always use the restart script:
```bash
./scripts/restart_server.sh
```
This script:
1. Auto-detects VS Code, Cursor, or Antigravity extension directory
2. Copies updated source files to the installed extension
3. Sends graceful SIGTERM (not SIGKILL) to stop the server
4. Starts the server with correct settings
5. Verifies the server is running
### After modifying Python source files:
1. Run the restart script: `./scripts/restart_server.sh`
2. Test the server: `curl -s http://localhost:4000/health`
3. Recompile VSIX if needed: `npm run compile && vsce package`
## Package Building
When building the VSIX package:
1. Ensure all new Python modules are listed in `.vscodeignore` whitelist:
- `!src/stata_mcp_server.py`
- `!src/session_manager.py`
- `!src/stata_worker.py`
- `!src/api_models.py`
- `!src/output_filter.py`
- `!src/utils.py`
2. Run `npm run compile` to build TypeScript
3. Run `vsce package` to create the VSIX
4. Verify contents with `unzip -l stata-mcp-*.vsix | grep src/`
## Testing
- Unit tests: `python3 -m pytest tests/test_compact_filter.py -v`
- Server health: `curl -s http://localhost:4000/health`
- MCP tools: `curl -s -X POST http://localhost:4000/v1/tools -H "Content-Type: application/json" -d '{"tool": "stata_run_selection", "parameters": {"selection": "display 1+1"}}'`
## IDE Compatibility
The extension works with VS Code, Cursor, and Antigravity IDE. The restart script auto-detects which one is installed.Signals
- Stars
- 516
- Forks
- 89
- Open issues
- 4
- Last commit (this folder)
- Dec 28, 2025 (10 months ago)
- Last release
- Jul 5, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/hanlulong/stata-mcp
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get CLAUDE.md · hanlulong/stata-mcp running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
CLAUDE.md · hanlulong/stata-mcp. Agent Mart. https://agentmart.dev/templates/hanlulong-stata-mcp-claude-md (last updated 2026-10-24)