Skip to content
Agentmart
Submit a tool

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

IndexedMIT★ 516
Write a review

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.

Book a call

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.

We use your email only for this newsletter. Privacy

About

The CLAUDE.md file that hanlulong/stata-mcp (517 stars) keeps for coding agents. It has 52 lines in 4 sections: Server Restart Protocol; Package Building; Testing; IDE Compatibility. Use it as a model for your own project's instructions.

Use cases: prompt-engineering

No 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

  1. Server Restart Protocol
  2. Package Building
  3. Testing
  4. 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
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

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.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying CLAUDE.md · hanlulong/stata-mcp?

CallGet help
Cite this page

CLAUDE.md · hanlulong/stata-mcp. Agent Mart. https://agentmart.dev/templates/hanlulong-stata-mcp-claude-md (last updated 2026-10-24)