Atlas / MCP servers / hanlulong / Stata

StataBLOCK

mcp/hanlulong/stata

Stata MCP Extension for VS Code, Cursor, and Antigravity IDE

Verdict
BLOCK
Grade
F
Trust score
58 /100
Exposed tools
1 0r · 1w · 0d
Transport
streamable-http
License
MIT
Stars
500
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](./README.md) [](./README.zh-CN.md) [](https://marketplace.visualstudio.com/items?itemName=DeepEcon.stata-mcp) [](https://marketplace.visualstudio.com/items?itemName=DeepEcon.stata-mcp) [](https://open-vsx.org/extension/DeepEcon/stata-mcp) [](https://open-vsx.org/extension/DeepEcon/stata-mcp) [](https://github.com/hanlulong/stata-mcp/releases) [](https://github.com/hanlulong/stata-mcp/blob/main/LICENSE)

This extension provides Stata integration for Visual Studio Code, Cursor, and Antigravity IDE using the Model Context Protocol (MCP). It enables AI-powered Stata development with GitHub Copilot, Cursor, Antigravity, Cline, Claude Code, or Codex.

Features

  • Run Stata Commands: Execute selections or entire .do files directly from your editor
  • Real-time Output: See Stata results instantly in your editor
  • Syntax Highlighting: Full syntax support for Stata .do, .ado, .mata, and .doh files
  • AI Assistant Integration: Contextual help and code suggest
Read from source at commit 265c09938fbbOBSERVED · 2026-09-30
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add stata-mcp -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "stata-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ]
    }
  }
}
03

Exposed tools (1)

0 read · 1 write · 0 destructive.

ToolRiskDescription
stata_run_selectionwriteStata Run Selection Endpoint\n\nRun selected Stata code and return the output\n\n### Responses:\n\n**200**: Successful Response (Success Response)
04

Trust audit

BLOCKgrade F · trust 58/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)WARN
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (3 observation(s))
Network
declared (9 observation(s))
Shell
declared (10 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (24)

HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
src/check-python.js:32
exec(command, { maxBuffer: 1024 * 1024 * 10 }, (error, stdout, stderr) => {
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
src/start-server.js:264
serverProcess = exec(cmdString, {
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
src/check-python.js:66
console.log('Option 1 (may require sudo): curl -LsSf https://astral.sh/uv/install.sh | sudo sh');
Why it matters. asks for elevated privileges
MEDIUMFilesystem / path · fs.system_paths · CWE-22, CWE-59
src/check-python.js:160
'/usr/local/bin/uv',
MEDIUMPrompt injection · prompt.hidden_style · CWE-94, CWE-1427
docs/incidents/GRAPH_VIEWER_BLANK_PANEL.md:172
<div class="error" style="display:none;">Failed to load graph: graph1 (path: /Users/.../graph1.png)</div>
MEDIUMPrompt injection · prompt.hidden_style · CWE-94, CWE-1427
docs/incidents/GRAPH_VIEWER_BLANK_PANEL.md:322
return '<!DOCTYPE html><html><body style="background:red;color:white;padding:20px"><h1>TEST</h1><p>graphs: ' + graphCount + '</p></body></html>';
MEDIUMPrompt injection · scope.undeclared_system · CWE-94, CWE-1427
<declared scope>
system use found in code, not declared in the description
Why it matters. the description does not admit a capability the code has
Fix. declare system use in the description, or remove it
MEDIUMAuth / authz · mcp.remote_no_auth · CWE-287, CWE-862
streamable-http
Why it matters. a network transport with no auth environment variable found
Fix. require a token
LOWInventory / provenance · inv.hidden_file · CWE-1104
.vscodeignore
.vscodeignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
src/session_manager.py:97
digest = hashlib.sha1(raw_session_id.encode("utf-8", errors="replace")).hexdigest()[:10]
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
src/stata_mcp_server.py:251
digest = hashlib.sha1(raw_session_id.encode("utf-8", errors="replace")).hexdigest()[:10]
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
src/stata_worker.py:113
digest = hashlib.sha1(raw_value.encode("utf-8", errors="replace")).hexdigest()[:10]
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
src/stata_worker.py:487
seed_hash = int(hashlib.md5(seed_input.encode()).hexdigest()[:8], 16)
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
src/stata_worker.py:538
seed_hash = int(hashlib.md5(seed_input.encode()).hexdigest()[:8], 16) % 2147483647
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
adm-zip, axios, resolve, @types/glob, @types/mocha, @types/vscode, @typescript-eslint/eslint-plugin, @typescript-eslint/parser
Why it matters. 15 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWPrompt injection · prompt.authority_framing · CWE-94, CWE-1427
docs/incidents/STREAMING_IMPLEMENTATION_GUIDE.md:182
- Get full access to `ServerSession`
LOWSupply chain · prompt.pipe_to_shell · CWE-829, CWE-1357
README.md:446
curl -LsSf https://astral.sh/uv/install.sh | sh   # macOS/Linux
LOWSupply chain · prompt.pipe_to_shell · CWE-829, CWE-1357
README.md:578
curl -LsSf https://astral.sh/uv/install.sh | sh
LOWSupply chain · prompt.pipe_to_shell · CWE-829, CWE-1357
README.zh-CN.md:446
curl -LsSf https://astral.sh/uv/install.sh | sh   # macOS/Linux
LOWSupply chain · prompt.pipe_to_shell · CWE-829, CWE-1357
README.zh-CN.md:578
curl -LsSf https://astral.sh/uv/install.sh | sh
LOWSupply chain · prompt.pipe_to_shell · CWE-829, CWE-1357
docs/troubleshooting.md:56
curl -LsSf https://astral.sh/uv/install.sh | sh
INFOInventory / provenance · inv.oversize · CWE-1104
images/demo.mp4
images/demo.mp4
Why it matters. 23698233 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
images/demo_2x.gif
images/demo_2x.gif
Why it matters. 20576384 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
images/pystata.png
images/pystata.png
Why it matters. 1419901 bytes not read

Gates applied: no_behavioural_pass.

Audited 2026-09-30 · audit v0.4.1 · source sha 265c09938fbbfull audit observations/trust-audit/mcp-server/hanlulong__stata.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-09-30265c09938fbbBLOCKF58first audit
06

Questions

What is the Stata MCP server?

Stata MCP Extension for VS Code, Cursor, and Antigravity IDE

What tools does Stata expose?

1 in total: 0 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is Stata safe to connect to an agent?

No — not without reading the findings first. The audit graded it F (58/100) and found 3 critical or high issues in the source. Each one is listed on this page with the file and line it is on.

What credentials does Stata need?

No credential environment variables were found in its source, so it appears to need none.

How does Stata run?

It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as stata-mcp at 0.5.3.

How current is this page?

The grade is for one exact copy of the source (265c09938fbb), read on 2026-09-30. The repository is watched and re-audited when it changes.

Advertisement